[LLVMbugs] [Bug 1795] Missed optimization: eliminating loads around ptrtoint/inttoptr

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Mon Jan 7 23:25:37 PST 2008


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


Chris Lattner <sabre at nondot.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
          Component|new bugs                    |Scalar Optimizations
            Product|new-bugs                    |libraries
         Resolution|                            |FIXED
   Target Milestone|---                         |2.2
            Version|unspecified                 |1.0




--- Comment #3 from Chris Lattner <sabre at nondot.org>  2008-01-08 01:25:36 ---
Implemented:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20080107/056960.html

$ llvm-as < pr1795.ll | opt -instcombine -gvn | llvm-dis 

produces:

define void @myfunc(i32 %.val24) {
EntryBlock:
        %tmp1 = inttoptr i32 %.val24 to i32*            ; <i32*> [#uses=1]
        getelementptr i32* %tmp1, i32 -3                ; <i32*>:0 [#uses=1]
        store i32 1, i32* %0
        tail call i32 @ZZZ( i32 1 )             ; <i32>:1 [#uses=0]
        ret void
}


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