[PATCH] D38832: [X86][SelectionDAG] Add support for simplifying demanded bits of target nodes. Use it to simplify demanded bits of CMOV

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 28 08:55:59 PDT 2017


RKSimon added inline comments.


================
Comment at: lib/Target/X86/X86ISelLowering.cpp:27322
+  return TargetLowering::SimplifyDemandedBitsForTargetNode(Op, DemandedMask,
+                                                           Known, TLO, Depth);
+}
----------------
craig.topper wrote:
> 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.
If you drop the early break after the SimplifyDemandedBitsForTargetNode call in TargetLowering::SimplifyDemandedBits then you should be able to remove this and the extra code in TargetLowering::SimplifyDemandedBitsForTargetNode?


https://reviews.llvm.org/D38832





More information about the llvm-commits mailing list