]> granicus.if.org Git - llvm/commitdiff
TargetInstrInfo::getStackSlotRange - fix "variable used but never read" analyzer...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 23 Sep 2019 11:36:24 +0000 (11:36 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Mon, 23 Sep 2019 11:36:24 +0000 (11:36 +0000)
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

lib/CodeGen/TargetInstrInfo.cpp

index 11872e13e4f7dafd9adee67caff65d6d0193684a..fefae2eb5bbb8f90d694e0a62d4b3beb35dbaeeb 100644 (file)
@@ -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");