[LLVMbugs] [Bug 4436] New: scev expander produces invalid code

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Tue Jun 23 21:57:56 PDT 2009


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

           Summary: scev expander produces invalid code
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Loop Optimizer
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: nicholas at mxc.ca
                CC: gohman at apple.com, llvmbugs at cs.uiuc.edu


Created an attachment (id=3118)
 --> (http://llvm.org/bugs/attachment.cgi?id=3118)
testcase

The attached bugpoint-reduced testcase demonstrates some breakage:

$ opt -indvars b.bc
WARNING: You're attempting to print out a bitcode file.
This is inadvisable as it may cause display problems. If
you REALLY want to taste LLVM bitcode first-hand, you
can force output with the `-f' option.

Instruction does not dominate all uses!
        %0 = load i32* undef, align 4           ; <i32> [#uses=3]
        %tmp = sub i32 0, %0            ; <i32> [#uses=1]
Instruction does not dominate all uses!
        %tmp = sub i32 0, %0            ; <i32> [#uses=1]
        %tmp2 = add i32 %tmp, -1                ; <i32> [#uses=2]
Instruction does not dominate all uses!
        %tmp2 = add i32 %tmp, -1                ; <i32> [#uses=2]
        %tmp3 = icmp ugt i32 -1, %tmp2          ; <i1> [#uses=1]
Instruction does not dominate all uses!
        %tmp3 = icmp ugt i32 -1, %tmp2          ; <i1> [#uses=1]
        %umax = select i1 %tmp3, i32 -1, i32 %tmp2              ; <i32>
[#uses=1]
Instruction does not dominate all uses!
        %umax = select i1 %tmp3, i32 -1, i32 %tmp2              ; <i32>
[#uses=1]
        %tmp4 = sub i32 0, %umax                ; <i32> [#uses=1]
Instruction does not dominate all uses!
        %tmp4 = sub i32 0, %umax                ; <i32> [#uses=1]
        %tmp5 = add i32 %tmp4, -1               ; <i32> [#uses=1]
Instruction does not dominate all uses!
        %tmp5 = add i32 %tmp4, -1               ; <i32> [#uses=1]
        %tmp56 = inttoptr i32 %tmp5 to i8*              ; <i8*> [#uses=1]
Broken module found, compilation aborted!
0   opt 0x08427892
1   opt 0x08427dc5
2       0xffffe400 __kernel_sigreturn + 0
Stack dump:
0.      Running pass 'Function Pass Manager' on module 'b.bc'.
1.      Running pass 'Module Verifier' on function '@string_expandtabs'
Aborted


You can see what it's producing with "opt -indvars b.bc --disable-verify |
llvm-dis".


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