-
Notifications
You must be signed in to change notification settings - Fork 91
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
MADs can be obfuscated by clspv #1339
Comments
It prevents InstCombinePass from obfuscating MADs in some cases.
#1340 helps when the data types are scalar. But it does not help when the data types are vectors. Passing |
Yes Maybe we should consider adding something in https://github.com/google/clspv/blob/main/lib/UndoInstCombinePass.cpp? |
@olvaffe interesting.. can share perf numbers in clpeak scalar tests with and without your patch? to get an idea of expexted perf speedups.. |
The perf numbers doubled for It sounds like UndoInstCombinePass.cpp might be a better place to undo the combining. I can certainly look into that. |
clpeak has benchmarks whose kernels resemble
clang optimizes the loop body to
which is still easy enough for vulkan drivers to work out it is two MADs.
But clspv optimizes the loop body to
which is much harder for vulkan drivers to optimize.
Dumping the IR after each pass, the difference is due to the two early
InstCombinePass
added by clspv.The text was updated successfully, but these errors were encountered: