[PATCH] D23134: Make cltz and cttz zero undef when the operand cannot be zero in InstCombine
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 10 13:26:56 PDT 2016
spatel added inline comments.
================
Comment at: lib/Transforms/InstCombine/InstCombineCalls.cpp:1141
@@ +1140,3 @@
+ if (!match(II.getArgOperand(1), m_One())) {
+ IC.Worklist.Add(&II);
+ II.setOperand(1, IC.Builder->getTrue());
----------------
Shouldn't this return the updated instruction to signal to the callers that a change was made? If we do that, then we don't need to explicitly add to the worklist either, right?
https://reviews.llvm.org/D23134
More information about the llvm-commits
mailing list