-
Notifications
You must be signed in to change notification settings - Fork 15.3k
[X86] Added support for 8 and 16bit LEA instructions #122102
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
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
f9cf115
[X86] Added support for 16bit LEA instruction
JaydeepChauhan14 3b2fc6a
Merge branch 'main' into 16bitLEA
JaydeepChauhan14 71c70f2
Addressed the testcase review comments
JaydeepChauhan14 e4a3b5e
Merge branch 'main' into 16bitLEA
JaydeepChauhan14 ec41360
Addressed the review comments1
JaydeepChauhan14 625135a
Merge branch 'main' into 16bitLEA
JaydeepChauhan14 9e86eed
Added 8bit LEA support
JaydeepChauhan14 944294b
Merge branch 'main' into 16bitLEA
JaydeepChauhan14 f0ecdfd
Addressed the review comments2
JaydeepChauhan14 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,6 +25,12 @@ let SchedRW = [WriteLEA] in { | |
| [(set GR32:$dst, lea32addr:$src)]>, | ||
| OpSize32, Requires<[Not64BitMode]>; | ||
|
|
||
| def LEA64_16r : I<0x8D, MRMSrcMem, (outs GR16:$dst), (ins lea64_16mem:$src), | ||
| "lea{w}\t{$src|$dst}, {$dst|$src}", | ||
| [(set GR16:$dst, lea64_16addr:$src)]>, | ||
| OpSize16, | ||
| Requires<[In64BitMode]>; | ||
|
||
|
|
||
| def LEA64_32r : I<0x8D, MRMSrcMem, | ||
| (outs GR32:$dst), (ins lea64_32mem:$src), | ||
| "lea{l}\t{$src|$dst}, {$dst|$src}", | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5 | ||
| ; RUN: llc < %s -mtriple=x86_64-linux -mattr=+ndd | FileCheck %s --check-prefixes=CHECK | ||
JaydeepChauhan14 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| define dso_local signext range(i16 1, 0) i16 @lea16bit(i16 noundef signext %in) local_unnamed_addr #0 { | ||
JaydeepChauhan14 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ; CHECK-LABEL: lea16bit: | ||
| ; CHECK: # %bb.0: # %entry | ||
| ; CHECK-NEXT: # kill: def $edi killed $edi def $rdi | ||
| ; CHECK-NEXT: leaw 1(%rdi,%rdi), %ax | ||
| ; CHECK-NEXT: retq | ||
| entry: | ||
JaydeepChauhan14 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| %shl = shl i16 %in, 1 | ||
| %or = or disjoint i16 %shl, 1 | ||
| ret i16 %or | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.