Skip to content

Commit e294673

Browse files
committed
Fix CUDA lit tests after pulldown from llorg
20 lit tests for CUDA are failed with the following assert: "clang-13: llvm/lib/Transforms/Utils/CloneFunction.cpp:152: void llvm::CloneFunctionInto(llvm::Function*, const llvm::Function*, llvm::ValueToValueMapTy&, llvm::CloneFunctionChangeType, llvm::SmallVectorImpl<llvm::ReturnInst*>&, const char*, llvm::ClonedCodeInfo*, llvm::ValueMapTypeRemapper*, llvm::ValueMaterializer*) : Assertion `(NewFunc->getParent() == nullptr || NewFunc->getParent() != OldFunc->getParent()) && "Set SameModule to true if the new function is in the same module"' failed." Change CloneFunctionChangeType to pass those lit tests. Signed-off-by: Mikhail Lychkov <[email protected]>
1 parent bf5639a commit e294673

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/NVPTX/SYCL/GlobalOffset.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ class GlobalOffset : public ModulePass {
276276

277277
SmallVector<ReturnInst *, 8> Returns;
278278
CloneFunctionInto(NewFunc, Func, VMap,
279-
CloneFunctionChangeType::DifferentModule, Returns);
279+
CloneFunctionChangeType::GlobalChanges, Returns);
280280
} else {
281281
NewFunc->copyAttributesFrom(Func);
282282
NewFunc->setComdat(Func->getComdat());

0 commit comments

Comments
 (0)