From: Simon Pilgrim Date: Mon, 23 Sep 2019 11:36:24 +0000 (+0000) Subject: TargetInstrInfo::getStackSlotRange - fix "variable used but never read" analyzer... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fed25f49be251a467adfed0c73e9bc3ca2e6d98c;p=llvm TargetInstrInfo::getStackSlotRange - fix "variable used but never read" analyzer warning. NFCI. We don't need to divide the BitSize local variable at all. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372582 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/TargetInstrInfo.cpp b/lib/CodeGen/TargetInstrInfo.cpp index 11872e13e4f..fefae2eb5bb 100644 --- a/lib/CodeGen/TargetInstrInfo.cpp +++ b/lib/CodeGen/TargetInstrInfo.cpp @@ -394,7 +394,7 @@ bool TargetInstrInfo::getStackSlotRange(const TargetRegisterClass *RC, if (BitOffset < 0 || BitOffset % 8) return false; - Size = BitSize /= 8; + Size = BitSize / 8; Offset = (unsigned)BitOffset / 8; assert(TRI->getSpillSize(*RC) >= (Offset + Size) && "bad subregister range");