[llvm] r249081 - AMDGPU: Remove dead code

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 1 14:51:57 PDT 2015


Author: arsenm
Date: Thu Oct  1 16:51:57 2015
New Revision: 249081

URL: http://llvm.org/viewvc/llvm-project?rev=249081&view=rev
Log:
AMDGPU: Remove dead code

There's no point in checking VReg_1 because all uses
of it should already have been removed by SILowerI1Copies.

Modified:
    llvm/trunk/lib/Target/AMDGPU/SIFixSGPRCopies.cpp

Modified: llvm/trunk/lib/Target/AMDGPU/SIFixSGPRCopies.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/SIFixSGPRCopies.cpp?rev=249081&r1=249080&r2=249081&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/SIFixSGPRCopies.cpp (original)
+++ llvm/trunk/lib/Target/AMDGPU/SIFixSGPRCopies.cpp Thu Oct  1 16:51:57 2015
@@ -193,15 +193,12 @@ bool SIFixSGPRCopies::isVGPRToSGPRCopy(c
     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);
 }
 




More information about the llvm-commits mailing list