OSDN Git Service

[PowerPC] Remove redundant code.
authorTilmann Scheller <t.scheller@samsung.com>
Tue, 10 Nov 2015 12:29:37 +0000 (12:29 +0000)
committerTilmann Scheller <t.scheller@samsung.com>
Tue, 10 Nov 2015 12:29:37 +0000 (12:29 +0000)
The local variable Hi is never being read.

Issue identified by the Clang static analyzer.

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

lib/Target/PowerPC/PPCISelDAGToDAG.cpp

index 908a365..e9b54af 100644 (file)
@@ -564,7 +564,6 @@ static unsigned SelectInt64CountDirect(int64_t Imm) {
 
   // 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(int64_t Imm) {
     ++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;