From cb413f208a84940a3e456a18161e19c1dac38f43 Mon Sep 17 00:00:00 2001 From: Mikael Holmen Date: Thu, 9 Dec 2021 10:18:29 +0100 Subject: [PATCH] [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(DataType)) { | ^~~~~ --- llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(DataType)) { + if (isa(DataType)) { unsigned VecWidth = DataType->getPrimitiveSizeInBits(); return VecWidth == 128; }