Hi,
Compiling the simple following function with llv (LLVM 2.8) :
define <4 x i32> @foo(<4 x i32> %a, <4 x i32> %b) {
%res = select <4 x i1> <i1 true, i1 false, i1 true, i1 true>, <4 x i32> %a, <4 x i32> %b ;
ret <4 x i32> %res
}
gives :
UNREACHABLE executed!
0 llc 0x0000000100927422 std::_Rb_tree<llvm::sys::Path, llvm::sys::Path, std::_Identity<llvm::sys::Path>, std::less<llvm::sys::Path>, std::allocator<llvm::sys::Path> >::_M_erase(std::_Rb_tree_node<llvm::sys::Path>*) + 11730
1 llc 0x0000000100927f43 std::_Rb_tree<llvm::sys::Path, llvm::sys::Path, std::_Identity<llvm::sys::Path>, std::less<llvm::sys::Path>, std::allocator<llvm::sys::Path> >::_M_erase(std::_Rb_tree_node<llvm::sys::Path>*) + 14579
2 libSystem.B.dylib 0x00007fff832c735a _sigtramp + 26
3 libSystem.B.dylib 0x0000000100e28800 _sigtramp + 2109084864
4 llc 0x00000001009273e6 std::_Rb_tree<llvm::sys::Path, llvm::sys::Path, std::_Identity<llvm::sys::Path>, std::less<llvm::sys::Path>, std::allocator<llvm::sys::Path> >::_M_erase(std::_Rb_tree_node<llvm::sys::Path>*) + 11670
5 llc 0x0000000100905c1d llvm::APInt::ugt(llvm::APInt const&) const + 9661
6 llc 0x00000001004424cd llvm::DenseMap<llvm::SDValue, llvm::SDValue, llvm::DenseMapInfo<llvm::SDValue>, llvm::DenseMapInfo<llvm::SDValue> >::insert(std::pair<llvm::SDValue, llvm::SDValue> const&) + 54509
7 llc 0x0000000100429633 llvm::TargetLowering::getRegisterType(llvm::LLVMContext&, llvm::EVT) const + 208419
8 llc 0x000000010042aab6 llvm::TargetLowering::getRegisterType(llvm::LLVMContext&, llvm::EVT) const + 213670
9 llc 0x00000001004f9474 llvm::TargetLowering::getNumRegisters(llvm::LLVMContext&, llvm::EVT) const + 13556
10 llc 0x00000001004face4 llvm::TargetLowering::getNumRegisters(llvm::LLVMContext&, llvm::EVT) const + 19812
11 llc 0x00000001004fb2e2 llvm::TargetLowering::getNumRegisters(llvm::LLVMContext&, llvm::EVT) const + 21346
12 llc 0x00000001004fbba8 llvm::TargetLowering::getNumRegisters(llvm::LLVMContext&, llvm::EVT) const + 23592
13 llc 0x00000001005c53bd std::vector<llvm::MachineJumpTableEntry, std::allocator<llvm::MachineJumpTableEntry> >::_M_insert_aux(__gnu_cxx::__normal_iterator<llvm::MachineJumpTableEntry*, std::vector<llvm::MachineJumpTableEntry, std::allocator<llvm::MachineJumpTableEntry> > >, llvm::MachineJumpTableEntry const&) + 2237
14 llc 0x00000001008710b0 llvm::BasicBlockPass::~BasicBlockPass() + 28256
15 llc 0x000000010087116b llvm::BasicBlockPass::~BasicBlockPass() + 28443
16 llc 0x0000000100872822 llvm::BasicBlockPass::~BasicBlockPass() + 34258
17 llc 0x0000000100872b23 llvm::BasicBlockPass::~BasicBlockPass() + 35027
18 llc 0x0000000100872bbd llvm::BasicBlockPass::~BasicBlockPass() + 35181
19 llc 0x000000010002300a std::_Rb_tree<void const*, std::pair<void const* const, llvm::PassInfo const*>, std::_Select1st<std::pair<void const* const, llvm::PassInfo const*> >, std::less<void const*>, std::allocator<std::pair<void const* const, llvm::PassInfo const*> > >::_M_insert_unique(std::pair<void const* const, llvm::PassInfo const*> const&) + 10170
20 llc 0x0000000100021bc8 std::_Rb_tree<void const*, std::pair<void const* const, llvm::PassInfo const*>, std::_Select1st<std::pair<void const* const, llvm::PassInfo const*> >, std::less<void const*>, std::allocator<std::pair<void const* const, llvm::PassInfo const*> > >::_M_insert_unique(std::pair<void const* const, llvm::PassInfo const*> const&) + 4984
21 llc 0x0000000000000002 std::_Rb_tree<void const*, std::pair<void const* const, llvm::PassInfo const*>, std::_Select1st<std::pair<void const* const, llvm::PassInfo const*> >, std::less<void const*>, std::allocator<std::pair<void const* const, llvm::PassInfo const*> > >::_M_insert_unique(std::pair<void const* const, llvm::PassInfo const*> const&) + 4294834098
Stack dump:
0. Program arguments: llc vector.ll
1. Running pass 'Function Pass Manager' on module 'vector.ll'.
2. Running pass 'X86 DAG->DAG Instruction Selection' on function '@foo3'
Illegal instruction
Is it a known problem?
Thanks
Stephane Letz