[LLVMbugs] [Bug 1795] New: Missed optimization: eliminating loads around ptrtoint/ inttoptr
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Tue Nov 13 10:13:23 PST 2007
http://llvm.org/bugs/show_bug.cgi?id=1795
Summary: Missed optimization: eliminating loads around
ptrtoint/inttoptr
Product: new-bugs
Version: unspecified
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: enhancement
Priority: P2
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: sharparrow1 at yahoo.com
CC: llvmbugs at cs.uiuc.edu
define void @myfunc(i32 %.val24) {
EntryBlock:
add i32 %.val24, -12
inttoptr i32 %0 to i32*
store i32 1, i32* %1
add i32 %.val24, -16
inttoptr i32 %2 to i32*
getelementptr i32* %3, i32 1
load i32* %4
tail call i32 @ZZZ( i32 %5 )
ret void
}
The "load i32* %4" always results in a "1", so it should be possible to
optimize it out (on x86).
At one point I had a hack in my tree to push addition forwards across inttoptr
instances in VisitIntToPtr, but I'm not sure if that's the right approach.
--
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.
More information about the llvm-bugs
mailing list