[llvm] 7d9b0a6 - AMDGPU/GlobalISel: Simplify assert
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 13 09:54:43 PST 2020
Author: Matt Arsenault
Date: 2020-01-13T12:51:05-05:00
New Revision: 7d9b0a61c32b95fdc73228266d3f14687a8ada95
URL: https://github.com/llvm/llvm-project/commit/7d9b0a61c32b95fdc73228266d3f14687a8ada95
DIFF: https://github.com/llvm/llvm-project/commit/7d9b0a61c32b95fdc73228266d3f14687a8ada95.diff
LOG: AMDGPU/GlobalISel: Simplify assert
Added:
Modified:
llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp b/llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp
index 40da3934ec26..da940990465e 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp
@@ -144,17 +144,9 @@ AMDGPURegisterBankInfo::AMDGPURegisterBankInfo(const GCNSubtarget &ST)
AlreadyInit = true;
- const RegisterBank &RBSGPR = getRegBank(AMDGPU::SGPRRegBankID);
- (void)RBSGPR;
- assert(&RBSGPR == &AMDGPU::SGPRRegBank);
-
- const RegisterBank &RBVGPR = getRegBank(AMDGPU::VGPRRegBankID);
- (void)RBVGPR;
- assert(&RBVGPR == &AMDGPU::VGPRRegBank);
-
- const RegisterBank &RBAGPR = getRegBank(AMDGPU::AGPRRegBankID);
- (void)RBAGPR;
- assert(&RBAGPR == &AMDGPU::AGPRRegBank);
+ assert(&getRegBank(AMDGPU::SGPRRegBankID) == &AMDGPU::SGPRRegBank &&
+ &getRegBank(AMDGPU::VGPRRegBankID) == &AMDGPU::VGPRRegBank &&
+ &getRegBank(AMDGPU::AGPRRegBankID) == &AMDGPU::AGPRRegBank);
}
static bool isVectorRegisterBank(const RegisterBank &Bank) {
More information about the llvm-commits
mailing list