[PATCH] D60020: [DAGCombiner][X86][SystemZ] Canonicalize SSUBO with immediate RHS to SADDO by negating the immediate.
Dan Robertson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 2 18:31:28 PDT 2019
dlrobertson added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:3047
+ // fold (subox, c) -> (addo x, -c)
+ if (IsSigned && N1C && !N1C->getAPIntValue().isMinSignedValue()) {
+ return DAG.getNode(ISD::SADDO, DL, N->getVTList(), N0,
----------------
I don't think this path would be hit post-D60061 right? Would this be for the case that `opt` is run without `instcombine`?
Also D60061 uses `Constant` and `isNotMinSignedValue`. Is there a reason not to use `N1C->getConstantIntValue()->isNotMinSignedValue` here too? Are there pros/cons to either one?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60020/new/
https://reviews.llvm.org/D60020
More information about the llvm-commits
mailing list