[LLVMbugs] [Bug 10742] New: [AVX] JIT fails for insertelement operations ("Unknown immediate size" / "Wrong MachineOperand accessor")
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Aug 25 01:53:28 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=10742
Summary: [AVX] JIT fails for insertelement operations ("Unknown
immediate size" / "Wrong MachineOperand accessor")
Product: new-bugs
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: karrenberg at cs.uni-saarland.de
CC: llvmbugs at cs.uiuc.edu
Created an attachment (id=7126)
--> (http://llvm.org/bugs/attachment.cgi?id=7126)
Two test functions the JIT fails to compile
The JIT fails to compile the two attached test functions under Linux x86-64
with AVX enabled (LLVM svn trunk).
llc on the other hand works fine:
llc jittest.ll -mcpu=corei7-avx -mattr+avx -o jittest.s
The code that instantiates the execution engine looks like this:
InitializeNativeTarget();
EngineBuilder eb = EngineBuilder(mod);
eb.setEngineKind(EngineKind::JIT);
eb.setErrorStr(&errorMessage);
eb.setJITMemoryManager(JITMemoryManager::CreateDefaultMemManager());
eb.setOptLevel(CodeGenOpt::Aggressive);
eb.setAllocateGVsWithCode(false);
eb.setCodeModel(CodeModel::Default);
eb.setMCPU("corei7-avx");
std::vector<std::string> attrs;
attrs.push_back("avx");
eb.setMAttrs(attrs);
Here is the output of gdb for function 'test':
jitTest:
/home/karrenberg/proj/llvm-svn/include/llvm/CodeGen/MachineOperand.h:337:
int64_t llvm::MachineOperand::getImm() const: Assertion `isImm() && "Wrong
MachineOperand accessor"' failed.
Program received signal SIGABRT, Aborted.
0x00007ffff6eb8d05 in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0 0x00007ffff6eb8d05 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007ffff6ebcab6 in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2 0x00007ffff6eb17c5 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#3 0x00000000004f2572 in llvm::MachineOperand::getImm (this=0x169c2e0) at
/home/karrenberg/proj/llvm-svn/include/llvm/CodeGen/MachineOperand.h:337
#4 0x00000000004f0cf8 in (anonymous
namespace)::Emitter<llvm::JITCodeEmitter>::emitInstruction (this=0x1689680,
MI=..., Desc=0x162d3e0) at X86CodeEmitter.cpp:866
#5 0x00000000004ef8f0 in (anonymous
namespace)::Emitter<llvm::JITCodeEmitter>::runOnMachineFunction
(this=0x1689680, MF=...) at X86CodeEmitter.cpp:134
#6 0x00000000008011d5 in llvm::MachineFunctionPass::runOnFunction
(this=0x1689680, F=...) at MachineFunctionPass.cpp:33
#7 0x0000000000cd0d31 in llvm::FPPassManager::runOnFunction (this=0x165b1e0,
F=...) at PassManager.cpp:1513
#8 0x0000000000cd09e8 in llvm::FunctionPassManagerImpl::run (this=0x165bc30,
F=...) at PassManager.cpp:1463
#9 0x0000000000cd0693 in llvm::FunctionPassManager::run (this=0x164e910,
F=...) at PassManager.cpp:1392
#10 0x00000000004aef18 in llvm::JIT::jitTheFunction (this=0x1658160,
F=0x164aee0, locked=...) at JIT.cpp:639
#11 0x00000000004aedf3 in llvm::JIT::runJITOnFunctionUnlocked (this=0x1658160,
F=0x164aee0, locked=...) at JIT.cpp:618
#12 0x00000000004af1d0 in llvm::JIT::getPointerToFunction (this=0x1658160,
F=0x164aee0) at JIT.cpp:675
Here is the corresponding output for 'test2':
jitTest: MCTargetDesc/X86BaseInfo.h:425: unsigned int
llvm::X86II::getSizeOfImm(uint64_t): Assertion `0 && "Unknown immediate size"'
failed.
Program received signal SIGABRT, Aborted.
0x00007ffff6eb8d05 in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0 0x00007ffff6eb8d05 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007ffff6ebcab6 in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2 0x00007ffff6eb17c5 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#3 0x00000000004eef78 in llvm::X86II::getSizeOfImm (TSFlags=46263173445) at
MCTargetDesc/X86BaseInfo.h:425
#4 0x00000000004f0cd6 in (anonymous
namespace)::Emitter<llvm::JITCodeEmitter>::emitInstruction (this=0x1689680,
MI=..., Desc=0x16351e0) at X86CodeEmitter.cpp:866
#5 0x00000000004ef8f0 in (anonymous
namespace)::Emitter<llvm::JITCodeEmitter>::runOnMachineFunction
(this=0x1689680, MF=...) at X86CodeEmitter.cpp:134
#6 0x00000000008011d5 in llvm::MachineFunctionPass::runOnFunction
(this=0x1689680, F=...) at MachineFunctionPass.cpp:33
#7 0x0000000000cd0d31 in llvm::FPPassManager::runOnFunction (this=0x165b1e0,
F=...) at PassManager.cpp:1513
#8 0x0000000000cd09e8 in llvm::FunctionPassManagerImpl::run (this=0x165bc30,
F=...) at PassManager.cpp:1463
#9 0x0000000000cd0693 in llvm::FunctionPassManager::run (this=0x164e910,
F=...) at PassManager.cpp:1392
#10 0x00000000004aef18 in llvm::JIT::jitTheFunction (this=0x1658160,
F=0x164ad30, locked=...) at JIT.cpp:639
#11 0x00000000004aedf3 in llvm::JIT::runJITOnFunctionUnlocked (this=0x1658160,
F=0x164ad30, locked=...) at JIT.cpp:618
#12 0x00000000004af1d0 in llvm::JIT::getPointerToFunction (this=0x1658160,
F=0x164ad30) at JIT.cpp:675
--
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