[llvm] cb413f2 - [PowerPC] Fix gcc warning about unused variable [NFC]
Mikael Holmen via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 9 01:35:40 PST 2021
Author: Mikael Holmen
Date: 2021-12-09T10:31:56+01:00
New Revision: cb413f208a84940a3e456a18161e19c1dac38f43
URL: https://github.com/llvm/llvm-project/commit/cb413f208a84940a3e456a18161e19c1dac38f43
DIFF: https://github.com/llvm/llvm-project/commit/cb413f208a84940a3e456a18161e19c1dac38f43.diff
LOG: [PowerPC] Fix gcc warning about unused variable [NFC]
gcc warned about
../lib/Target/PowerPC/PPCTargetTransformInfo.cpp:1401:13: warning: unused variable 'VecTy' [-Wunused-variable]
1401 | if (auto *VecTy = dyn_cast<FixedVectorType>(DataType)) {
| ^~~~~
Added:
Modified:
llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp b/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
index aab6591d5f187..c38dec08af904 100644
--- a/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
+++ b/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
@@ -1398,7 +1398,7 @@ bool PPCTTIImpl::hasActiveVectorLength(unsigned Opcode, Type *DataType,
// therefore cannot be used in 32-bit mode.
if ((!ST->hasP9Vector() && !ST->hasP10Vector()) || !ST->isPPC64())
return false;
- if (auto *VecTy = dyn_cast<FixedVectorType>(DataType)) {
+ if (isa<FixedVectorType>(DataType)) {
unsigned VecWidth = DataType->getPrimitiveSizeInBits();
return VecWidth == 128;
}
More information about the llvm-commits
mailing list