diff --git a/lib/Target/AMDGPU/AMDGPUCallLowering.cpp b/lib/Target/AMDGPU/AMDGPUCallLowering.cpp index 0c9af9ac581..2a229affeb1 100644 --- a/lib/Target/AMDGPU/AMDGPUCallLowering.cpp +++ b/lib/Target/AMDGPU/AMDGPUCallLowering.cpp @@ -1252,19 +1252,13 @@ bool AMDGPUCallLowering::lowerCall(MachineIRBuilder &MIRBuilder, MachineRegisterInfo &MRI = MF.getRegInfo(); const SITargetLowering &TLI = *getTLI(); const DataLayout &DL = F.getParent()->getDataLayout(); - CallingConv::ID CallConv = F.getCallingConv(); if (!AMDGPUTargetMachine::EnableFixedFunctionABI && - CallConv != CallingConv::AMDGPU_Gfx) { + Info.CallConv != CallingConv::AMDGPU_Gfx) { LLVM_DEBUG(dbgs() << "Variable function ABI not implemented\n"); return false; } - if (AMDGPU::isShader(CallConv)) { - LLVM_DEBUG(dbgs() << "Unhandled call from graphics shader\n"); - return false; - } - SmallVector OutArgs; for (auto &OrigArg : Info.OrigArgs) splitToValueTypes(OrigArg, OutArgs, DL, Info.CallConv); diff --git a/test/CodeGen/AMDGPU/pal-simple-indirect-call.ll b/test/CodeGen/AMDGPU/pal-simple-indirect-call.ll index 277fc9c2d86..e5f0a1d1220 100644 --- a/test/CodeGen/AMDGPU/pal-simple-indirect-call.ll +++ b/test/CodeGen/AMDGPU/pal-simple-indirect-call.ll @@ -5,6 +5,7 @@ ; Check that it doesn't crash ; RUN: llc -mtriple=amdgcn-amd-amdpal -mcpu=gfx900 < %s | FileCheck -check-prefixes=GFX9 %s ; RUN: llc -mtriple=amdgcn-amd-amdpal -mcpu=gfx1010 < %s | FileCheck -check-prefixes=GFX10 %s +; RUN: llc -mtriple=amdgcn-amd-amdpal -mcpu=gfx1010 -global-isel < %s | FileCheck -check-prefixes=GFX10 %s target datalayout = "A5"