AMDGPU: Don't handle invalid reg classes in helper functions
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Sat, 26 Sep 2015 04:53:30 +0000 (04:53 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Sat, 26 Sep 2015 04:53:30 +0000 (04:53 +0000)
No tests hit these and it would be better to have checks like
this explicit where they are used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248655 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/AMDGPU/SIRegisterInfo.h

index a70d086cb52f849d7bf8df612e600c547d9cdea0..c59c0147e8a268f750e9f9f83643c186252f66e2 100644 (file)
@@ -48,17 +48,11 @@ public:
 
   /// \returns true if this class contains only SGPR registers
   bool isSGPRClass(const TargetRegisterClass *RC) const {
-    if (!RC)
-      return false;
-
     return !hasVGPRs(RC);
   }
 
   /// \returns true if this class ID contains only SGPR registers
   bool isSGPRClassID(unsigned RCID) const {
-    if (static_cast<int>(RCID) == -1)
-      return false;
-
     return isSGPRClass(getRegClass(RCID));
   }