https://llvm.org/bugs/show_bug.cgi?id=27329

            Bug ID: 27329
           Summary: ""Node emitted out of order - late" compiling to WASM
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: WebAssembly
          Assignee: unassignedb...@nondot.org
          Reporter: gareth_morga...@hotmail.com
                CC: llvm-bugs@lists.llvm.org
    Classification: Unclassified

Created attachment 16209
  --> https://llvm.org/bugs/attachment.cgi?id=16209&action=edit
Test case with CPP, LL and .s files (with makefile)

The attached Basic.ll file will cause this assert in LLC:
Assertion failed: I != VRBaseMap.end() && "Node emitted out of order - late",
file E:\testcode\llvm\llvm-3.8.0.src\lib\CodeGen\SelectionDAG\InstrEmitter.cpp,
line 302

Changing the argument to the Bar function to pass by value, rather than
reference makes the assert go away (Basic.works.cpp and Basic.opt.works.ll
attached).

Testcase (and makefile showing build steps) attached.

Callstack below
>       llc.exe!llvm::InstrEmitter::getVR(llvm::SDValue Op, 
> llvm::DenseMap<llvm::SDValue,unsigned 
> int,llvm::DenseMapInfo<llvm::SDValue>,llvm::detail::DenseMapPair<llvm::SDValue,unsigned
>  int> > & VRBaseMap) Line 302  C++
     llc.exe!llvm::InstrEmitter::EmitSpecialNode(llvm::SDNode * Node, bool
IsClone, bool IsCloned, llvm::DenseMap<llvm::SDValue,unsigned
int,llvm::DenseMapInfo<llvm::SDValue>,llvm::detail::DenseMapPair<llvm::SDValue,unsigned
int> > & VRBaseMap) Line 901    C++
     llc.exe!llvm::InstrEmitter::EmitNode(llvm::SDNode * Node, bool IsClone,
bool IsCloned, llvm::DenseMap<llvm::SDValue,unsigned
int,llvm::DenseMapInfo<llvm::SDValue>,llvm::detail::DenseMapPair<llvm::SDValue,unsigned
int> > & VRBaseMap) Line 124    C++
    
llc.exe!llvm::ScheduleDAGSDNodes::EmitSchedule(llvm::MachineBasicBlock::bundle_iterator<llvm::MachineInstr,llvm::ilist_iterator<llvm::MachineInstr>
> & InsertPos) Line 848    C++
     llc.exe!llvm::SelectionDAGISel::CodeGenAndEmitDAG() Line 867    C++
    
llc.exe!llvm::SelectionDAGISel::SelectBasicBlock(llvm::ilist_iterator<llvm::Instruction
const > Begin, llvm::ilist_iterator<llvm::Instruction const > End, bool &
HadTailCall) Line 669    C++
     llc.exe!llvm::SelectionDAGISel::SelectAllBasicBlocks(const llvm::Function
& Fn) Line 1362    C++
     llc.exe!llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction
& mf) Line 507    C++
     llc.exe!`anonymous
namespace'::WebAssemblyDAGToDAGISel::runOnMachineFunction(llvm::MachineFunction
& MF) Line 55    C++
     llc.exe!llvm::MachineFunctionPass::runOnFunction(llvm::Function & F) Line
44    C++
     llc.exe!llvm::FPPassManager::runOnFunction(llvm::Function & F) Line 1550  
 C++
     llc.exe!llvm::FPPassManager::runOnModule(llvm::Module & M) Line 1571   
C++
     llc.exe!`anonymous namespace'::MPPassManager::runOnModule(llvm::Module &
M) Line 1627    C++
     llc.exe!llvm::legacy::PassManagerImpl::run(llvm::Module & M) Line 1730   
C++
     llc.exe!llvm::legacy::PassManager::run(llvm::Module & M) Line 1762    C++
     llc.exe!compileModule(char * * argv, llvm::LLVMContext & Context) Line 408
   C++
     llc.exe!main(int argc, char * * argv) Line 211    C++

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to