[clang] [X86] Allow PSHUFD/PSHUFLW/PSHUFW intrinsics in constexpr. (PR #161210)

Simon Pilgrim via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 29 08:01:34 PDT 2025


================
@@ -2862,6 +2862,218 @@ static bool interp__builtin_blend(InterpState &S, CodePtr OpPC,
   return true;
 }
 
+static bool interp__builtin_ia32_pshuflw_common(InterpState &S, CodePtr OpPC,
+                                                const CallExpr *Call) {
----------------
RKSimon wrote:

We should be able to handle all the pshuflw/hw/d builtins with a single call (interp__builtin_ia32_pshuf?) - just need to provide a lane-element offset for PSHUFHW intrinsics. And everything else can be deducible from the destination type

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


More information about the cfe-commits mailing list