LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 38396 - [AArch64] Assertion failure compiling with -O0
Summary: [AArch64] Assertion failure compiling with -O0
Status: RESOLVED FIXED
Alias: None
Product: tools
Classification: Unclassified
Component: llc (show other bugs)
Version: trunk
Hardware: HP Linux
: P normal
Assignee: Unassigned LLVM Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-31 15:53 PDT by Taylor Cramer
Modified: 2018-07-31 19:18 PDT (History)
2 users (show)

See Also:
Fixed By Commit(s):


Attachments
Assertion-triggering bitcode (3.59 KB, application/octet-stream)
2018-07-31 15:53 PDT, Taylor Cramer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Taylor Cramer 2018-07-31 15:53:46 PDT
Created attachment 20626 [details]
Assertion-triggering bitcode

The attached bitcode (minimized w/ bugpoint) triggers an assertion failure when compiled with -O0. This was originally reported as https://github.com/rust-lang/rust/issues/52884, where it was reported as a regression after rustc upgraded from https://github.com/rust-lang/llvm 509f29 to 036849. A bisection was attempted, but the merge base 1b838d was also bad.

The backtrace is:

```
#0  0x00007ffff6cfbfcf in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff6cfd3fa in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007ffff6cf4e37 in __assert_fail_base () from /lib/x86_64-linux-gnu/libc.so.6
#3  0x00007ffff6cf4ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#4  0x000000000622be3a in llvm::IRTranslator::allocateVRegs (this=0x6c59580, Val=...)
    at /usr/local/google/home/cramertj/src/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp:144
#5  0x000000000623029c in llvm::IRTranslator::translateExtractValue (this=0x6c59580, U=..., 
    MIRBuilder=...)
    at /usr/local/google/home/cramertj/src/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp:510
#6  0x0000000006236df6 in llvm::IRTranslator::translate (this=0x6c59580, Inst=...)
    at /usr/local/google/home/cramertj/src/llvm/include/llvm/IR/Instruction.def:198
#7  0x000000000623817e in llvm::IRTranslator::runOnMachineFunction (this=0x6c59580, CurMF=...)
    at /usr/local/google/home/cramertj/src/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp:1624
#8  0x0000000004bb96de in llvm::MachineFunctionPass::runOnFunction (this=0x6c59580, F=...)
    at /usr/local/google/home/cramertj/src/llvm/lib/CodeGen/MachineFunctionPass.cpp:61
#9  0x00000000051dc0e8 in llvm::FPPassManager::runOnFunction (this=0x6c49f10, F=...)
    at /usr/local/google/home/cramertj/src/llvm/lib/IR/LegacyPassManager.cpp:1586
#10 0x00000000051dc435 in llvm::FPPassManager::runOnModule (this=0x6c49f10, M=...)
    at /usr/local/google/home/cramertj/src/llvm/lib/IR/LegacyPassManager.cpp:1609
#11 0x00000000051dcc2f in (anonymous namespace)::MPPassManager::runOnModule (this=0x6c4e8c0, M=...)
    at /usr/local/google/home/cramertj/src/llvm/lib/IR/LegacyPassManager.cpp:1669
#12 0x00000000051dc717 in llvm::legacy::PassManagerImpl::run (this=0x6c36f90, M=...)
    at /usr/local/google/home/cramertj/src/llvm/lib/IR/LegacyPassManager.cpp:1774
#13 0x00000000051dd181 in llvm::legacy::PassManager::run (this=0x7fffffffd0c0, M=...)
    at /usr/local/google/home/cramertj/src/llvm/lib/IR/LegacyPassManager.cpp:1805
#14 0x0000000002bc5c56 in compileModule (argv=0x7fffffffda88, Context=...)
    at /usr/local/google/home/cramertj/src/llvm/tools/llc/llc.cpp:597
#15 0x0000000002bc393f in main (argc=3, argv=0x7fffffffda88)
    at /usr/local/google/home/cramertj/src/llvm/tools/llc/llc.cpp:351
```
Comment 1 Amara Emerson 2018-07-31 19:18:44 PDT
Should be fixed in r338476