[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
Mon Aug 15 08:11:47 PDT 2016


spatel added inline comments.

================
Comment at: lib/Transforms/InstCombine/InstCombineCalls.cpp:1473-1475
@@ -1457,7 +1472,5 @@
 
   case Intrinsic::cttz:
   case Intrinsic::ctlz:
-    if (Value *V = foldCttzCtlz(*II, *this))
-      return replaceInstUsesWith(*II, V);
-    break;
+    return foldCttzCtlz(*II, *this);
 
----------------
In the case where no change is made, we want to continue on in this function:
  if (Instruction *I = foldCttzCtlz(*II, *this))
    return I;
  break;


https://reviews.llvm.org/D23134





More information about the llvm-commits mailing list