[llvm] 7a967d9 - [AMDGPU] Try to fix a GCC 11 warning
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 23 03:07:01 PDT 2021
Author: Jay Foad
Date: 2021-08-23T10:51:37+01:00
New Revision: 7a967d9011060243af12a43dd962de1ec120663f
URL: https://github.com/llvm/llvm-project/commit/7a967d9011060243af12a43dd962de1ec120663f
DIFF: https://github.com/llvm/llvm-project/commit/7a967d9011060243af12a43dd962de1ec120663f.diff
LOG: [AMDGPU] Try to fix a GCC 11 warning
Apparently GCC 11 was warning:
AMDGPURegisterBankInfo.cpp:2543:33: warning: enumerated and non-enumerated type in conditional expression [-Wextra]
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 9c00ed76985f7..3fe3d260d35c1 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp
@@ -2538,9 +2538,9 @@ void AMDGPURegisterBankInfo::applyMappingImpl(
MachineIRBuilder B(MI, ApplyVALU);
SmallVector<Register, 2> SrcRegs(OpdMapper.getVRegs(1));
unsigned NewOpc = Opc == AMDGPU::G_CTLZ_ZERO_UNDEF
- ? AMDGPU::G_AMDGPU_FFBH_U32
+ ? (unsigned)AMDGPU::G_AMDGPU_FFBH_U32
: Opc == AMDGPU::G_CTTZ_ZERO_UNDEF
- ? AMDGPU::G_AMDGPU_FFBL_B32
+ ? (unsigned)AMDGPU::G_AMDGPU_FFBL_B32
: Opc;
unsigned Idx = NewOpc == AMDGPU::G_AMDGPU_FFBH_U32;
auto X = B.buildInstr(NewOpc, {S32}, {SrcRegs[Idx]});
More information about the llvm-commits
mailing list