[llvm] r253786 - remove unnecessary temp variables; NFC

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 21 08:37:09 PST 2015


Author: spatel
Date: Sat Nov 21 10:37:09 2015
New Revision: 253786

URL: http://llvm.org/viewvc/llvm-project?rev=253786&view=rev
Log:
remove unnecessary temp variables; NFC

Modified:
    llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp

Modified: llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp?rev=253786&r1=253785&r2=253786&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp Sat Nov 21 10:37:09 2015
@@ -1288,9 +1288,8 @@ Value *InstCombiner::SimplifyVectorOp(Bi
         LShuf->getMask() == RShuf->getMask()) {
       Value *NewBO = CreateBinOpAsGiven(Inst, LShuf->getOperand(0),
           RShuf->getOperand(0), Builder);
-      Value *Res = Builder->CreateShuffleVector(NewBO,
+      return Builder->CreateShuffleVector(NewBO,
           UndefValue::get(NewBO->getType()), LShuf->getMask());
-      return Res;
     }
   }
 
@@ -1335,9 +1334,8 @@ Value *InstCombiner::SimplifyVectorOp(Bi
         NewRHS = C2;
       }
       Value *NewBO = CreateBinOpAsGiven(Inst, NewLHS, NewRHS, Builder);
-      Value *Res = Builder->CreateShuffleVector(NewBO,
+      return Builder->CreateShuffleVector(NewBO,
           UndefValue::get(Inst.getType()), Shuffle->getMask());
-      return Res;
     }
   }
 




More information about the llvm-commits mailing list