[PATCH] D46505: [DAGcombine] Teach the combiner about -a = ~a + 1
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 9 08:18:28 PDT 2018
RKSimon added inline comments.
================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:2199
+static SDValue flipBooleanConstant(const SDLoc &DL, EVT VT, SelectionDAG &DAG,
+ const TargetLowering &TLI) {
+ switch(TLI.getBooleanContents(VT)) {
----------------
Move this inside flipBoolean() ?
================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:2263
+ // fold (uaddo (xor a, -1), 1) -> (usub 0, a) and flip carry
+ if (N0.getOpcode() == ISD::XOR &&
----------------
full stop: // fold (uaddo (xor a, -1), 1) -> (usub 0, a) and flip carry.
Repository:
rL LLVM
https://reviews.llvm.org/D46505
More information about the llvm-commits
mailing list