Skip to content

[X86][APX] Fix a typo in LEA suffix #135734

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 15, 2025
Merged

[X86][APX] Fix a typo in LEA suffix #135734

merged 1 commit into from
Apr 15, 2025

Conversation

phoebewang
Copy link
Contributor

Found during reviewing #135632

@llvmbot
Copy link
Member

llvmbot commented Apr 15, 2025

@llvm/pr-subscribers-backend-x86

Author: Phoebe Wang (phoebewang)

Changes

Found during reviewing #135632


Full diff: https://github.com/llvm/llvm-project/pull/135734.diff

2 Files Affected:

  • (modified) llvm/lib/Target/X86/X86InstrArithmetic.td (+1-1)
  • (modified) llvm/test/CodeGen/X86/lea-8bit.ll (+1-1)
diff --git a/llvm/lib/Target/X86/X86InstrArithmetic.td b/llvm/lib/Target/X86/X86InstrArithmetic.td
index f369c20c786c5..b476859069a57 100644
--- a/llvm/lib/Target/X86/X86InstrArithmetic.td
+++ b/llvm/lib/Target/X86/X86InstrArithmetic.td
@@ -27,7 +27,7 @@ let SchedRW = [WriteLEA] in {
 
   let Predicates = [HasNDD], isCodeGenOnly = 1 in {
     def LEA64_8r : I<0x8D, MRMSrcMem, (outs GR8:$dst), (ins lea64_8mem:$src),
-                     "lea{w}\t{$src|$dst}, {$dst|$src}",
+                     "lea{b}\t{$src|$dst}, {$dst|$src}",
                      [(set GR8:$dst, lea64_iaddr:$src)]>,
                    OpSize16,
                    Requires<[In64BitMode]>;
diff --git a/llvm/test/CodeGen/X86/lea-8bit.ll b/llvm/test/CodeGen/X86/lea-8bit.ll
index b3c8f96bffaa9..98222dfc0407c 100644
--- a/llvm/test/CodeGen/X86/lea-8bit.ll
+++ b/llvm/test/CodeGen/X86/lea-8bit.ll
@@ -14,7 +14,7 @@ define i8 @lea8bit(i8 %in) {
 ; NDD-LABEL: lea8bit:
 ; NDD:       # %bb.0:
 ; NDD-NEXT:    # kill: def $edi killed $edi def $rdi
-; NDD-NEXT:    leaw 1(%rdi,%rdi), %al
+; NDD-NEXT:    leab 1(%rdi,%rdi), %al
 ; NDD-NEXT:    retq
   %shl = shl i8 %in, 1
   %or = or i8 %shl, 1

@phoebewang phoebewang merged commit 17ac7e0 into llvm:main Apr 15, 2025
12 of 13 checks passed
@phoebewang phoebewang deleted the APX branch April 15, 2025 09:00
fzou1 added a commit to fzou1/llvm-project that referenced this pull request Apr 15, 2025
var-const pushed a commit to ldionne/llvm-project that referenced this pull request Apr 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants