[PATCH] D43349: [InstCombine] Make SimplifyDemandedUseBits handle PhiNode

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 15 22:18:29 PST 2018


craig.topper added inline comments.


================
Comment at: lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp:473
 
+      if (SimplifyDemandedBits(I, 0, DemandedMaskIn, Known, Depth + 1))
+        return I;
----------------
This seems unrelated or at least unexplained.


================
Comment at: lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp:479
       if (cast<LShrOperator>(I)->isExact())
         DemandedMaskIn.setLowBits(ShiftAmt);
 
----------------
DemandedMaskIn isn't used after this.


================
Comment at: lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp:517
 
+      if (SimplifyDemandedBits(I, 0, DemandedMaskIn, Known, Depth + 1))
+        return I;
----------------
This as well?


https://reviews.llvm.org/D43349





More information about the llvm-commits mailing list