Skip to content

Commit

Permalink
[AMDGPU] Fix -Wunused-variable in AMDGPUAtomicOptimizer.cpp (NFC)
Browse files Browse the repository at this point in the history
/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.
  • Loading branch information
DamonFool committed Jul 8, 2024
1 parent 5789ee2 commit 5ab9e00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ void AMDGPUAtomicOptimizerImpl::optimizeAtomic(Instruction &I,
Type *const Ty = I.getType();
Type *Int32Ty = B.getInt32Ty();
bool isAtomicFloatingPointTy = Ty->isFloatingPointTy();
const unsigned TyBitWidth = DL->getTypeSizeInBits(Ty);
[[maybe_unused]] const unsigned TyBitWidth = DL->getTypeSizeInBits(Ty);

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

0 comments on commit 5ab9e00

Please sign in to comment.