From 21ae772991feb78968f714c7550484a40149fd82 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Sun, 15 Sep 2019 16:56:06 +0000 Subject: [PATCH] [GlobalISel] findGISelOptimalMemOpLowering - remove dead initalization. NFCI. 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 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/CodeGen/GlobalISel/CombinerHelper.cpp b/lib/CodeGen/GlobalISel/CombinerHelper.cpp index 76e82a90a32..6b2bd1691e6 100644 --- a/lib/CodeGen/GlobalISel/CombinerHelper.cpp +++ b/lib/CodeGen/GlobalISel/CombinerHelper.cpp @@ -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 -- 2.40.0