[PATCH] D31715: [SelectionDAG] TargetLowering::SimplifyDemandedBits how to properly calculate KnownZero bits for ISD::SETCC and ISD::AssertZExt

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 10 11:05:41 PDT 2017


RKSimon added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/TargetLowering.cpp:794
     }
+    if (getBooleanContents(Op.getOperand(0).getValueType()) ==
+            TargetLowering::ZeroOrOneBooleanContent &&
----------------
craig.topper wrote:
> RKSimon wrote:
> > RKSimon wrote:
> > > Use Op0 directly?
> > Come to think of it - why are you testing the input op type and not the result type (Op.getValueType()) like above?
> I sort of wondered that too, but I just copied the code out of computeKnownBits
I think this needs fixing first - I made the change in computeKnownBits and it affected a number of MIPS tests - I'll have a look at what is going on.


https://reviews.llvm.org/D31715





More information about the llvm-commits mailing list