-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[AMDGPU] Lower __builtin_amdgcn_read_exec_hi to use amdgcn_ballot #69567
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 |
---|---|---|
|
@@ -526,7 +526,9 @@ void test_read_exec_lo(global uint* out) { | |
// CHECK: declare i32 @llvm.amdgcn.ballot.i32(i1) #[[$NOUNWIND_READONLY:[0-9]+]] | ||
|
||
// CHECK-LABEL: @test_read_exec_hi( | ||
// CHECK: call i32 @llvm.amdgcn.ballot.i32(i1 true) | ||
// CHECK: call i64 @llvm.amdgcn.ballot.i64(i1 true) | ||
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. needs wave32 and wave64 tests. These ballot tests belong in builtins-amdgcn-wave32.cl and builtins-amdgcn-wave64.cl 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. moved to respected wave32.cl and wave64.cl tests. |
||
// CHECK: lshr i64 [[A:%.*]], 32 | ||
// CHECK: trunc i64 [[B:%.*]] to i32 | ||
void test_read_exec_hi(global uint* out) { | ||
*out = __builtin_amdgcn_read_exec_hi(); | ||
} | ||
|
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.
Does this codegen on wave32? Or should this directly emit 0?
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.
Yes, this is generated codegen on wave32.