[llvm-commits] [llvm] r150978 - /llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp

Benjamin Kramer benny.kra at googlemail.com
Tue Feb 21 02:55:17 PST 2012


On 21.02.2012, at 09:10, Duncan Sands wrote:

> Hi Benjamin,
> 
>> InstCombine: Removing the base from the address calculation is only safe when the GEPs are inbounds.
> 
> since GEP is implicitly a signed computation, isn't this only true for signed
> comparisons?  I.e. mightn't an inbounds GEP overflow when viewed as an unsigned
> computation, leading to wrongness for unsigned comparisons?

Not sure if I understand. We're folding this to an index compare so the resulting icmp will always be signed. Also, overflow on inbounds GEPs is undefined behavior.

- Ben
> 
> Ciao, Duncan.
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits





More information about the llvm-commits mailing list