-
Notifications
You must be signed in to change notification settings - Fork 14.4k
[RISCV][VLOPT] Compute demanded VLs up front #124530
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 all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
c6eb48e
Keep VL = 1 check, check isCandidate after popping instead
lukel97 dd84c16
Move VL=1 check to tryReduceVL
lukel97 39cdcef
[RISCV][VLOPT] Compute demanded VLs up front. NFC
lukel97 46c590e
Update comments, remove redundant isSupportedInstr check, rename Comm…
lukel97 ed23fc8
Undo renames + put back std::optional
lukel97 61004a9
Do cross-block analysis with post-order traversal, add assert + test …
lukel97 343dba9
clang-format
lukel97 c65518c
Remove more parts of the diff
lukel97 1bf7716
Use std::optional in DenseMap, remove TII check given everything in d…
lukel97 6264a89
Remove COPYs from tests that are no longer needed, make insert uncond…
lukel97 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
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 |
---|---|---|
|
@@ -12,15 +12,15 @@ | |
|
||
define <vscale x 4 x i32> @same_vl_imm(<vscale x 4 x i32> %passthru, <vscale x 4 x i32> %a, <vscale x 4 x i32> %b) { | ||
; CHECK: User VL is: 4 | ||
; CHECK-NEXT: Abort due to CommonVL == VLOp, no point in reducing. | ||
; CHECK: Abort due to CommonVL == VLOp, no point in reducing. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why drop NEXT? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. tryReduceVL is no longer called immediately after the checkUsers, so the CHECK-NEXT failed |
||
%v = call <vscale x 4 x i32> @llvm.riscv.vadd.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %a, <vscale x 4 x i32> %b, i64 4) | ||
%w = call <vscale x 4 x i32> @llvm.riscv.vadd.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %v, <vscale x 4 x i32> %a, i64 4) | ||
ret <vscale x 4 x i32> %w | ||
} | ||
|
||
define <vscale x 4 x i32> @same_vl_reg(<vscale x 4 x i32> %passthru, <vscale x 4 x i32> %a, <vscale x 4 x i32> %b, i64 %vl) { | ||
; CHECK: User VL is: %3:gprnox0 | ||
; CHECK-NEXT: Abort due to CommonVL == VLOp, no point in reducing. | ||
; CHECK: Abort due to CommonVL == VLOp, no point in reducing. | ||
%v = call <vscale x 4 x i32> @llvm.riscv.vadd.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %a, <vscale x 4 x i32> %b, i64 %vl) | ||
%w = call <vscale x 4 x i32> @llvm.riscv.vadd.nxv4i32.nxv4i32(<vscale x 4 x i32> poison, <vscale x 4 x i32> %v, <vscale x 4 x i32> %a, i64 %vl) | ||
ret <vscale x 4 x i32> %w | ||
|
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.