[LLVMbugs] [Bug 3955] New: llc -fast asserts on first-class-struct parameter

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Mon Apr 6 14:44:52 PDT 2009


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

           Summary: llc -fast asserts on first-class-struct parameter
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: fvbommel at wxs.nl
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=2801)
 --> (http://llvm.org/bugs/attachment.cgi?id=2801)
bitcode that causes assertion failure in llc -fast 

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.


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