[PATCH] D38832: [X86][SelectionDAG] Add support for simplifying demanded bits of target nodes. Use it to simplify demanded bits of CMOV
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 12 08:34:29 PDT 2017
craig.topper added inline comments.
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:27268
+ switch (Opc) {
+ case X86ISD::CMOV: {
+ if (SimplifyDemandedBits(Op.getOperand(1), DemandedMask, Known, TLO,
----------------
RKSimon wrote:
> Do we have test cases for all of these?
My primary interest was in the constant simplification. It looks like we may not have any real tests for the two recursive calls.
Maybe I'll remove those for now and add a fixme.
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:27322
+ return TargetLowering::SimplifyDemandedBitsForTargetNode(Op, DemandedMask,
+ Known, TLO, Depth);
+}
----------------
RKSimon wrote:
> For the other 'ForTargetNode' style calls we don't do a 'drop through' to the base class - should we match that approach here?
The default implementation was less trivial than the other 2 cases so I wasn't sure if we wanted to replicate that code.
https://reviews.llvm.org/D38832
More information about the llvm-commits
mailing list