[PATCH] D151289: [AMDGPU] Check if register is non-null before calling isSubRegisterEq (NFCI)
Sergei Barannikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 24 00:32:26 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rG74204138f4eb: [AMDGPU] Check if register is non-null before calling isSubRegisterEq (NFCI) (authored by barannikov88).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151289/new/
https://reviews.llvm.org/D151289
Files:
llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
Index: llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
+++ llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
@@ -565,7 +565,7 @@
// reserved input we needed. Also for PAL, make sure we don't clobber
// the GIT pointer passed in SGPR0 or SGPR8.
if (!MRI.isPhysRegUsed(Reg) && MRI.isAllocatable(Reg) &&
- !TRI->isSubRegisterEq(Reg, GITPtrLoReg)) {
+ (!GITPtrLoReg || !TRI->isSubRegisterEq(Reg, GITPtrLoReg))) {
MRI.replaceRegWith(ScratchRsrcReg, Reg);
MFI->setScratchRSrcReg(Reg);
return Reg;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151289.525038.patch
Type: text/x-patch
Size: 644 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230524/39c47f0b/attachment.bin>
More information about the llvm-commits
mailing list