llvm.org GIT mirror llvm / 5011204
AMDGPU/GlobalISel: Fall-back to SelectionDAG for non-void functions Reviewers: arsenm, nhaehnle Reviewed By: nhaehnle Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, rovka, kristof.beyls, dstuttard, tpr, t-tye, llvm-commits Differential Revision: https://reviews.llvm.org/D45843 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330774 91177308-0d34-0410-b5e6-96231b3b80d8 Tom Stellard 2 years ago
2 changed file(s) with 14 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
3131
3232 bool AMDGPUCallLowering::lowerReturn(MachineIRBuilder &MIRBuilder,
3333 const Value *Val, unsigned VReg) const {
34 // FIXME: Add support for non-void returns.
35 if (Val)
36 return false;
37
3438 MIRBuilder.buildInstr(AMDGPU::S_ENDPGM);
3539 return true;
3640 }
0 ; RUN: llc -mtriple=amdgcn-mesa-mesa3d -global-isel -global-isel-abort=2 %s -o - 2>&1 | FileCheck %s
1
2 ; This isn't implemented, but we need to make sure we fall back to SelectionDAG
3 ; instead of generating wrong code.
4 ; CHECK: warning: Instruction selection used fallback path for non_void_ret
5 ; CHECK: non_void_ret:
6 ; CHECK-NOT: s_endpgm
7 define amdgpu_vs i32 @non_void_ret() {
8 ret i32 0
9 }