aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2015-11-21 16:37:09 +0000
committerSanjay Patel <spatel@rotateright.com>2015-11-21 16:37:09 +0000
commit1f3fa2133adfaf55ab9670aa85a6bb1c9a783fd3 (patch)
treef27a81d1884d85d07546e6b7ba1ccf3c48d6c0df /llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
parent5a7bdc9632caa3b39a36fd864609eae487a7cbd0 (diff)
downloadllvm-1f3fa2133adfaf55ab9670aa85a6bb1c9a783fd3.zip
llvm-1f3fa2133adfaf55ab9670aa85a6bb1c9a783fd3.tar.gz
llvm-1f3fa2133adfaf55ab9670aa85a6bb1c9a783fd3.tar.bz2
remove unnecessary temp variables; NFC
llvm-svn: 253786
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstructionCombining.cpp')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstructionCombining.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
index dbc963a..7abf92a 100644
--- a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
@@ -1288,9 +1288,8 @@ Value *InstCombiner::SimplifyVectorOp(BinaryOperator &Inst) {
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(BinaryOperator &Inst) {
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;
}
}