Skip to content

Commit b863f78

Browse files
committed
[AMDGPU] Remove calling conv check on entry function
It is undefined behavior to call a function with a mismatched calling convention. Rather than crash on this behavior, it should compile.
1 parent f22d588 commit b863f78

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

llvm/lib/Target/AMDGPU/AMDGPUResourceUsageAnalysis.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -261,13 +261,6 @@ AMDGPUResourceUsageAnalysisImpl::analyzeResourceUsage(
261261

262262
const Function *Callee = getCalleeFunction(*CalleeOp);
263263

264-
// Avoid crashing on undefined behavior with an illegal call to a
265-
// kernel. If a callsite's calling convention doesn't match the
266-
// function's, it's undefined behavior. If the callsite calling
267-
// convention does match, that would have errored earlier.
268-
if (Callee && AMDGPU::isEntryFunctionCC(Callee->getCallingConv()))
269-
report_fatal_error("invalid call to entry function");
270-
271264
auto isSameFunction = [](const MachineFunction &MF, const Function *F) {
272265
return F == &MF.getFunction();
273266
};

0 commit comments

Comments
 (0)