-
Notifications
You must be signed in to change notification settings - Fork 15.4k
[LV] Update LoopVectorizationPlanner::emitInvalidCostRemarks to handle reduction plans #165913
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 3 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
b6a8861
[LV] Add test for failing reduction remark case
bababuck 0b5ef27
[LV] Update LoopVectorizationPlanner::emitInvalidCostRemarks to handl…
bababuck 032c82c
[LV] Update bug165359.ll test to demonstrate new output
bababuck b444d96
Update test to return result rather than storing
bababuck 6822ef1
Pass in one double rather than loading it
bababuck d0b6eca
Remove no alias from remaining pointer
bababuck 0b4f265
Switch to canonical loop induction form
bababuck 201b837
Add newline to end of file
bababuck 099e2c7
Disable output from test since not checked
bababuck 9b5f82a
Rename %counter -> %iv
bababuck bca99ab
Rename %iv_updated -> %iv.next
bababuck 3036aa2
Capture output from pass-remarks-analysis rather than debug-only
bababuck 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,27 @@ | ||
| ; RUN: opt < %s -passes=loop-vectorize -S -pass-remarks=loop-vectorize -debug-only=loop-vectorize &> %t | ||
| ; RUN: cat %t | FileCheck --check-prefix=CHECK-REMARKS %s | ||
|
|
||
| ; CHECK-REMARKS: LV: Recipe with invalid costs prevented vectorization at VF=(vscale x 1): fadd. | ||
|
|
||
| target triple = "aarch64-unknown-linux-gnu" | ||
|
|
||
| define void @reduce_fail(i64 %loop_count, ptr %ptr0, ptr noalias %ptr1) #0 { | ||
| entry: | ||
| %d1 = load double, ptr %ptr1 | ||
| %d0 = load double, ptr %ptr0 | ||
bababuck marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| br label %loop | ||
|
|
||
| loop: | ||
| %acc0 = phi double [ %fadd0, %loop ], [ %d0, %entry ] | ||
| %counter = phi i64 [ %counter_updated, %loop ], [ %loop_count, %entry ] | ||
| %fadd0 = fadd double %acc0, %d1 | ||
| %counter_updated = add nsw i64 %counter, -1 | ||
| %exit_cond = icmp samesign ugt i64 %counter, 1 | ||
| br i1 %exit_cond, label %loop, label %loopexit | ||
bababuck marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| loopexit: | ||
| store double %fadd0, ptr %ptr1 | ||
bababuck marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ret void | ||
| } | ||
|
|
||
| attributes #0 = { "target-features"="+sve" } | ||
bababuck marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
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.