[clang] [X86][bytecode] Allow SSE/AVX BLENDVPD/PD intrinsics to be used in constexpr (PR #157126)
Timm Baeder via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 5 08:57:11 PDT 2025
================
@@ -3421,6 +3421,17 @@ bool InterpretBuiltin(InterpState &S, CodePtr OpPC, const CallExpr *Call,
return F;
});
+ case clang::X86::BI__builtin_ia32_blendvpd:
+ case clang::X86::BI__builtin_ia32_blendvpd256:
+ case clang::X86::BI__builtin_ia32_blendvps:
+ case clang::X86::BI__builtin_ia32_blendvps256:
+ return interp__builtin_elementwise_triop_fp(
+ S, OpPC, Call,
+ [](const APFloat &F, const APFloat &T, const APFloat &C,
+ llvm::RoundingMode) {
+ return C.bitcastToAPInt().isNegative() ? T : F;
----------------
tbaederr wrote:
Is the bitcast here really needed?
https://github.com/llvm/llvm-project/pull/157126
More information about the cfe-commits
mailing list