HomePhabricator

[ARM] Combine sub 0, csinc X, Y, CC -> csinv -X, Y, CC

Authored by dmgreen on Fri, Apr 16, 3:52 AM.

Description

[ARM] Combine sub 0, csinc X, Y, CC -> csinv -X, Y, CC

Combine sub 0, csinc X, Y, CC to csinv -X, Y, CC providing that the
negation of X is cheap, currently just handling constants. This comes up
during the splat of an i1 to a predicate, where we now generate csetm,
as opposed to cset; rsb.

Differential Revision: https://reviews.llvm.org/D99940

Details