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

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


craig.topper added inline comments.


================
Comment at: lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp:681
+      SimplifyDemandedBits(I, i, DemandedMask, PhiOperandKnown, Depth + 1);
+      IKnownZero = IKnownZero & PhiOperandKnown.Zero;
+      IKnownOne = IKnownOne & PhiOperandKnown.One;
----------------
Use "KnownZero &= PhiOperandKnown.Zero" it will save an allocation if the width is more than 64-bits.


https://reviews.llvm.org/D43349





More information about the llvm-commits mailing list