Fix ICE when expanding MSA constant vectors with replicated values
authorMatthew Fortune <matthew.fortune@imgtec.com>
Thu, 30 Mar 2017 22:47:38 +0000 (22:47 +0000)
committerMatthew Fortune <mpf@gcc.gnu.org>
Thu, 30 Mar 2017 22:47:38 +0000 (22:47 +0000)
gcc/
* config/mips/mips.c (mips_expand_vector_init): Create
a const_vector to initialise a vector register instead of
using a const_int.

From-SVN: r246601

gcc/ChangeLog
gcc/config/mips/mips.c

index 18effd76ad6d70554028a266739d3ea90856f8e4..6eb56f5db7cb499e2f52ef6aac1a9c0e82f765ba 100644 (file)
@@ -1,3 +1,9 @@
+2017-03-30  Matthew Fortune  <matthew.fortune@imgtec.com>
+
+       * config/mips/mips.c (mips_expand_vector_init): Create a const_vector
+       to initialise a vector register instead
+       of using a const_int.
+
 2017-03-30  Jakub Jelinek  <jakub@redhat.com>
 
        PR translation/80189
index d1deb523a1e911ad390c1148f415f5d13c8ca726..dadfcc431fe18ea6940792404fdcc812cba60c6c 100644 (file)
@@ -21757,11 +21757,12 @@ mips_expand_vector_init (rtx target, rtx vals)
                case V8HImode:
                case V4SImode:
                case V2DImode:
-                 emit_move_insn (target, same);
+                 temp = gen_rtx_CONST_VECTOR (vmode, XVEC (vals, 0));
+                 emit_move_insn (target, temp);
                  return;
 
                default:
-                 break;
+                 gcc_unreachable ();
                }
            }
          temp = gen_reg_rtx (imode);