[clang] [Clang] feat: Allow AVX/AVX2 permute operations in constexpr (PR #172149)
Timm Baeder via cfe-commits
cfe-commits at lists.llvm.org
Sat Dec 13 13:13:48 PST 2025
================
@@ -5101,6 +5101,36 @@ 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:
+ return interp__builtin_ia32_shuffle_generic(
+ S, OpPC, Call, [](unsigned DstIdx, unsigned ShuffleMask) {
+ unsigned i = DstIdx >> 1;
----------------
tbaederr wrote:
```suggestion
unsigned I = DstIdx >> 1;
```
https://github.com/llvm/llvm-project/pull/172149
More information about the cfe-commits
mailing list