[LLVMbugs] [Bug 1757] Missed optimization: any number greater than two is not equal to two

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Tue Oct 30 00:26:30 PDT 2007


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


Anton Korobeynikov <asl at math.spbu.ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nicholas at mxc.ca
             Status|NEW                         |RESOLVED
         Resolution|                            |LATER




--- Comment #2 from Anton Korobeynikov <asl at math.spbu.ru>  2007-10-30 02:26:30 ---
Running opt -predsimplify results:

; ModuleID = '<stdin>'

declare i32 @asdf()

declare i32 @asdf2()

declare i32 @asdf3()

define i32 @myfunc(i32) {
EntryBlock:
        %.demorgan = icmp sgt i32 %0, 2         ; <i1> [#uses=1]
        br i1 %.demorgan, label %GreaterThanTwo, label %LessThanOrEqualToTwo

GreaterThanTwo:         ; preds = %EntryBlock
        br i1 false, label %Impossible, label %NotTwoAndGreaterThanTwo

NotTwoAndGreaterThanTwo:                ; preds = %GreaterThanTwo
        call i32 @asdf( )               ; <i32>:1 [#uses=0]
        ret i32 2

Impossible:             ; preds = %GreaterThanTwo
        call i32 @asdf2( )              ; <i32>:2 [#uses=0]
        ret i32 1

LessThanOrEqualToTwo:           ; preds = %EntryBlock
        call i32 @asdf3( )              ; <i32>:3 [#uses=0]
        ret i32 0
}

Unfortunately, predsimplify is not ready for enabling in the mainline.
Resolving as LATER.


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