[PATCH] D97325: [LegalizeIntegerTypes] Further improve ExpandIntRes_SADDSUBO for targets where SADDO/SSUBO aren't supported.
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 24 02:28:05 PST 2021
RKSimon accepted this revision.
RKSimon added a comment.
This revision is now accepted and ready to land.
LGTM with one minor
================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:3687
+ SDValue SignsMatch = DAG.getNode(ISD::XOR, dl, VT, LHS, RHS);
+ if (Node->getOpcode() == ISD::SADDO)
+ SignsMatch = DAG.getNOT(dl, SignsMatch, VT);
----------------
This "Node->getOpcode() == ISD::SADDO" is done several times in ExpandIntRes_SADDSUBO now (including a switch that can probably be reduced to an assert + compares).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97325/new/
https://reviews.llvm.org/D97325
More information about the llvm-commits
mailing list