[clang] let Neon builtin function accept a const variable (PR #144625)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 19 09:29:52 PDT 2025


efriedma-quic wrote:

The NEON intrinsics specification (https://developer.arm.com/architectures/instruction-sets/intrinsics/vshl_n_s64) specifically says the argument must be an immediate in the specified range.  That's because it's supposed to map to an instruction which encodes the shift amount into the instruction itself.  We aren't allowed to accept anything else.

As I mentioned, there are other ways to write constructs with equivalent semantics.

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


More information about the cfe-commits mailing list