OSDN Git Service

rs6000: Fix typo in rs6000_expand_vector_init
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 14 Oct 2011 03:27:01 +0000 (03:27 +0000)
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 14 Oct 2011 03:27:01 +0000 (03:27 +0000)
Of course we don't support vectors of size <= 4.
We're supposed to be checking the vector element size.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@179957 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/rs6000/rs6000.c

index fa2cfa8..38592a3 100644 (file)
@@ -15,6 +15,9 @@
        * tree-vect-generic.c (expand_vector_operations_1): Don't do that
        here; always simplify to scalar shift of vector if possible.
 
+       * config/rs6000/rs6000.c (rs6000_expand_vector_init): Fix mode
+       test for vector splat.
+
 2011-10-13  Jakub Jelinek  <jakub@redhat.com>
 
        * config/i386/sse.md (vec_set<mode>): Change V_128 iterator mode
index 4fd2192..aee976c 100644 (file)
@@ -4758,7 +4758,7 @@ rs6000_expand_vector_init (rtx target, rtx vals)
 
   /* Store value to stack temp.  Load vector element.  Splat.  However, splat
      of 64-bit items is not supported on Altivec.  */
-  if (all_same && GET_MODE_SIZE (mode) <= 4)
+  if (all_same && GET_MODE_SIZE (inner_mode) <= 4)
     {
       mem = assign_stack_temp (mode, GET_MODE_SIZE (inner_mode), 0);
       emit_move_insn (adjust_address_nv (mem, inner_mode, 0),