[PATCH] D96622: [DAG] PromoteIntRes_ADDSUBSHLSAT - use promoted ISD::USUBSAT directly
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 12 11:44:00 PST 2021
nikic added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:810
+ return DAG.getNode(ISD::USUBSAT, dl, PromotedType, Op1Promoted,
+ Op2Promoted);
}
----------------
Structurally, it might make sense to move the USUBSAT check before the `IsShift || TLI.isOperationLegalOrCustom(Opcode, PromotedType)` branch, as we'll now unconditionally take it. In that case you also don't need to change the shift code, and can keep the llvm_unreachable in there (not sure if you switch as written may generate warnings).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96622/new/
https://reviews.llvm.org/D96622
More information about the llvm-commits
mailing list