[clang] [Clang] feat: Allow AVX/AVX2 permute operations in constexpr (PR #172149)
Simon Pilgrim via cfe-commits
cfe-commits at lists.llvm.org
Sun Dec 14 05:44:27 PST 2025
================
@@ -5101,6 +5101,29 @@ bool InterpretBuiltin(InterpState &S, CodePtr OpPC, const CallExpr *Call,
unsigned SrcIdx = (ShuffleMask >> 6) & 0x1;
return std::pair<unsigned, int>{SrcIdx, Offset};
});
+ case X86::BI__builtin_ia32_vperm2f128_pd256:
+ case X86::BI__builtin_ia32_vperm2f128_ps256:
+ case X86::BI__builtin_ia32_vperm2f128_si256:
+ case X86::BI__builtin_ia32_permti256:
+ return interp__builtin_ia32_shuffle_generic(
+ S, OpPC, Call,
+ [BuiltinID, Call](unsigned DstIdx, unsigned ShuffleMask) {
+ unsigned NumElements =
----------------
RKSimon wrote:
This can be hoisted out of the callback
https://github.com/llvm/llvm-project/pull/172149
More information about the cfe-commits
mailing list