Skip to content

Commit 5ab9e00

Browse files
committed
[AMDGPU] Fix -Wunused-variable in AMDGPUAtomicOptimizer.cpp (NFC)
/llvm-project/llvm/lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp:688:18: error: unused variable 'TyBitWidth' [-Werror,-Wunused-variable] const unsigned TyBitWidth = DL->getTypeSizeInBits(Ty); ^ 1 error generated.
1 parent 5789ee2 commit 5ab9e00

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,7 @@ void AMDGPUAtomicOptimizerImpl::optimizeAtomic(Instruction &I,
685685
Type *const Ty = I.getType();
686686
Type *Int32Ty = B.getInt32Ty();
687687
bool isAtomicFloatingPointTy = Ty->isFloatingPointTy();
688-
const unsigned TyBitWidth = DL->getTypeSizeInBits(Ty);
688+
[[maybe_unused]] const unsigned TyBitWidth = DL->getTypeSizeInBits(Ty);
689689

690690
// This is the value in the atomic operation we need to combine in order to
691691
// reduce the number of atomic operations.

0 commit comments

Comments
 (0)