[llvm] b0e0cdf - [AMDGPU] Fix a warning
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 30 13:10:05 PDT 2022
Author: Kazu Hirata
Date: 2022-10-30T13:09:59-07:00
New Revision: b0e0cdf1c7c4cea9eba8054c5ef7de531751ee79
URL: https://github.com/llvm/llvm-project/commit/b0e0cdf1c7c4cea9eba8054c5ef7de531751ee79
DIFF: https://github.com/llvm/llvm-project/commit/b0e0cdf1c7c4cea9eba8054c5ef7de531751ee79.diff
LOG: [AMDGPU] Fix a warning
This patch fixes:
llvm/lib/Target/AMDGPU/SIInstrInfo.cpp:7383: warning: enumerated
mismatch in conditional expression:
‘llvm::AMDGPU::UfmtGFX11::UnifiedFormat’ vs
‘llvm::AMDGPU::UfmtGFX10::UnifiedFormat’
Added:
Modified:
llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
index f975b61f318c0..27e0d56c76ec4 100644
--- a/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
@@ -7380,9 +7380,9 @@ MachineOperand *SIInstrInfo::getNamedOperand(MachineInstr &MI,
uint64_t SIInstrInfo::getDefaultRsrcDataFormat() const {
if (ST.getGeneration() >= AMDGPUSubtarget::GFX10) {
- int64_t Format = ST.getGeneration() >= AMDGPUSubtarget::GFX11 ?
- AMDGPU::UfmtGFX11::UFMT_32_FLOAT :
- AMDGPU::UfmtGFX10::UFMT_32_FLOAT;
+ int64_t Format = ST.getGeneration() >= AMDGPUSubtarget::GFX11
+ ? (int64_t)AMDGPU::UfmtGFX11::UFMT_32_FLOAT
+ : (int64_t)AMDGPU::UfmtGFX10::UFMT_32_FLOAT;
return (Format << 44) |
(1ULL << 56) | // RESOURCE_LEVEL = 1
(3ULL << 60); // OOB_SELECT = 3
More information about the llvm-commits
mailing list