diff --git a/llvm/lib/Transforms/DFG2LLVM_X86/DFG2LLVM_X86.cpp b/llvm/lib/Transforms/DFG2LLVM_X86/DFG2LLVM_X86.cpp index 13eef916e8d3048c3906cded56ba332cfa714f95..9f94bf237dad77e6d088129633c6e5e03e181f0e 100644 --- a/llvm/lib/Transforms/DFG2LLVM_X86/DFG2LLVM_X86.cpp +++ b/llvm/lib/Transforms/DFG2LLVM_X86/DFG2LLVM_X86.cpp @@ -1659,6 +1659,16 @@ void CGT_X86::codeGen(DFLeafNode* N) { return; } + // At this point, the X86 backend does not support code generation for + // the case where allocation node is used, so we skip. This means that a + // CPU version will not be created, and therefore code generation will + // only succeed if another backend (nvptx or spir) has been invoked to + // generate a node function for the node including the allocation node. + if (N->isAllocationNode()) { + DEBUG(errs() << "Skipping allocation node\n"); + return; + } + // Check if clone already exists. If it does, it means we have visited this // function before and nothing else needs to be done for this leaf node. // if(N->getGenFunc() != NULL)