[PATCH] D50168: [Builtins] Implement __builtin_clrsb to be compatible with gcc

Benjamin Kramer via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 7 14:02:15 PDT 2018


bkramer added a comment.

Test case?



================
Comment at: lib/CodeGen/CGBuiltin.cpp:1563
+    Value *Result = Builder.CreateCall(F, {Tmp, Builder.getTrue()});
+    if (Result->getType() != ResultType)
+      Result = Builder.CreateIntCast(Result, ResultType, /*isSigned*/true,
----------------
CreateIntCast just does nothing if the types match, so this check isn't needed.


https://reviews.llvm.org/D50168





More information about the cfe-commits mailing list