From 44dfd81d01519d5e4e850b6e0a7037a788fd4b03 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Fri, 7 Dec 2018 21:44:25 +0000 Subject: [PATCH] Fix unused variable warning. NFCI. llvm-svn: 348649 --- llvm/lib/Target/AMDGPU/SIISelLowering.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/lib/Target/AMDGPU/SIISelLowering.cpp b/llvm/lib/Target/AMDGPU/SIISelLowering.cpp index ff63c1f91b63..12d0bc528ca5 100644 --- a/llvm/lib/Target/AMDGPU/SIISelLowering.cpp +++ b/llvm/lib/Target/AMDGPU/SIISelLowering.cpp @@ -4873,9 +4873,9 @@ SDValue SITargetLowering::lowerSBuffer(EVT VT, SDLoc DL, SDValue Rsrc, SmallVector Loads; unsigned NumLoads = 1; MVT LoadVT = VT.getSimpleVT(); - MVT EltVT = LoadVT.isVector() ? LoadVT.getVectorElementType() : LoadVT; unsigned NumElts = LoadVT.isVector() ? LoadVT.getVectorNumElements() : 1; - assert((EltVT == MVT::i32 || EltVT == MVT::f32) && + assert((LoadVT.getScalarType() == MVT::i32 || + LoadVT.getScalarType() == MVT::f32) && isPowerOf2_32(NumElts)); if (NumElts == 8 || NumElts == 16) {