[llvm] r252600 - [PowerPC] Remove redundant code.

Tilmann Scheller via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 10 04:29:37 PST 2015


Author: tilmann
Date: Tue Nov 10 06:29:37 2015
New Revision: 252600

URL: http://llvm.org/viewvc/llvm-project?rev=252600&view=rev
Log:
[PowerPC] Remove redundant code.

The local variable Hi is never being read.

Issue identified by the Clang static analyzer.

Modified:
    llvm/trunk/lib/Target/PowerPC/PPCISelDAGToDAG.cpp

Modified: llvm/trunk/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCISelDAGToDAG.cpp?rev=252600&r1=252599&r2=252600&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCISelDAGToDAG.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCISelDAGToDAG.cpp Tue Nov 10 06:29:37 2015
@@ -564,7 +564,6 @@ static unsigned SelectInt64CountDirect(i
 
   // Handle first 32 bits.
   unsigned Lo = Imm & 0xFFFF;
-  unsigned Hi = (Imm >> 16) & 0xFFFF;
 
   // Simple value.
   if (isInt<16>(Imm)) {
@@ -586,9 +585,9 @@ static unsigned SelectInt64CountDirect(i
     ++Result;
 
   // Add in the last bits as required.
-  if ((Hi = (Remainder >> 16) & 0xFFFF))
+  if ((Remainder >> 16) & 0xFFFF)
     ++Result;
-  if ((Lo = Remainder & 0xFFFF))
+  if (Remainder & 0xFFFF)
     ++Result;
 
   return Result;




More information about the llvm-commits mailing list