From: Simon Pilgrim Date: Sun, 15 Sep 2019 16:56:06 +0000 (+0000) Subject: [GlobalISel] findGISelOptimalMemOpLowering - remove dead initalization. NFCI. X-Git-Tag: llvmorg-11-init~9173 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a8a4953fdf3c3b1edfcf25f14ac1e6e49ab32cb7;p=platform%2Fupstream%2Fllvm.git [GlobalISel] findGISelOptimalMemOpLowering - remove dead initalization. NFCI. Fixes static analyzer warning that "Value stored to 'NewTySize' during its initialization is never read". llvm-svn: 371937 --- diff --git a/llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp b/llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp index 76e82a9..6b2bd16 100644 --- a/llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp +++ b/llvm/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