Skip to content

Commit

Permalink
The wrong relocation was being emitted for several SSSE3 instructions.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
bcardosolopes committed Sep 20, 2011
1 parent 77169a9 commit 448d986
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Target/X86/X86InstrSSE.td
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 6 additions & 0 deletions test/MC/X86/x86_64-avx-encoding.s
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 448d986

Please sign in to comment.