[PATCH] D106758: [AMDGPU] We would need FP if there is call and caller save VGPR spills
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 26 10:42:17 PDT 2021
arsenm added a comment.
LGTM except the test is using dead code. I also think we ought to be able to remove VGPRReservedForSGPRSpill now that SGPR and VGPR allocation are split
================
Comment at: llvm/lib/Target/AMDGPU/SIFrameLowering.cpp:1310
+ const bool WillHaveFP = FrameInfo.hasCalls() &&
+ (HaveAnyCSRVGPR || (TRI->spillSGPRToVGPR() &&
+ MFI->VGPRReservedForSGPRSpill));
----------------
Checking TRI->spillSGPRToVGPR() should be redundant
================
Comment at: llvm/test/CodeGen/AMDGPU/need-fp-from-caller-save-vgpr-spill.ll:17
+ %retval = alloca i32, align 4, addrspace(5)
+ %retval.ascast = addrspacecast i32 addrspace(5)* %retval to i32*
+ ret i32 0
----------------
The cast/alloca are dead
================
Comment at: llvm/test/CodeGen/AMDGPU/need-fp-from-caller-save-vgpr-spill.ll:51-52
+entry:
+ %retval = alloca i32, align 4, addrspace(5)
+ %retval.ascast = addrspacecast i32 addrspace(5)* %retval to i32*
+ %call = call i32 @baz()
----------------
The cast/alloca are dead
================
Comment at: llvm/test/CodeGen/AMDGPU/need-fp-from-caller-save-vgpr-spill.ll:90-91
+entry:
+ %retval = alloca i32, align 4, addrspace(5)
+ %retval.ascast = addrspacecast i32 addrspace(5)* %retval to i32*
+ %call = call i32 @bar()
----------------
The cast/alloca are dead
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106758/new/
https://reviews.llvm.org/D106758
More information about the llvm-commits
mailing list