[LLVMbugs] [Bug 22985] New: Thumb1 register allocator problem?!
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun Mar 22 13:50:05 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=22985
Bug ID: 22985
Summary: Thumb1 register allocator problem?!
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Backend: ARM
Assignee: unassignedbugs at nondot.org
Reporter: bjoern.m.haase at web.de
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 14085
--> https://llvm.org/bugs/attachment.cgi?id=14085&action=edit
Source file triggering the bug.
Compiling of the "tweeetnacl.c" crypto library with head fails for thumb1
targets with the assertion
llvm::ThumbRegisterInfo::resolveFrameIndex(llvm::MachineInstr&, unsigned int,
int64_t) const: Assertion `Done && "Unable to resolve frame index!"' failed.
The attached file tweetnacl.c does not include *any* other header, so I
refrained from sending preprocessor output and did send the original source
file for improved readability.
The error message was triggered for both, a generic -mthumb target and an
armv6m target (cortex-m0).
I assume that the problem shows up because somewhere within the stack frame so
many temporaries are allocated that accessing members with an immediate offset
fails and usage of the frame pointer fails for some other reason.
Actually arm-none-eabi-gcc 4.9.3 eats the file.
Output of the Internal compiler error:
arm-none-eabi-clang:
/home/bjoern/llvm/llvm/lib/Target/ARM/ThumbRegisterInfo.cpp:439: virtual void
llvm::ThumbRegisterInfo::resolveFrameIndex(llvm::MachineInstr&, unsigned int,
int64_t) const: Assertion `Done && "Unable to resolve frame index!"' failed.
0 arm-none-eabi-clang 0x000000000226cb88
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 56
1 arm-none-eabi-clang 0x000000000226bac1
2 libpthread.so.0 0x00007ff86e6c5340
3 libc.so.6 0x00007ff86d6d8cc9 gsignal + 57
4 libc.so.6 0x00007ff86d6dc0d8 abort + 328
5 libc.so.6 0x00007ff86d6d1b86
6 libc.so.6 0x00007ff86d6d1c32
7 arm-none-eabi-clang 0x00000000017dd5ba
llvm::ThumbRegisterInfo::resolveFrameIndex(llvm::MachineInstr&, unsigned int,
long) const + 202
8 arm-none-eabi-clang 0x0000000001c2242c
9 arm-none-eabi-clang 0x0000000001c239e5
10 arm-none-eabi-clang 0x00000000021111f8
llvm::FPPassManager::runOnFunction(llvm::Function&) + 632
11 arm-none-eabi-clang 0x000000000211161b
llvm::FPPassManager::runOnModule(llvm::Module&) + 43
12 arm-none-eabi-clang 0x0000000002111924
llvm::legacy::PassManagerImpl::run(llvm::Module&) + 740
13 arm-none-eabi-clang 0x0000000000a627ad
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&,
llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::raw_ostream*) +
1629
14 arm-none-eabi-clang 0x0000000000a51d36
15 arm-none-eabi-clang 0x0000000000c0ae63 clang::ParseAST(clang::Sema&, bool,
bool) + 483
16 arm-none-eabi-clang 0x0000000000a52a8e clang::CodeGenAction::ExecuteAction()
+ 78
17 arm-none-eabi-clang 0x00000000008abd86 clang::FrontendAction::Execute() +
118
18 arm-none-eabi-clang 0x000000000088a3f9
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 345
19 arm-none-eabi-clang 0x0000000000872e2e
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 2014
20 arm-none-eabi-clang 0x000000000086b3d8 cc1_main(llvm::ArrayRef<char const*>,
char const*, void*) + 1096
21 arm-none-eabi-clang 0x000000000084e1db main + 4651
22 libc.so.6 0x00007ff86d6c3ec5 __libc_start_main + 245
23 arm-none-eabi-clang 0x000000000086a28d
Stack dump:
0. Program arguments: /usr/local/bin/arm-none-eabi-clang -cc1 -triple
thumbv4t-none--eabi -emit-obj -mrelax-all -disable-free -main-file-name
tweetnacl.c -mrelocation-model static -mthread-model posix -mdisable-fp-elim
-fmath-errno -masm-verbose -mconstructor-aliases -target-cpu arm7tdmi
-target-feature +soft-float-abi -target-abi aapcs -mfloat-abi soft
-target-linker-version 2.24 -dwarf-column-info -coverage-file
/home/bjoern/git/mu25519/code/m0/naclM0/tests/tweetnacl.c -resource-dir
/usr/local/bin/../lib/clang/3.7.0 -O0 -fdebug-compilation-dir
/home/bjoern/git/mu25519/code/m0/naclM0/tests -ferror-limit 19 -fmessage-length
0 -mstackrealign -fno-signed-char -fobjc-runtime=gcc -fdiagnostics-show-option
-o tweetnacl.o -x c tweetnacl.c
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module 'tweetnacl.c'.
4. Running pass 'Local Stack Slot Allocation' on function
'@crypto_scalarmult'
arm-none-eabi-clang: error: unable to execute command: Aborted (core dumped)
arm-none-eabi-clang: error: clang frontend command failed due to signal (use -v
to see invocation)
clang version 3.7.0 (trunk 232318)
Target: arm-none--eabi
Thread model: posix
arm-none-eabi-clang: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
arm-none-eabi-clang: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
arm-none-eabi-clang: note: diagnostic msg: /tmp/tweetnacl-351293.c
arm-none-eabi-clang: note: diagnostic msg: /tmp/tweetnacl-351293.sh
arm-none-eabi-clang: note: diagnostic msg:
********************
--
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/20150322/4ad8ce49/attachment.html>
More information about the llvm-bugs
mailing list