[LLVMbugs] [Bug 22856] New: Invalid IR generated at -O1 and above (instruction does not dominate uses)

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Mar 9 09:53:35 PDT 2015


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: unassignedbugs at nondot.org
          Reporter: andrew.b.adams at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150309/c73a894a/attachment.html>


More information about the llvm-bugs mailing list