http://llvm.org/bugs/show_bug.cgi?id=4589


Sterling Stuart Stein <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |




--- Comment #2 from Sterling Stuart Stein <[email protected]>  2009-07-19 
23:35:07 ---
Your comment is true, but missing the point.
If you add a target field, then the optimization works correctly.
I was able to duplicate what you gave in your post.
However, the difficult arises when the
target datalayout is not given.  Apparently, without it,
the optimization assumes 64-bit.

I understand that BitCode is not entirely platform independent.
However, it should refrain from making platform-specific
optimizations when it doesn't actually know what the platform is.
When you compile that code (without the 32-bit target datalayout)
on a 32-bit machine, it still compiles it as if it was
for a 64-bit machine.  Hence, it is a bug.

Side question: What's the advantage of saying GEP 8 over GEP 0,1 anyways?
Won't LLVM generate the same code either way (but with delaying the
offset calculation until it knows which platform it is on)?
Or do other optimizations depend on this somehow?


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to