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

suyog sarda sardask01 at gmail.com
Fri May 30 11:51:40 PDT 2014


On Fri, May 30, 2014 at 11:50 PM, Rafael EspĂ­ndola <
rafael.espindola at gmail.com> wrote:

> > 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.
>

Ah ! Sorry, we are unsure of only one bit while we know that other bits are
all zero (Implementation of
Jingyue Wu comment).

Strangely though, removing the symmetric call gives good result of
test-func.ll you had provided (I donno how but it works, even though the
second call would be dead).
Can you please confirm it? Also can we confirm regarding sanitizer and arm
built bot crashes with updated patch?
If this works well, we can remove second call and add a FIXME regarding
same.


-- 
With regards,
Suyog Sarda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140531/512d6363/attachment.html>


More information about the llvm-commits mailing list