[DAG] ExpandIntRes_ADDSUB - create UADDO/USUBO instead of ADDCARRY/SUBCARRY if overfl...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 23 Jul 2022 10:13:37 +0000 (11:13 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 23 Jul 2022 10:13:44 +0000 (11:13 +0100)
commit2421a5af72e7da7c29fd153dcee0981deaaeba64
treeea544602e7a82f6a8a0ab0d8371b2db3c9addc70
parent2bfb0fcb51510f22723c8cdfefe2a796a0a5ab25
[DAG] ExpandIntRes_ADDSUB - create UADDO/USUBO instead of ADDCARRY/SUBCARRY if overflow is known to be zero

As noticed on D127115, when splitting ADD/SUB nodes we often end up with cases where overflow from the lower bits is impossible - in such cases we're better off breaking the carry chain dependency as soon as possible.

This path is being exercised by llvm/test/CodeGen/ARM/dsp-mlal.ll, although I haven't been able to get any codegen diff without a topological worklist.
llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp