[LLVMbugs] [Bug 9210] New: trivial program that does vector-of-double to vector-of-float conversion crashes x86 codegen

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Feb 13 15:34:43 PST 2011


http://llvm.org/bugs/show_bug.cgi?id=9210

           Summary: trivial program that does vector-of-double to
                    vector-of-float conversion crashes x86 codegen
           Product: new-bugs
           Version: trunk
          Platform: PC
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: matt at pharr.org
                CC: llvmbugs at cs.uiuc.edu


The following program crashes llc (both 2.8 and the dev tree (last synced a day
or two ago)):

define <4 x float> @f(<4 x double>) nounwind {
entry:
  %double2float.i = fptrunc <4 x double> %0 to <4 x float>
  ret <4 x float> %double2float.i
}

2.8 gives me this stack trace:

% llc x.ll
UNREACHABLE executed!
0  llc               0x0000000100927412 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               0x0000000100927f33 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 0x00007fff8385567a _sigtramp + 26
3  libSystem.B.dylib 000000000000000000 _sigtramp + 2088413600
4  llc               0x00000001009273d6 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               0x0000000100905f1d llvm::APInt::ugt(llvm::APInt const&)
const + 9661
6  llc               0x00000001004427cd 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               0x0000000100429933
llvm::TargetLowering::getRegisterType(llvm::LLVMContext&, llvm::EVT) const +
208419
8  llc               0x000000010042adb6
llvm::TargetLowering::getRegisterType(llvm::LLVMContext&, llvm::EVT) const +
213670
9  llc               0x00000001004f9774
llvm::TargetLowering::getNumRegisters(llvm::LLVMContext&, llvm::EVT) const +
13556
10 llc               0x00000001004fafe4
llvm::TargetLowering::getNumRegisters(llvm::LLVMContext&, llvm::EVT) const +
19812
11 llc               0x00000001004fb5e2
llvm::TargetLowering::getNumRegisters(llvm::LLVMContext&, llvm::EVT) const +
21346
12 llc               0x00000001004fbea8
llvm::TargetLowering::getNumRegisters(llvm::LLVMContext&, llvm::EVT) const +
23592
13 llc               0x00000001005c56bd
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               0x00000001008713b0 llvm::BasicBlockPass::~BasicBlockPass()
+ 28256
15 llc               0x000000010087146b llvm::BasicBlockPass::~BasicBlockPass()
+ 28443
16 llc               0x0000000100872b22 llvm::BasicBlockPass::~BasicBlockPass()
+ 34258
17 llc               0x0000000100872e23 llvm::BasicBlockPass::~BasicBlockPass()
+ 35027
18 llc               0x0000000100872ebd llvm::BasicBlockPass::~BasicBlockPass()
+ 35181
19 llc               0x000000010002330a 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               0x0000000100021ec8 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&) + 4294833330
Stack dump:
0.    Program arguments: llc x.ll 
1.    Running pass 'Function Pass Manager' on module 'x.ll'.
2.    Running pass 'X86 DAG->DAG Instruction Selection' on function '@f'
[1]    69663 illegal hardware instruction  llc x.ll

and the dev tree gives me this:


SplitVectorOperand Op #0: 0x103045010: v4f32 = fp_round 0x103044e10,
0x103044f10 [ORD=1] [ID=0]

Do not know how to split this operator's operand!
UNREACHABLE executed at LegalizeVectorTypes.cpp:978!
0  llc               0x00000001009f7461 PrintStackTrace(void*) + 38
1  llc               0x00000001009f7a1c SignalHandler(int) + 254
2  libSystem.B.dylib 0x00007fff8385567a _sigtramp + 26
3  libSystem.B.dylib 0x0000000000000001 _sigtramp + 2088413601
4  llc               0x000000010002ad29 raise + 27
5  llc               0x000000010002ad39 abort + 14
6  llc               0x00000001009e3d83 llvm::report_fatal_error(llvm::Twine
const&) + 0
7  llc               0x000000010047403c
llvm::DAGTypeLegalizer::SplitVectorOperand(llvm::SDNode*, unsigned int) + 636
8  llc               0x0000000100459364 llvm::DAGTypeLegalizer::run() + 1354
9  llc               0x0000000100459b60 llvm::SelectionDAG::LegalizeTypes() +
66
10 llc               0x000000010050f7c2
llvm::SelectionDAGISel::CodeGenAndEmitDAG() + 970
11 llc               0x0000000100511986
llvm::SelectionDAGISel::SelectBasicBlock(llvm::ilist_iterator<llvm::Instruction
const>, llvm::ilist_iterator<llvm::Instruction const>, bool&) + 230
12 llc               0x0000000100512181
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) + 2041
13 llc               0x000000010051281e
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) + 762
14 llc               0x0000000100619aeb
llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 85
15 llc               0x0000000100929b16
llvm::FPPassManager::runOnFunction(llvm::Function&) + 350
16 llc               0x0000000100929ce9
llvm::FPPassManager::runOnModule(llvm::Module&) + 81
17 llc               0x00000001009297e6
llvm::MPPassManager::runOnModule(llvm::Module&) + 384
18 llc               0x000000010092af97
llvm::PassManagerImpl::run(llvm::Module&) + 111
19 llc               0x000000010092aff9 llvm::PassManager::run(llvm::Module&) +
33
20 llc               0x000000010002e013 main + 2305
21 llc               0x000000010002d0f8 start + 52
Stack dump:
0.    Program arguments: /Users/mmp/llvm-dev/bin/llc x.ll 
1.    Running pass 'Function Pass Manager' on module 'x.ll'.
2.    Running pass 'X86 DAG->DAG Instruction Selection' on function '@f'
[1]    69678 illegal hardware instruction  ~/llvm-dev/bin/llc x.ll

-- 
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