-
Notifications
You must be signed in to change notification settings - Fork 747
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
[SYCL][E2E] Ensuring lowering of llvm.bitreverse is functionally correct #12774
[SYCL][E2E] Ensuring lowering of llvm.bitreverse is functionally correct #12774
Conversation
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.
I will leave in-depth review of the test logic to others.
@@ -0,0 +1,189 @@ | |||
// Test that llvm.bitreverse is lowered correctly by llvm-spirv | |||
|
|||
// RUN: %{build} -o %t.O2.out -O2 |
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.
Do we really need to pass O2 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.
Optimization is necessary to ensure that functions are recognized as having bitreverse functionality and optimized in LLVM IR to llvm.bitreverse.* intrinsics.
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.
-O2 would not be necessary if we could use __builtin_elementwise_bitreverse for all cases, but there is an issue with this builtin for 8-bit and 16-bit types.
cb85914
to
8d85758
Compare
There are a few remaining questions/issues with this testcase:
|
3581e87
to
e9f0c61
Compare
llvm-spirv changes to lower llvm.bitreverse.* have been pulled in. Thus, test is no longer a draft and ready for review. |
Signed-off-by: Lu, John <john.lu@intel.com>
Signed-off-by: Lu, John <john.lu@intel.com>
…explicitly disabling SPV_KHR_bit_instructions passes Signed-off-by: Lu, John <john.lu@intel.com>
…vm.bitreverse is not supported Signed-off-by: Lu, John <john.lu@intel.com>
e9f0c61
to
6565498
Compare
Signed-off-by: Lu, John <john.lu@intel.com>
Signed-off-by: Lu, John <john.lu@intel.com>
Signed-off-by: Lu, John <john.lu@intel.com>
Signed-off-by: Lu, John <john.lu@intel.com>
Signed-off-by: Lu, John <john.lu@intel.com>
Signed-off-by: Lu, John <john.lu@intel.com>
Signed-off-by: Lu, John <john.lu@intel.com>
Ensure that lowering of llvm.bitreverse* intrinsics by llvm-spirv is functionally correct.