llvm-project
d8f89617 - [AArch64] Improve lowering of scalar abs(sub(a, b)). (#151180)

Commit
57 days ago
[AArch64] Improve lowering of scalar abs(sub(a, b)). (#151180) This patch avoids a comparison against zero when lowering abs(sub(a, b)) patterns, instead reusing the condition codes generated by a subs of the operands directly. For example, currently: ``` sxtb w8, w0 sub w8, w8, w1, sxtb cmp w8, #0 cneg w0, w8, mi ``` becomes: ``` sxtb w8, w0 subs w8, w8, w1, sxtb cneg w0, w8, mi ``` Together with #151177, this should handle the remaining patterns in #118413.
Author
Parents
Loading