The wrong relocation was being emitted for several SSSE3 instructions.
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Tue, 20 Sep 2011 21:39:21 +0000 (21:39 +0000)
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Tue, 20 Sep 2011 21:39:21 +0000 (21:39 +0000)
This fixes PR10963. Thanks to Benjamin for finding the wrong tablegen
declaration.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140184 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86InstrSSE.td
test/MC/X86/x86_64-avx-encoding.s

index f9330dc7d38fd07abdd9d742374c780c05400bc3..4a8b76651102f8dd416c6bcaf5006453a4f1356a 100644 (file)
@@ -4851,7 +4851,7 @@ multiclass SS3I_binop_rm_int<bits<8> opc, string OpcodeStr,
           (bitconvert (memopv16i8 addr:$src2))))]>, OpSize;
 }
 
-let Predicates = [HasAVX] in {
+let ImmT = NoImm, Predicates = [HasAVX] in {
 let isCommutable = 0 in {
   defm VPHADDW    : SS3I_binop_rm_int<0x01, "vphaddw", memopv8i16,
                                       int_x86_ssse3_phadd_w_128, 0>, VEX_4V;
index 8d1f6ca4c88f8b45ba1ce978d07609b076eeebae..d3b226f205db1368f556495c5d7ce90dcc2478b4 100644 (file)
@@ -3340,3 +3340,9 @@ vdivpd  -4(%rcx,%rbx,8), %xmm10, %xmm11
 // CHECK: encoding: [0xc4,0xa1,0x78,0x29,0x1c,0x18]
           vmovaps %xmm3, (%rax,%r11)
 
+// CHECK: vpshufb _foo(%rip), %xmm0, %xmm0
+// CHECK: encoding: [0xc4,0xe2,0x79,0x00,0x05,A,A,A,A]
+// CHECK: kind: reloc_riprel_4byte
+_foo:
+  nop
+  vpshufb _foo(%rip), %xmm0, %xmm0