Skip to content

llc -fast asserts on first-class-struct parameter #4327

@llvmbot

Description

@llvmbot
Bugzilla Link 3955
Resolution FIXED
Resolved on Apr 07, 2009 15:41
Version unspecified
OS Linux
Attachments bitcode that causes assertion failure in llc -fast
Reporter LLVM Bugzilla Contributor
CC @sunfishcode

Extended Description

When I run llc -fast on the attached file, this is the result:

$ llc test.bc -f -fast
llc: ValueTypes.cpp:167: static llvm::MVT llvm::MVT::getMVT(const llvm::Type*, bool): Assertion `0 && "Unknown type!"' failed.
0 llc 0x0000000000ce5aef
1 llc 0x0000000000ce5ef9
2 libpthread.so.0 0x00007f0087e9b0f0
3 libc.so.6 0x00007f008719f015 gsignal + 53
4 libc.so.6 0x00007f00871a0b83 abort + 387
5 libc.so.6 0x00007f0087197d89 __assert_fail + 233
6 llc 0x0000000000c9a274 llvm::MVT::getMVT(llvm::Type const*, bool) + 708
7 llc 0x000000000093f5d7 llvm::FastISel::getRegForValue(llvm::Value*) + 119
8 llc 0x00000000007b09b5
9 llc 0x00000000007b25d5
10 llc 0x00000000009bbb7f llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function&, llvm::MachineFunction&, llvm::MachineModuleInfo*, llvm::DwarfWriter*, llvm::TargetInstrInfo const&) + 1263
11 llc 0x00000000009bcc96 llvm::SelectionDAGISel::runOnFunction(llvm::Function&) + 1286
12 llc 0x0000000000c82159 llvm::FPPassManager::runOnFunction(llvm::Function&) + 473
13 llc 0x0000000000c823fe llvm::FunctionPassManagerImpl::run(llvm::Function&) + 142
14 llc 0x0000000000c8260b llvm::FunctionPassManager::run(llvm::Function&) + 75
15 llc 0x0000000000509a19 main + 4473
16 libc.so.6 0x00007f008718a466 __libc_start_main + 230
17 llc 0x0000000000507ce9
Stack dump:
0. Program arguments: llc test.bc -f -fast

  1. Running pass 'X86 DAG->DAG Instruction Selection' on function '@foo'
    Aborted

llc without -fast works fine.

The problem seems to be the struct type. If the call is changed to pass the i64 and i8* directly (and the declaration is changed to match) there's no assertion failure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzilla

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions