-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[llvm] Remove br i1 undef
in llvm/test/CodeGen
tests
#127368
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 all commits
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 |
---|---|---|
|
@@ -10,9 +10,9 @@ | |
; | ||
; GCN: s_endpgm | ||
|
||
define amdgpu_ps void @main(i32 %in1) local_unnamed_addr { | ||
define amdgpu_ps void @main(i32 %in1, i1 %arg) local_unnamed_addr { | ||
.entry: | ||
br i1 undef, label %bb12, label %bb | ||
br i1 %arg, label %bb12, label %bb | ||
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. This is a change from a uniform branch to a divergent branch. To closer emulate the original scenario, this should use an i32 inreg argument and an icmp to get the condition 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. @arsenm Thanks for the review. The following changes work fine.
If this is okay, I will update this in the next PR. |
||
|
||
bb: | ||
%__llpc_global_proxy_r5.12.vec.insert = insertelement <4 x i32> undef, i32 %in1, i32 3 | ||
|
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.
This says
; Make sure we don't end up with a CBNZ of an undef v-/phys-reg
, which this is no longer testing. (It didn't have any check lines before though, I assume it was guarding against an assert/crash).Using
poison
is maybe better here.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.
Thanks @davemgreen. I updated this.