-
Notifications
You must be signed in to change notification settings - Fork 15.3k
[VPlan] Handle VPWidenCastRecipe without underlying value in EVL transform #120194
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
Changes from 4 commits
1634aaf
6dd9322
b611446
f57e06a
4335c21
cf73213
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,31 @@ | ||||||
| ; RUN: opt -passes=loop-vectorize -force-tail-folding-style=data-with-evl -prefer-predicate-over-epilogue=predicate-dont-vectorize -mtriple=riscv64 -mattr=+v -S %s | ||||||
|
||||||
|
|
||||||
| ; Make sure we don't crash when transforming a VPWidenCastRecipe created without | ||||||
| ; an underlying value to an EVL recipe. This occurs in this test via | ||||||
| ; VPlanTransforms::truncateToMinimalBitwidths | ||||||
|
|
||||||
| define void @truncate_to_minimal_bitwidths_widen_cast_recipe(ptr %dst, ptr %src, i32 %mvx) { | ||||||
| entry: | ||||||
| %cmp111 = icmp sgt i32 %mvx, 0 | ||||||
| br i1 %cmp111, label %for.body13.preheader, label %for.cond.cleanup12 | ||||||
|
|
||||||
|
||||||
| for.body13.preheader: ; preds = %entry | ||||||
| %wide.trip.count = zext nneg i32 %mvx to i64 | ||||||
| br label %for.body13 | ||||||
|
|
||||||
| for.body13: ; preds = %for.body13.preheader, %for.body13 | ||||||
|
||||||
| for.body13: ; preds = %for.body13.preheader, %for.body13 | |
| loop: |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| %indvars.iv = phi i64 [ 0, %for.body13.preheader ], [ %indvars.iv.next, %for.body13 ] | |
| %iv = phi i64 [ 0, %entry ], [ %iv.next, %for.body13 ] |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| %arrayidx15 = getelementptr i8, ptr %src, i64 %indvars.iv | |
| %gep.src = getelementptr i8, ptr %src, i64 %indvars.iv |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count | |
| %ec = icmp eq i64 %indvars.iv.next, %wide.trip.count |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| for.cond.cleanup12: ; preds = %for.body13, %entry | |
| exit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name here is also confusing, as
Instimplies an instructions, while this is a cast recipe... Better name itCastR