[clang] [X86][Clang] Support constexpr evaluation of cvtpd2ps intrinsics (PR #169980)

Simon Pilgrim via cfe-commits cfe-commits at lists.llvm.org
Sun Nov 30 08:38:06 PST 2025


================
@@ -24,12 +24,12 @@ def undef128 : X86Builtin<"_Vector<2, double>()"> {
   let Attributes = [Const, NoThrow, RequiredVectorWidth<128>];
 }
 
-def undef256 : X86Builtin<"_Vector<4, double>()"> {
-  let Attributes = [Const, NoThrow, RequiredVectorWidth<256>];
+def undef256 : X86Builtin<"_Vector<4, double>()"  > {
+  let Attributes = [Const, Constexpr, NoThrow, RequiredVectorWidth<256>];
----------------
RKSimon wrote:

Currently the plan is not to allow the undef builtins to be used in constexpr, if these are required for any of the pd2ps intrinsics you will have to tweak the implementation.

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


More information about the cfe-commits mailing list