[clang] [Headers][X86] Enable constexpr handling for pmulhw/pmulhuw intrinsics (PR #152540)

Phoebe Wang via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 7 20:47:14 PDT 2025


================
@@ -11653,6 +11659,18 @@ bool VectorExprEvaluator::VisitCallExpr(const CallExpr *E) {
             APSInt(LHS.isSigned() ? LHS.ssub_sat(RHS) : LHS.usub_sat(RHS),
                    DestEltTy->isUnsignedIntegerOrEnumerationType())));
         break;
+      case clang::X86::BI__builtin_ia32_pmulhuw128:
+      case clang::X86::BI__builtin_ia32_pmulhuw256:
+      case clang::X86::BI__builtin_ia32_pmulhuw512:
+        ResultElements.push_back(APValue(APSInt(llvm::APIntOps::mulhu(LHS, RHS),
----------------
phoebewang wrote:

Should the input and output types be unsigned?

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


More information about the cfe-commits mailing list