[PATCH] D77201: [CodeGen][SelectionDAG] Flip Booleans More Often

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 3 11:53:44 PDT 2020


efriedma added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:2606
     case TargetLowering::ZeroOrOneBooleanContent:
       IsFlip = Const->isOne();
       break;
----------------
For consistency, we should probably change the ZeroOrOneBooleanContent case as well.  Not sure it has any practical impact, given the way we normally choose to build constants, but it would be easier to understand. Maybe move the `Const->getAPIntValue().sextOrTrunc(VT.getScalarSizeInBits())` expression out of the switch so it can be used in both cases.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77201/new/

https://reviews.llvm.org/D77201





More information about the llvm-commits mailing list