================
@@ -12367,8 +12368,17 @@ bool IntExprEvaluator::VisitBuiltinCallExpr(const 
CallExpr *E,
                            BuiltinOp != Builtin::BI__lzcnt &&
                            BuiltinOp != Builtin::BI__lzcnt64;
 
-    if (ZeroIsUndefined && !Val)
-      return Error(E);
+    if (!Val) {
----------------
overmighty wrote:

Oh yeah I messed up my last reply after rewording part of it. The builtins only 
make use of the second argument if the first argument is zero, and they just 
return it directly and not its leading/trailing zero count.

https://github.com/llvm/llvm-project/pull/86577
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to