================ @@ -13455,6 +13455,10 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const CallExpr *E, case Builtin::BI__lzcnt16: // Microsoft variants of count leading-zeroes case Builtin::BI__lzcnt: case Builtin::BI__lzcnt64: { + // TODO: Handle boolean vectors in constexpr contexts. + if (E->getArg(0)->getType()->isExtVectorBoolType()) + return false; ---------------- rjmccall wrote:
Is it okay to just return false here without indicating why? The other places nearby that return false are recursive calls, so presumably they indicate why before returning. Also, implementing these should be really straightforward — you just call `EvaluateVector` into a temporary `APValue`, and if that succeeds, you know it'll be a vector and the elements will be simple integer `APValue`s. I think it's reasonable to just ask for it to be done in this patch. https://github.com/llvm/llvm-project/pull/154203 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits