[LLVMdev] ipsccp vs getelementptr

Jay Foad jay.foad at gmail.com
Wed Jan 6 06:41:22 PST 2010


> From looking at the debug output, IPSCCP works out that the result of
> the call to @f will be:
>
> i8* getelementptr ([1 x i8]* @str, i32 0, i32 1)
>
> which is compared with:
>
> i8* getelementptr ([1 x i8]* @str, i32 1, i32 0)
>
> and it thinks that these two expressions are different, so the
> comparison will return false.
>
> I can see that these two getelementptr expressions don't have exactly
> the same indexes in the same place, but surely they both evaluate to
> the same thing, namely one byte after the start of @str, so they
> should be considered equal?

I see that this has already been fixed here:

http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090907/086867.html

Sorry for the noise!

Thanks,
Jay.



More information about the llvm-dev mailing list