[clang] [X86][ByteCode] Allow PSHUFB intrinsics to be used in constexpr #156612 (PR #163148)
Shafik Yaghmour via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 20 16:47:48 PDT 2025
================
@@ -2790,6 +2790,34 @@ static bool interp__builtin_blend(InterpState &S, CodePtr OpPC,
return true;
}
+static bool interp__builtin_ia32_pshufb(InterpState &S, CodePtr OpPC,
+ const CallExpr *Call) {
+ assert(Call->getNumArgs() == 2 && "masked forms handled via select*");
+ const Pointer &Control = S.Stk.pop<Pointer>();
+ const Pointer &Src = S.Stk.pop<Pointer>();
+ const Pointer &Dst = S.Stk.peek<Pointer>();
+
+ unsigned NumElems = Dst.getNumElems();
+ assert(NumElems == Control.getNumElems());
+ assert(NumElems == Dst.getNumElems());
----------------
shafik wrote:
You are asserting the assignment right before the asserts? Was that what you meant to do?
https://github.com/llvm/llvm-project/pull/163148
More information about the cfe-commits
mailing list