Skip to content
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

[LoopVectorize] Vectorize select-cmp reduction pattern for increasing integer induction variable #67812

Merged
merged 29 commits into from
Dec 12, 2024
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
6bdc81f
[LoopVectorize] Vectorize select-cmp reduction pattern for increasing
Mel-Chen Sep 25, 2023
bcab2a6
Refactor the identification method for FindLastIV pattern.
Mel-Chen Sep 25, 2023
dfa355b
Replace SelectInst with auto
Mel-Chen Oct 4, 2023
734da15
Drop parentheses
Mel-Chen Oct 4, 2023
2c896c4
Modified lambda to capture all external variables by reference
Mel-Chen Oct 4, 2023
1946c8c
Fix format
Mel-Chen Oct 4, 2023
e8d5b1d
Clean up comments
Mel-Chen Oct 4, 2023
d2bfe2f
Refine the expression of valid range
Mel-Chen Oct 6, 2023
4a88b44
Fix the warning caused by unused parameter
Mel-Chen Nov 27, 2023
d21b127
Fix typo
Mel-Chen Nov 27, 2023
2fe0a94
Clean comment in test case
Mel-Chen Nov 27, 2023
7ebc7d8
Fix SE pass
Mel-Chen Apr 24, 2024
3e2e9f1
Add TODO comment for the decreasing induction
Mel-Chen Apr 24, 2024
11900cd
Refine comments
Mel-Chen May 6, 2024
2924bf9
Refine debug dump
Mel-Chen May 6, 2024
dd21cd3
Refine comments
Mel-Chen May 10, 2024
76e91cc
Revert "Refine the expression of valid range"
Mel-Chen May 10, 2024
4f743ab
Refine the expression of valid range
Mel-Chen May 10, 2024
556743a
Capture LHS and RHS of select instruction by match.
Mel-Chen May 10, 2024
a852eb6
Rebase, and update test cases
Mel-Chen Oct 17, 2024
4947e0f
Restrict FindLastIV idiom to single-use reduction phi.
Mel-Chen Oct 17, 2024
6e739d8
Remove unused variable
Mel-Chen Oct 17, 2024
7d2a8ec
Refine pattern matcher
Mel-Chen Oct 31, 2024
e530a3a
Refine lit test checker format
Mel-Chen Oct 31, 2024
e50439e
Remove unused CHECK
Mel-Chen Nov 28, 2024
ab0b4d3
Refine the comment for getSentinelValue
Mel-Chen Dec 2, 2024
97e0433
Replace if-condition with assert
Mel-Chen Dec 3, 2024
69cd172
Add comment for wrap check
Mel-Chen Dec 3, 2024
5ebec5d
Add check for ensure the loop of SCEVAddRec is the same as the loop o…
Mel-Chen Dec 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Replace if-condition with assert
  • Loading branch information
Mel-Chen committed Dec 12, 2024
commit 97e0433b84f0782a29be525a8a6655ecd83d0351
10 changes: 4 additions & 6 deletions llvm/include/llvm/Analysis/IVDescriptors.h
Original file line number Diff line number Diff line change
Expand Up @@ -266,12 +266,10 @@ class RecurrenceDescriptor {
/// Returns the sentinel value for FindLastIV recurrences to replace the start
/// value.
Value *getSentinelValue() const {
if (isFindLastIVRecurrenceKind(Kind)) {
Type *Ty = StartValue->getType();
return ConstantInt::get(
Ty, APInt::getSignedMinValue(Ty->getIntegerBitWidth()));
}
return nullptr;
assert(isFindLastIVRecurrenceKind(Kind) && "Unexpected recurrence kind");
Type *Ty = StartValue->getType();
return ConstantInt::get(Ty,
APInt::getSignedMinValue(Ty->getIntegerBitWidth()));
}

/// Returns a reference to the instructions used for type-promoting the
Expand Down