[PATCH] D23134: Make cltz and cttz zero undef when the operand cannot be zero in InstCombine

David Majnemer via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 9 23:37:11 PDT 2016


majnemer added inline comments.

================
Comment at: lib/Transforms/InstCombine/InstCombineCalls.cpp:1143
@@ +1142,3 @@
+      IC.Worklist.Add(&II);
+      II.setOperand(1, ConstantInt::getAllOnesValue(Op1->getType()));
+    }
----------------
I'd use IRBuilder's `getTrue` here.


https://reviews.llvm.org/D23134





More information about the llvm-commits mailing list