[llvm] r212164 - InstCombine: Don't turn -(x/INT_MIN) -> x/INT_MIN

Jasper Neumann jn at sirrida.de
Wed Jul 2 22:55:39 PDT 2014


Hello Chandler!

 >> cmpl $-2147483648, %edi
sete %al
movzbl %al, %eax

> There has to be a less crazy way to test for -1
 > ...encoding this massive immediate makes me sad.

What about this?:
negl %edi
seto %al
movzbl %al, %eax

Unfortunately edi gets trashed.

Best regards
Jasper



More information about the llvm-commits mailing list