[clang] [Clang] Add constexpr support for AVX512 permutex2 intrinsics (PR #165085)

Simon Pilgrim via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 29 07:17:09 PDT 2025


================
@@ -4345,6 +4373,60 @@ bool InterpretBuiltin(InterpState &S, CodePtr OpPC, const CallExpr *Call,
           unsigned Index = (ShuffleMask >> BitIndex) & IndexMask;
           return std::pair<unsigned, unsigned>{SrcIdx, LaneOffset + Index};
         });
+  case X86::BI__builtin_ia32_vpermi2varq128:
+  case X86::BI__builtin_ia32_vpermi2varpd128:
+    return interp__builtin_ia32_shuffle_generic(
+        S, OpPC, Call, [](unsigned DstIdx, unsigned ShuffleMask) {
+          unsigned offset = ShuffleMask & 0x1;
----------------
RKSimon wrote:

(style) Capitalize variable first letter (same for below)
```suggestion
          unsigned Offset = ShuffleMask & 0x1;
```

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


More information about the cfe-commits mailing list