-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[AArch64] Unfold adds when eliminating frame index with scalable offset #158597
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
+36
−2
Merged
Changes from 7 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
27c6b10
[AArch64] Avoid apply S-form on frame index in peephole
XChy a30b328
Unfold adds
XChy 18c3c7b
format
XChy a4b824a
Remove debugging
XChy f2fa5b4
rename
XChy 66b3256
format
XChy ebbd0ce
resolve comments
XChy b5ac53a
reduce test
XChy 36616d7
rename variable
XChy 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 |
---|---|---|
@@ -0,0 +1,103 @@ | ||
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 5 | ||
XChy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# RUN: llc -mtriple=aarch64-none-linux-gnu -run-pass prologepilog -o - %s | FileCheck %s | ||
--- | | ||
define void @i(ptr %ad, ptr %0) #0 { | ||
entry: | ||
ret void | ||
} | ||
declare i32 @g(...) | ||
attributes #0 = { "frame-pointer"="non-leaf" "target-features"="+sve" } | ||
... | ||
--- | ||
name: i | ||
alignment: 4 | ||
exposesReturnsTwice: false | ||
legalized: false | ||
regBankSelected: false | ||
selected: false | ||
failedISel: false | ||
tracksRegLiveness: true | ||
hasWinCFI: false | ||
noPhis: true | ||
isSSA: false | ||
noVRegs: true | ||
hasFakeUses: false | ||
callsEHReturn: false | ||
callsUnwindInit: false | ||
hasEHContTarget: false | ||
hasEHScopes: false | ||
hasEHFunclets: false | ||
isOutlined: false | ||
debugInstrRef: false | ||
failsVerification: false | ||
tracksDebugUserValues: true | ||
registers: [] | ||
liveins: [] | ||
frameInfo: | ||
isFrameAddressTaken: false | ||
isReturnAddressTaken: false | ||
hasStackMap: false | ||
hasPatchPoint: false | ||
stackSize: 0 | ||
offsetAdjustment: 0 | ||
maxAlignment: 16 | ||
adjustsStack: true | ||
hasCalls: true | ||
stackProtector: '' | ||
functionContext: '' | ||
maxCallFrameSize: 0 | ||
cvBytesOfCalleeSavedRegisters: 0 | ||
hasOpaqueSPAdjustment: false | ||
hasVAStart: false | ||
hasMustTailInVarArgFunc: false | ||
hasTailCall: false | ||
isCalleeSavedInfoValid: false | ||
localFrameSize: 0 | ||
fixedStack: [] | ||
stack: | ||
- { id: 0, name: '', type: default, offset: 0, size: 4, alignment: 4, | ||
stack-id: default, callee-saved-register: '', callee-saved-restored: true, | ||
local-offset: -4, debug-info-variable: '', debug-info-expression: '', | ||
debug-info-location: '' } | ||
- { id: 3, name: '', type: spill-slot, offset: 0, size: 16, alignment: 16, | ||
stack-id: scalable-vector, callee-saved-register: '', callee-saved-restored: true, | ||
debug-info-variable: '', debug-info-expression: '', debug-info-location: '' } | ||
entry_values: [] | ||
callSites: [] | ||
debugValueSubstitutions: [] | ||
constants: [] | ||
machineFunctionInfo: {} | ||
body: | | ||
bb.0: | ||
; CHECK-LABEL: name: i | ||
; CHECK: liveins: $d11, $lr, $x20, $x28 | ||
; CHECK-NEXT: {{ $}} | ||
; CHECK-NEXT: early-clobber $sp = frame-setup STRDpre killed $d11, $sp, -48 :: (store (s64) into %stack.6) | ||
; CHECK-NEXT: frame-setup STPXi killed $fp, killed $lr, $sp, 2 :: (store (s64) into %stack.5), (store (s64) into %stack.4) | ||
; CHECK-NEXT: frame-setup STPXi killed $x28, killed $x20, $sp, 4 :: (store (s64) into %stack.3), (store (s64) into %stack.2) | ||
; CHECK-NEXT: $fp = frame-setup ADDXri $sp, 16, 0 | ||
; CHECK-NEXT: $sp = frame-setup ADDVL_XXI $sp, -1, implicit $vg | ||
; CHECK-NEXT: frame-setup CFI_INSTRUCTION def_cfa $w29, 32 | ||
; CHECK-NEXT: frame-setup CFI_INSTRUCTION offset $w20, -8 | ||
; CHECK-NEXT: frame-setup CFI_INSTRUCTION offset $w28, -16 | ||
; CHECK-NEXT: frame-setup CFI_INSTRUCTION offset $w30, -24 | ||
; CHECK-NEXT: frame-setup CFI_INSTRUCTION offset $w29, -32 | ||
; CHECK-NEXT: frame-setup CFI_INSTRUCTION offset $b11, -48 | ||
; CHECK-NEXT: $w20 = MOVi32imm 1 | ||
; CHECK-NEXT: INLINEASM &"", 1 /* sideeffect attdialect */, 12 /* clobber */, implicit-def dead early-clobber $q11 | ||
; CHECK-NEXT: BL @g, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def dead $w0 | ||
; CHECK-NEXT: $x8 = ADDXri $sp, 12, 0 | ||
; CHECK-NEXT: $x8 = ADDVL_XXI $x8, 1, implicit $vg | ||
; CHECK-NEXT: $x8 = ADDSXri $x8, 0, 0, implicit-def $nzcv | ||
; CHECK-NEXT: $sp = frame-destroy ADDVL_XXI $sp, 1, implicit $vg | ||
; CHECK-NEXT: $x28, $x20 = frame-destroy LDPXi $sp, 4 :: (load (s64) from %stack.3), (load (s64) from %stack.2) | ||
; CHECK-NEXT: $fp, $lr = frame-destroy LDPXi $sp, 2 :: (load (s64) from %stack.5), (load (s64) from %stack.4) | ||
; CHECK-NEXT: early-clobber $sp, $d11 = frame-destroy LDRDpost $sp, 48 :: (load (s64) from %stack.6) | ||
; CHECK-NEXT: RET_ReallyLR | ||
$w20 = MOVi32imm 1 | ||
INLINEASM &"", 1 /* sideeffect attdialect */, 12 /* clobber */, implicit-def dead early-clobber $q11 | ||
BL @g, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def dead $w0 | ||
$x8 = ADDSXri %stack.0, 0, 0, implicit-def $nzcv | ||
RET_ReallyLR | ||
... | ||
|
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.