[PATCH] D13106: AMDGPU: Remove dead code
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 23 10:11:19 PDT 2015
arsenm created this revision.
arsenm added a reviewer: tstellarAMD.
arsenm added a subscriber: llvm-commits.
Herald added a subscriber: arsenm.
There's no point in checking VReg_1 because all uses
of it should already have been removed by SILowerI1Copies.
http://reviews.llvm.org/D13106
Files:
lib/Target/AMDGPU/SIFixSGPRCopies.cpp
Index: lib/Target/AMDGPU/SIFixSGPRCopies.cpp
===================================================================
--- lib/Target/AMDGPU/SIFixSGPRCopies.cpp
+++ lib/Target/AMDGPU/SIFixSGPRCopies.cpp
@@ -193,15 +193,12 @@
return false;
}
- const TargetRegisterClass *DstRC = MRI.getRegClass(DstReg);
-
- const TargetRegisterClass *SrcRC;
-
- if (!TargetRegisterInfo::isVirtualRegister(SrcReg) ||
- MRI.getRegClass(SrcReg) == &AMDGPU::VReg_1RegClass)
+ if (!TargetRegisterInfo::isVirtualRegister(SrcReg))
return false;
- SrcRC = TRI->getSubRegClass(MRI.getRegClass(SrcReg), SrcSubReg);
+ const TargetRegisterClass *DstRC = MRI.getRegClass(DstReg);
+ const TargetRegisterClass *SrcRC
+ = TRI->getSubRegClass(MRI.getRegClass(SrcReg), SrcSubReg);
return TRI->isSGPRClass(DstRC) && TRI->hasVGPRs(SrcRC);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13106.35522.patch
Type: text/x-patch
Size: 836 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150923/5de12df5/attachment.bin>
More information about the llvm-commits
mailing list