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

           Summary: simple loop pessimized by -std-compile-opts
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Loop Optimizer
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected]


This simple program:

define void @test(i32 %x, i32** %y) {
entry:
        br label %loop

loop:           ; preds = %loop, %entry
        %tmp = phi i32 [ 0, %entry ], [ %tmp1, %loop ]          ; <i32>
[#uses=1]
        %tmp1 = add i32 %tmp, 1         ; <i32> [#uses=2]
        %my = malloc i32                ; <i32*> [#uses=1]
        %z = getelementptr i32** %y, i32 %tmp
        store i32* %my, i32** %z
        %done = icmp eq i32 %tmp1, %x           ; <i1> [#uses=1]
        br i1 %done, label %out, label %loop

out:            ; preds = %loop
        ret void
}

is rewritten to use i64 induction variable and then zext/sext/trunc is added
all over to fix it up. On x86 the resulting .s is much worse.


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