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

            Bug ID: 22856
           Summary: Invalid IR generated at -O1 and above (instruction
                    does not dominate uses)
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Loop Optimizer
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

Created attachment 14012
  --> http://llvm.org/bugs/attachment.cgi?id=14012&action=edit
failing test case

Some pass appears to be making invalid IR for the attached reduced test case.
Compiles fine with -O0. -print-after-all reveals the following invalid basic
block appearing after codegen prepare:

block_C:                                          ; preds = %block_E, %block_A
  %iv3 = phi i64 [ %2, %block_E ], [ %0, %block_A ]
  %lsr = trunc i64 %2 to i32
  %1 = add nsw i64 %iv3, 2
  %2 = add nsw i64 %iv3, 1
  br i1 undef, label %block_D, label %block_E

%2 is used before it is defined

I made a guess that something goes awry in the loop optimizer.

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