From 6e28010215c9d8607815a6e7e077a94529fa55e8 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Sat, 26 Sep 2015 04:53:30 +0000 Subject: [PATCH] AMDGPU: Don't handle invalid reg classes in helper functions No tests hit these and it would be better to have checks like this explicit where they are used. llvm-svn: 248655 --- llvm/lib/Target/AMDGPU/SIRegisterInfo.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/llvm/lib/Target/AMDGPU/SIRegisterInfo.h b/llvm/lib/Target/AMDGPU/SIRegisterInfo.h index a70d086cb52f..c59c0147e8a2 100644 --- a/llvm/lib/Target/AMDGPU/SIRegisterInfo.h +++ b/llvm/lib/Target/AMDGPU/SIRegisterInfo.h @@ -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(RCID) == -1) - return false; - return isSGPRClass(getRegClass(RCID)); }