x86: Fix up ssse3_pshufbv8qi splitter
authorJakub Jelinek <jakub@redhat.com>
Sun, 30 Aug 2020 12:15:45 +0000 (14:15 +0200)
committerJakub Jelinek <jakub@redhat.com>
Sun, 30 Aug 2020 12:15:45 +0000 (14:15 +0200)
The constant pool size optimization I was testing resulted in various ICEs
in gcc.target/i386/ testsuite, the problem is that the ssse3_pshufbv8qi
splitter emits invalid RTL, in V4SImode 0xf7f7f7f7 CONST_INTs shouldn't
appear, instead they should have been -0x8080809 (0xf7f7f7f7 sign extended
into 64 bits).

2020-08-30  Jakub Jelinek  <jakub@redhat.com>

* config/i386/sse.md (ssse3_pshufbv8qi): Use gen_int_mode instead of
GEN_INT, and ix86_build_const_vector instead of gen_rtvec and
gen_rtx_CONT_VECTOR.

gcc/config/i386/sse.md

index 44aa61d87fbd55e7e6abd93073bc70ba09bc9eb7..5e26e9c5aa2ed17849fac57edabd331f48a6067e 100644 (file)
                                GET_MODE (operands[2]));
   operands[4] = lowpart_subreg (V16QImode, operands[3],
                                GET_MODE (operands[3]));
-  rtvec par = gen_rtvec (4, GEN_INT (0xf7f7f7f7),
-                        GEN_INT (0xf7f7f7f7),
-                        GEN_INT (0xf7f7f7f7),
-                        GEN_INT (0xf7f7f7f7));
-  rtx vec_const = gen_rtx_CONST_VECTOR (V4SImode, par);
+  rtx vec_const = ix86_build_const_vector (V4SImode, true,
+                                          gen_int_mode (0xf7f7f7f7, SImode));
   operands[5] = force_const_mem (V4SImode, vec_const);
 }
   [(set_attr "mmx_isa" "native,sse_noavx,avx")