[LLVMbugs] [Bug 21107] New: Patchpoints/stackmaps fail without -disable-fp-elim
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Sep 30 19:28:10 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=21107
Bug ID: 21107
Summary: Patchpoints/stackmaps fail without -disable-fp-elim
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Backend: X86
Assignee: unassignedbugs at nondot.org
Reporter: kmod at dropbox.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Patchpoints and stackmaps seem to fail when given an alloca and frame pointer
elimination is enabled. I've attached a simple test case using a stackmap,
which fails when trying to eliminate the frame pointer usage for the alloca
argument, with
llc:
/opt/kmod_unenc/pyston_deps/llvm-trunk/lib/Target/X86/X86RegisterInfo.cpp:512:
virtual void
llvm::X86RegisterInfo::eliminateFrameIndex(llvm::MachineBasicBlock::iterator,
int, unsigned int, llvm::RegScavenger*) const: Assertion `BasePtr == FramePtr
&& "Expected the FP as base register"' failed.
Full backtrace:
#0 0x00007ffff684dd05 in *__GI_raise (sig=6) at
../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1 0x00007ffff6851ab6 in *__GI_abort () at abort.c:92
#2 0x00007ffff68467c5 in *__GI___assert_fail (assertion=0x15073f0 "BasePtr ==
FramePtr && \"Expected the FP as base register\"",
file=<optimized out>, line=512, function=<optimized out>) at assert.c:81
#3 0x000000000098d0d0 in llvm::X86RegisterInfo::eliminateFrameIndex
(this=0x2000340, II=..., SPAdj=0, FIOperandNum=3, RS=0x0)
at
/opt/kmod_unenc/pyston_deps/llvm-trunk/lib/Target/X86/X86RegisterInfo.cpp:512
#4 0x0000000000ecf3f6 in llvm::PEI::replaceFrameIndices (this=0x2041d40,
BB=0x2053d20, Fn=..., SPAdj=@0x7fffffffcdbc: 0)
at
/opt/kmod_unenc/pyston_deps/llvm-trunk/lib/CodeGen/PrologEpilogInserter.cpp:815
#5 0x0000000000eced43 in llvm::PEI::replaceFrameIndices (this=0x2041d40,
Fn=...)
at
/opt/kmod_unenc/pyston_deps/llvm-trunk/lib/CodeGen/PrologEpilogInserter.cpp:725
#6 0x0000000000eccab3 in llvm::PEI::runOnMachineFunction (this=0x2041d40,
Fn=...)
at
/opt/kmod_unenc/pyston_deps/llvm-trunk/lib/CodeGen/PrologEpilogInserter.cpp:161
#7 0x0000000000e42c47 in llvm::MachineFunctionPass::runOnFunction
(this=0x2041d40, F=...)
at
/opt/kmod_unenc/pyston_deps/llvm-trunk/lib/CodeGen/MachineFunctionPass.cpp:33
#8 0x00000000013fa57e in llvm::FPPassManager::runOnFunction (this=0x2026330,
F=...)
at /opt/kmod_unenc/pyston_deps/llvm-trunk/lib/IR/LegacyPassManager.cpp:1544
#9 0x00000000013fa6ee in llvm::FPPassManager::runOnModule (this=0x2026330,
M=...)
at /opt/kmod_unenc/pyston_deps/llvm-trunk/lib/IR/LegacyPassManager.cpp:1564
#10 0x00000000013faa42 in (anonymous namespace)::MPPassManager::runOnModule
(this=0x200c680, M=...)
at /opt/kmod_unenc/pyston_deps/llvm-trunk/lib/IR/LegacyPassManager.cpp:1622
#11 0x00000000013fb0ec in llvm::legacy::PassManagerImpl::run (this=0x200c310,
M=...)
at /opt/kmod_unenc/pyston_deps/llvm-trunk/lib/IR/LegacyPassManager.cpp:1729
#12 0x00000000013fb30b in llvm::legacy::PassManager::run (this=0x7fffffffd280,
M=...)
at /opt/kmod_unenc/pyston_deps/llvm-trunk/lib/IR/LegacyPassManager.cpp:1766
#13 0x00000000009004a4 in compileModule (argv=0x7fffffffd698, Context=...) at
/opt/kmod_unenc/pyston_deps/llvm-trunk/tools/llc/llc.cpp:351
#14 0x00000000008ff728 in main (argc=2, argv=0x7fffffffd698) at
/opt/kmod_unenc/pyston_deps/llvm-trunk/tools/llc/llc.cpp:199
Printing out some values in X86RegisterInfo::eliminateFrameIndex():
(gdb) print MI.dump()
STACKMAP 123, 0, 0, %RSP, 0, ...; mem:LD8[FixedStack0](align=1)
$1 = void
(gdb) print FIOperandNum
$2 = 3
(gdb) print SPAdj
$3 = 0
To repro:
llc t.ll
But it works if you run:
llc t.ll -disable-fp-elim
Tested on r218726
--
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/20141001/0f74caeb/attachment.html>
More information about the llvm-bugs
mailing list