Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

Assertion `I != r2iMap_.end() && "Interval does not exist for register"' failed. #13020

Closed Quuxplusone closed 12 years ago

Quuxplusone commented 12 years ago
Bugzilla Link PR12911
Status RESOLVED FIXED
Importance P enhancement
Reported by John Regehr (regehr@cs.utah.edu)
Reported on 2012-05-22 08:16:50 -0700
Last modified on 2012-05-22 09:52:36 -0700
Version trunk
Hardware PC All
CC benny.kra@gmail.com, chenyang@cs.utah.edu, llvm-bugs@lists.llvm.org, stoklund@2pi.dk
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also
[regehr@dyson r57]$ cat small.c
short a;
int b, c, d, e, f, g, h;
void
fn1 ()
{
    short i;
    int j;
    for (; d;)
    {
        for (;;)
        {
            h = c ? 0 : b > 0;
            if (h)
                f = 0;
            if (g)
                break;
            short k = f;
            i = a && k && 1 > -k ? a : a + k;
            j = i;
        }
        e = 0;
        for (; e; ++e)
            if (j)
                break;
    }
}
[regehr@dyson r57]$ clang -v
clang version 3.2 (trunk 157234)
Target: x86_64-unknown-linux-gnu
Thread model: posix
[regehr@dyson r57]$ clang -c -O3 small.c
clang: /uusoc/exports/scratch/regehr/z/compiler-build/llvm-
r157234/include/llvm/CodeGen/LiveIntervalAnalysis.h:114: llvm::LiveInterval&
llvm::LiveIntervals::getInterval(unsigned int): Assertion `I != r2iMap_.end()
&& "Interval does not exist for register"' failed.
0  clang           0x0000000001ed18af
1  clang           0x0000000001ed3832
2  libpthread.so.0 0x00007f5936dc28f0
3  libc.so.6       0x00007f59360b1a75 gsignal + 53
4  libc.so.6       0x00007f59360b55c0 abort + 384
5  libc.so.6       0x00007f59360aa941 __assert_fail + 241
6  clang           0x0000000001a85e3e
llvm::LiveRangeEdit::eliminateDeadDefs(llvm::SmallVectorImpl<llvm::MachineInstr*>&,
llvm::ArrayRef<unsigned int>) + 4542
7  clang           0x00000000019da526
8  clang           0x00000000019df879
9  clang           0x00000000019e0792
10 clang           0x00000000019e08fc
11 clang           0x00000000019e17dd
12 clang           0x0000000001e1accd
llvm::FPPassManager::runOnFunction(llvm::Function&) + 557
13 clang           0x0000000001e1adb3
llvm::FPPassManager::runOnModule(llvm::Module&) + 51
14 clang           0x0000000001e1a841
llvm::MPPassManager::runOnModule(llvm::Module&) + 497
15 clang           0x0000000001e1a9bb llvm::PassManagerImpl::run(llvm::Module&)
+ 171
16 clang           0x00000000007cc5bc
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::Module*,
clang::BackendAction, llvm::raw_ostream*) + 1532
17 clang           0x00000000007c9b79
18 clang           0x000000000092d381 clang::ParseAST(clang::Sema&, bool, bool)
+ 481
19 clang           0x00000000007c8584 clang::CodeGenAction::ExecuteAction() + 68
20 clang           0x00000000006722e1
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 337
21 clang           0x000000000065b0f4
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1348
22 clang           0x0000000000650f88 cc1_main(char const**, char const**, char
const*, void*) + 968
23 clang           0x0000000000659ed1 main + 7313
24 libc.so.6       0x00007f593609cc4d __libc_start_main + 253
25 clang           0x000000000064e9a9
Stack dump:
0.  Program arguments: /uusoc/exports/scratch/regehr/z/compiler-install/llvm-gcc-
r157234-install/bin/clang -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -
disable-free -main-file-name small.c -mrelocation-model static -fmath-errno -
masm-verbose -mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-
linker-version 2.20.1 -momit-leaf-frame-pointer -coverage-file small.o -
resource-dir /uusoc/exports/scratch/regehr/z/compiler-install/llvm-gcc-r157234-
install/bin/../lib/clang/3.2 -fmodule-cache-path /var/tmp/clang-module-cache -
internal-isystem /usr/local/include -internal-isystem
/uusoc/exports/scratch/regehr/z/compiler-install/llvm-gcc-r157234-
install/bin/../lib/clang/3.2/include -internal-externc-isystem /include -
internal-externc-isystem /usr/include -O3 -fdebug-compilation-dir
/home/regehr/z/reduce/r57 -ferror-limit 19 -fmessage-length 83 -mstackrealign -
fgnu-runtime -fobjc-runtime-has-arc -fobjc-runtime-has-weak -fobjc-fragile-abi -
fdiagnostics-show-option -fcolor-diagnostics -o small.o -x c small.c
1.  <eof> parser at end of file
2.  Code generation
3.  Running pass 'Function Pass Manager' on module 'small.c'.
4.  Running pass 'Simple Register Coalescing' on function '@fn1'
clang: error: unable to execute command: Aborted
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang: note: diagnostic msg: Please submit a bug report to
http://llvm.org/bugs/ and include command line arguments and all diagnostic
information.
clang: note: diagnostic msg: Preprocessed source(s) and associated run
script(s) are located at:
clang: note: diagnostic msg: /tmp/small-7V56bZ.i
clang: note: diagnostic msg: /tmp/small-7V56bZ.sh
Quuxplusone commented 12 years ago

Fixed in r157254, thanks!