An ARMISD::ADDC (which is really an ADDS), for which the flags (second output value) are never used is equivalent to a normal ADD. Same goes for ARMISD:SUBC -> SUB, which helps prevent an infinite loop during DAG combining.
Details
Details
Diff Detail
Diff Detail
Unit Tests
Unit Tests
Event Timeline
Comment Actions
I missed a couple of tests here, where uadd.sat is a little worse now as it does not realize it can fold conditions any more after creating add, as opposed to adds.
In the meantime, before that is fixed, I've put a simpler fix in a2332d5332c3ede49adf1c71481e9efab7ca88c7 to prevent the infinite combining.
clang-format: please reformat the code