[LLVMbugs] [Bug 14207] New: assertion in register coalescer

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Oct 29 21:51:41 PDT 2012


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

             Bug #: 14207
           Summary: assertion in register coalescer
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: X86
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: nlewycky at google.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


The assertion that fires is:

llc: RegisterCoalescer.cpp:1675:
bool<unnamed>::JoinVals::resolveConflicts(<unnamed>::JoinVals&): Assertion
`!SlotIndex::isSameInstr(VNI->def, TaintExtent.front().first) && "Interference
ends on VNI->def. Should have been handled earlier"' failed.

Testcase:

target datalayout =
"e-p:64:64:64-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:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

define void @test() nounwind {
entry:
  %tmp = load i64* undef, align 16
  %tmp1 = trunc i64 %tmp to i32
  %tmp2 = lshr i64 %tmp, 32
  %tmp3 = trunc i64 %tmp2 to i32
  %tmp4 = tail call { i32, i32 } asm sideeffect "",
"=&r,=&r,r,r,0,1,~{dirflag},~{fpsr},~{flags}"(i32 %tmp3, i32 undef, i32 %tmp3,
i32 %tmp1) nounwind
  unreachable
}

Build with "llc -O2". Here's the stack trace:

Program received signal SIGABRT, Aborted.
0x00007ffff6ebba75 in *__GI_raise (sig=<optimized out>) at
../nptl/sysdeps/unix/sysv/linux/raise.c:64
64      ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  0x00007ffff6ebba75 in *__GI_raise (sig=<optimized out>) at
../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x00007ffff6ebf5c0 in *__GI_abort () at abort.c:92
#2  0x00007ffff6eb4941 in *__GI___assert_fail (
    assertion=0x18bb038 "!SlotIndex::isSameInstr(VNI->def,
TaintExtent.front().first) && \"Interference ends on VNI->def. Should have been
handled earlier\"", file=<optimized out>, line=1675, 
    function=0x18bd400 <(anonymous
namespace)::JoinVals::resolveConflicts((anonymous
namespace)::JoinVals&)::__PRETTY_FUNCTION__>
"bool<unnamed>::JoinVals::resolveConflicts(<unnamed>::JoinVals&)") at
assert.c:81
#3  0x000000000105af0f in (anonymous namespace)::JoinVals::resolveConflicts
(this=0x7fffffffd730, Other=...)
    at RegisterCoalescer.cpp:1675
#4  0x000000000105bd37 in (anonymous
namespace)::RegisterCoalescer::joinVirtRegs (this=0x1ec6ca0, CP=...)
    at RegisterCoalescer.cpp:1838
#5  0x000000000105c08a in (anonymous
namespace)::RegisterCoalescer::joinIntervals (this=0x1ec6ca0, CP=...)
    at RegisterCoalescer.cpp:1883
#6  0x0000000001058dad in (anonymous namespace)::RegisterCoalescer::joinCopy
(this=0x1ec6ca0, CopyMI=0x1ed88c8, 
    Again=@0x7fffffffdbae: false) at RegisterCoalescer.cpp:1002
#7  0x000000000105c276 in (anonymous
namespace)::RegisterCoalescer::copyCoalesceWorkList (this=0x1ec6ca0, From=0)
    at RegisterCoalescer.cpp:1924
#8  0x000000000105c43d in (anonymous
namespace)::RegisterCoalescer::copyCoalesceInMBB (this=0x1ec6ca0,
MBB=0x1ed85c0)
    at RegisterCoalescer.cpp:1947
#9  0x000000000105c5c3 in (anonymous
namespace)::RegisterCoalescer::joinAllIntervals (this=0x1ec6ca0)
    at RegisterCoalescer.cpp:1960
#10 0x000000000105c9bd in (anonymous
namespace)::RegisterCoalescer::runOnMachineFunction (this=0x1ec6ca0, fn=...)
    at RegisterCoalescer.cpp:2016
#11 0x0000000000fba0b5 in llvm::MachineFunctionPass::runOnFunction
(this=0x1ec6ca0, F=...) at MachineFunctionPass.cpp:33
#12 0x0000000001418813 in llvm::FPPassManager::runOnFunction (this=0x1eaeda0,
F=...) at PassManager.cpp:1498
#13 0x0000000001418a35 in llvm::FPPassManager::runOnModule (this=0x1eaeda0,
M=...) at PassManager.cpp:1518
#14 0x0000000001418d7b in llvm::MPPassManager::runOnModule (this=0x1ea3300,
M=...) at PassManager.cpp:1572
#15 0x00000000014192bb in llvm::PassManagerImpl::run (this=0x1e97870, M=...) at
PassManager.cpp:1655
#16 0x00000000014195b7 in llvm::PassManager::run (this=0x7fffffffe110, M=...)
at PassManager.cpp:1684
#17 0x000000000078b05a in main (argc=4, argv=0x7fffffffe488) at llc.cpp:362

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