[llvm] [InstCombine] Optimistically allow multiple shufflevector uses in foldOpPhi (PR #114278)

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 19 16:15:24 PST 2024


MatzeB wrote:

Here's the simpler version just optimistically transforming `shufflevector(phi(shufflevector()))` ignoring number of uses on the phi.

I did `llvm-test-suite` builds with/without this change and it only affected codegen in 6 benchmarks[1]. I was not able to measure any performance difference above noise level and inspecting the assembly I saw a couple shuffles moving out of loops, a bunch of churn that I couldn't whether it's better/worse, but also did not see anything obviously worse.

So worth a try optimistically enabling this.

[1]
External/SPEC/CFP2006/447.dealII/447.dealII.test
External/SPEC/CFP2006/453.povray/453.povray.test
External/SPEC/CINT2006/464.h264ref/464.h264ref.test
MultiSource/Benchmarks/Bullet/bullet.test
MultiSource/Applications/JM/lencod/lencod.test
MultiSource/Benchmarks/DOE-ProxyApps-C++/CLAMR/CLAMR.test

https://github.com/llvm/llvm-project/pull/114278


More information about the llvm-commits mailing list