[LLVMbugs] [Bug 13999] New: Register coalescer fails with: Assertion `V.RedefVNI && "Instruction is reading nonexistent value"' failed

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Oct 2 13:56:13 PDT 2012


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

             Bug #: 13999
           Summary: Register coalescer fails with: Assertion `V.RedefVNI
                    && "Instruction is reading nonexistent value"' failed
           Product: tools
           Version: trunk
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: llc
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: dpeixott at codeaurora.org
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 9295
  --> http://llvm.org/bugs/attachment.cgi?id=9295
bugpoint reduced test case

Running the following program with

$ llc -mcpu=cortex-a9 bugpoint-reduced-simplified.ll

; ModuleID = 'bugpoint-reduced-simplified.bc'
target datalayout =
"e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:64:128-a0:0:64-n32-S64"
target triple = "armv4t-none-linux-gnueabi"

define void @foo() nounwind readonly {
entry:
  br i1 true, label %outer_loop, label %loop.end

outer_loop:
  %d = phi double [ 0.0, %entry ], [ %add, %after_inner_loop ]
  %0 = insertelement <2 x double> <double 0.0, double 0.0>, double %d, i32 0
  br i1 undef, label %after_inner_loop, label %inner_loop

inner_loop:
  br i1 true, label %after_inner_loop, label %inner_loop

after_inner_loop:
  %1 = phi <2 x double> [ %0, %outer_loop ], [ <double 0.0, double 0.0>,
%inner_loop ]
  %2 = extractelement <2 x double> %1, i32 1
  %add = fadd double 1.0, %2
  br i1 false, label %loop.end, label %outer_loop

loop.end:
  %d.end = phi double [ 0.0, %entry ], [ %add, %after_inner_loop ]
  ret void
}

produces the assertion failure:

llc: RegisterCoalescer.cpp:1393: JoinVals::ConflictResolution <anonymous
namespace>::JoinVals::analyzeValue(unsigned int, <anonymous>::JoinVals &):
Assertion `V.RedefVNI && "Instruction is reading nonexistent value"' failed.
Stack dump:
0.      Program arguments: llc -mcpu=scorpion bugpoint-reduced-simplified.ll -o
- -print-after-all -debug-only=regalloc 
1.      Running pass 'Function Pass Manager' on module
'bugpoint-reduced-simplified.ll'.
2.      Running pass 'Simple Register Coalescing' on function '@foo'

If I add the flag -new-coalescer=false, then the test case compiles
successfully.

The assert started failing after commit r164807:
http://llvm.org/viewvc/llvm-project?view=rev&revision=164807

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