[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:44 PDT 2017
RKSimon accepted this revision.
RKSimon added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: lib/CodeGen/SelectionDAG/TargetLowering.cpp:794
}
+ if (getBooleanContents(Op.getOperand(0).getValueType()) ==
+ TargetLowering::ZeroOrOneBooleanContent &&
----------------
RKSimon wrote:
> 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.
False alarm - it's doing what its supposed to and is using the input type correctly to call TLI::getBooleanContents
https://reviews.llvm.org/D31715
More information about the llvm-commits
mailing list