[clang] [X86][Clang] VectorExprEvaluator::VisitCallExpr / InterpretBuiltin - allow SSE/AVX COMI/UCOMI/CMPS/CMPP fp comparison intrinsics to be used in constexpr (PR #182589)
Simon Pilgrim via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 14 03:02:47 PDT 2026
================
@@ -4378,6 +4379,69 @@ static bool interp__builtin_ia32_gfni_mul(InterpState &S, CodePtr OpPC,
return true;
}
+static bool interp__builtin_x86_comi(InterpState &S, CodePtr OpPC,
+ const InterpFrame *Frame,
+ const CallExpr *Call, unsigned ID,
+ uint64_t Predicate) {
+ const Pointer &VectorB = S.Stk.pop<Pointer>();
+ const Pointer &VectorA = S.Stk.pop<Pointer>();
+
+ if (VectorA.getNumElems() == 0 ||
----------------
RKSimon wrote:
Is VectorA.getNumElems() == 0 necessary? the (u)comi builtins are very type limited and semchecking should already error out
https://github.com/llvm/llvm-project/pull/182589
More information about the cfe-commits
mailing list