llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
29.11k stars 12.01k forks source link

Assertion "#operands for dag node doesn't match .td file!" hit during scheduling. #3557

Closed llvmbot closed 14 years ago

llvmbot commented 15 years ago
Bugzilla Link 3185
Resolution FIXED
Resolved on Feb 22, 2010 12:46
Version trunk
OS Linux
Attachments The bitcode file which triggers the assertion.
Reporter LLVM Bugzilla Contributor

Extended Description

The attached bitcode file triggers the following assertion when trying to compile it with llc:

llc: ScheduleDAGSDNodesEmit.cpp:483: void llvm::ScheduleDAGSDNodes::EmitNode(llvm::SDNode*, bool, llvm::DenseMap<llvm::SDValue, unsigned int, llvm::DenseMapInfo

, llvm::DenseMapInfo >&): Assertion `(II.getNumOperands() == NumMIOperands || HasPhysRegOuts || II.isVariadic()) && "#operands for dag node doesn't match .td file!"' failed.
llvmbot commented 15 years ago

Thanks. Found this particular bug (missing default code in SelectDFormAddr for CopyFromReg operands), but then ran into another one which required SPUInstrInfo::InsertBranch() to be implemented.

Good news: This code produces assembly code (would be interested in seeing a test harness like vecoperations.c that verifies that this is actually working code).

Bad news: SPUInstrInfo::InsertBranch() will abort if it needs to insert a conditional branch. But, I'm sure, that'll be the subject of another bug report. At least I'll be able to see some example code in which I can figure out what the actual conditional looks like (SPU has 4 different conditional branch instructions.)

llvmbot commented 15 years ago

The LLVM assembly file which triggers the bug.

llvmbot commented 15 years ago

Created an attachment (id=2281) [details] The bitcode file which triggers the assertion.

Could you possibly post the .ll file instead?