[llvm] [AArch64][GlobalISel] Take abs scalar codegen closer to SDAG (PR #84886)

Madhur Amilkanthwar via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 12 04:40:49 PDT 2024


madhur13490 wrote:

> Do you have an mca proof that smax is better than xor?

I understand the question but my intention of the patch is to take the codegen closer to what SDAG is doing. However, if you see the i8 case, it is not quite close yet and I am also not sure if the final assembly is right. Ideally, it should just be cmp+cneg (which is what SDAG) is doing.

If we get it closer to SDAG's codegen, then the benefit would be visible as Global ISel's current lowering leads to 3 instructions whereas SDAG is using just cmp+cneg.  
I am looking for suggestions around this.

https://github.com/llvm/llvm-project/pull/84886


More information about the llvm-commits mailing list