[PATCH] D33391: [DAGCombine] fold (add/uaddo (xor a, -1), 1) -> (sub 0, a)
Amaury SECHET via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 22 20:39:38 PDT 2017
deadalnix added inline comments.
================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:2095
+ return DAG.getNode(ISD::USUBO, DL, N->getVTList(),
+ DAG.getConstant(0, DL, VT), N0.getOperand(0));
+
----------------
efriedma wrote:
> Are you sure this sets the overflow bit correctly?
You made me doubt, so I put some test together, and it does indeed overflow correctly.
https://reviews.llvm.org/D33391
More information about the llvm-commits
mailing list