[clang] [clang] Implement __builtin_{clzg,ctzg} (PR #83431)

via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 29 15:35:50 PST 2024


================
@@ -3157,7 +3177,15 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
     if (Result->getType() != ResultType)
----------------
overmighty wrote:

Since in the additions below I check if the argument itself is zero instead of checking the result of `ctlz`, I don't see why the `ctlz` result for zero being undefined would be a problem.

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


More information about the cfe-commits mailing list