]> granicus.if.org Git - llvm/commitdiff
[GlobalISel] findGISelOptimalMemOpLowering - remove dead initalization. NFCI.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 15 Sep 2019 16:56:06 +0000 (16:56 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 15 Sep 2019 16:56:06 +0000 (16:56 +0000)
Fixes static analyzer warning that "Value stored to 'NewTySize' during its initialization is never read".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371937 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/GlobalISel/CombinerHelper.cpp

index 76e82a90a3239a07a08245505455ff789ab934a3..6b2bd1691e6b47d63c9283da29c4dd33981628a6 100644 (file)
@@ -673,10 +673,8 @@ static bool findGISelOptimalMemOpLowering(
       // SDAGisms map cleanly to GISel concepts.
       if (NewTy.isVector())
         NewTy = NewTy.getSizeInBits() > 64 ? LLT::scalar(64) : LLT::scalar(32);
+      NewTy = LLT::scalar(PowerOf2Floor(NewTy.getSizeInBits() - 1));
       unsigned NewTySize = NewTy.getSizeInBytes();
-
-      NewTy = LLT::scalar(PowerOf2Floor(NewTy.getSizeInBits()-1));
-      NewTySize = NewTy.getSizeInBytes();
       assert(NewTySize > 0 && "Could not find appropriate type");
 
       // If the new LLT cannot cover all of the remaining bits, then consider