[llvm] r209746 - InstCombine: Improvement to check if signed addition overflows.

Rafael EspĂ­ndola rafael.espindola at gmail.com
Fri May 30 11:20:54 PDT 2014


> We can remove the symmetric call because we are sure that one of the operand
> is constant (as we are determining if we know each bit of one of the operand
> - one bit set to 1 and all other to 0), and constants are always arranged on
> RHS, despite their position in original IR. So the last call is not
> required.

I don't follow. How do you know it is a constant? Wasn't that check
delete in the current patch and we now handle any expression where we
are able to figure out the bits? Also, from your argument the second
call would be dead, but it changes the testcase result.

Cheers,
Rafael



More information about the llvm-commits mailing list