diff --git a/llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp b/llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp index 280fc91c20c3..a89ba399a1aa 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp @@ -2247,6 +2247,7 @@ bool AMDGPULegalizerInfo::legalizeInsertVectorElt( LLT VecTy = MRI.getType(Vec); LLT EltTy = VecTy.getElementType(); assert(EltTy == MRI.getType(Ins)); + (void)Ins; unsigned NumElts = VecTy.getNumElements(); if (IdxVal < NumElts) {