[llvm] 2ebbcfa - [X86] Fix encoding for ATOMIC_LOGIC_OP
Nabeel Omer via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 14 04:41:12 PDT 2023
Author: Nabeel Omer
Date: 2023-03-14T11:39:43Z
New Revision: 2ebbcfa07edd9f16bf28cbf1deaaa302503fd330
URL: https://github.com/llvm/llvm-project/commit/2ebbcfa07edd9f16bf28cbf1deaaa302503fd330
DIFF: https://github.com/llvm/llvm-project/commit/2ebbcfa07edd9f16bf28cbf1deaaa302503fd330.diff
LOG: [X86] Fix encoding for ATOMIC_LOGIC_OP
Fixes PR#61384.
Differential Revision: https://reviews.llvm.org/D145930
Added:
Modified:
llvm/lib/Target/X86/X86InstrCompiler.td
llvm/test/CodeGen/X86/pr61384.ll
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/X86InstrCompiler.td b/llvm/lib/Target/X86/X86InstrCompiler.td
index 575cf4d3dced3..36324d1338864 100644
--- a/llvm/lib/Target/X86/X86InstrCompiler.td
+++ b/llvm/lib/Target/X86/X86InstrCompiler.td
@@ -896,15 +896,15 @@ multiclass ATOMIC_LOGIC_OP<Format Form, string s> {
multiclass ATOMIC_LOGIC_OP_RM<bits<8> Opc8, string s> {
let Defs = [EFLAGS], mayLoad = 1, mayStore = 1, isCodeGenOnly = 1,
SchedRW = [WriteBitTestSetRegRMW] in {
- def 16rm : Ii8<Opc8, MRMDestMem, (outs), (ins i16mem:$src1, GR16:$src2),
+ def 16rm : I<Opc8, MRMDestMem, (outs), (ins i16mem:$src1, GR16:$src2),
!strconcat(s, "{w}\t{$src2, $src1|$src1, $src2}"),
[(set EFLAGS, (!cast<SDNode>("x86_rm_" # s) addr:$src1, GR16:$src2))]>,
OpSize16, TB, LOCK;
- def 32rm : Ii8<Opc8, MRMDestMem, (outs), (ins i32mem:$src1, GR32:$src2),
+ def 32rm : I<Opc8, MRMDestMem, (outs), (ins i32mem:$src1, GR32:$src2),
!strconcat(s, "{l}\t{$src2, $src1|$src1, $src2}"),
[(set EFLAGS, (!cast<SDNode>("x86_rm_" # s) addr:$src1, GR32:$src2))]>,
OpSize32, TB, LOCK;
- def 64rm : RIi8<Opc8, MRMDestMem, (outs), (ins i64mem:$src1, GR64:$src2),
+ def 64rm : RI<Opc8, MRMDestMem, (outs), (ins i64mem:$src1, GR64:$src2),
!strconcat(s, "{q}\t{$src2, $src1|$src1, $src2}"),
[(set EFLAGS, (!cast<SDNode>("x86_rm_" # s) addr:$src1, GR64:$src2))]>,
TB, LOCK;
diff --git a/llvm/test/CodeGen/X86/pr61384.ll b/llvm/test/CodeGen/X86/pr61384.ll
index cf17b3d4b73ad..e5178b4904b7e 100644
--- a/llvm/test/CodeGen/X86/pr61384.ll
+++ b/llvm/test/CodeGen/X86/pr61384.ll
@@ -8,7 +8,7 @@ define i32 @atomic_global() nounwind {
; CHECK: # %bb.0: # %entry
; CHECK-NEXT: xorl %eax, %eax # encoding: [0x31,0xc0]
; CHECK-NEXT: lock btsq %rax, a(%rip) # encoding: [0xf0,0x48,0x0f,0xab,0x05,A,A,A,A]
-; CHECK-NEXT: # fixup A - offset: 5, value: a-5, kind: reloc_riprel_4byte
+; CHECK-NEXT: # fixup A - offset: 5, value: a-4, kind: reloc_riprel_4byte
; CHECK-NEXT: xorl %eax, %eax # encoding: [0x31,0xc0]
; CHECK-NEXT: retq # encoding: [0xc3]
entry:
More information about the llvm-commits
mailing list