[llvm] [DemandedBits] Support non-constant shift amounts for funnel shifts (PR #180569)
Panagiotis Karouzakis via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 6 21:25:18 PST 2026
karouzakisp wrote:
> > > Looks like this has no hits on llvm-opt-benchmark. Can you please provide some motivation for why it is practically useful to implement demanded bits support for non-constant funnel shifts?
> >
> >
> > That's correct.
> > After I've added statistics, I found ~200 hits across several real-world projects that belong to performance-critical domains.
> > The projects include:
> > ClamAV (LLVM test-suite), OpenSSL, LibSodium, ngtcp2, ffmpeg, and zstd.
> > These correspond to the following application areas:
> > Antivirus/Security: ClamAV, Cryptography: LibSodium, OpenSSL, Networking: ngtcp2, Compression: zstd. Multimedia domains: ffmpeg.
> > This isn't an exhaustive search, so there might be more real-world projects that contain similar patterns.
> > Given the presence of these operations in perfomance critical domains, the patch can enable additional simplifications.
>
> Did the statistics measure that simplifications occurred or just that funnel shifts with non-constant operands exist?
How many shifts exist with non-constant shift amounts.
https://github.com/llvm/llvm-project/pull/180569
More information about the llvm-commits
mailing list