[llvm] r340150 - [InstCombine] Move some variable declarations into a more appropriate scope. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 19 22:35:12 PDT 2018
Author: ctopper
Date: Sun Aug 19 22:35:12 2018
New Revision: 340150
URL: http://llvm.org/viewvc/llvm-project?rev=340150&view=rev
Log:
[InstCombine] Move some variable declarations into a more appropriate scope. NFC
Modified:
llvm/trunk/lib/Transforms/InstCombine/InstCombineSelect.cpp
Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineSelect.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineSelect.cpp?rev=340150&r1=340149&r2=340150&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineSelect.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineSelect.cpp Sun Aug 19 22:35:12 2018
@@ -1766,7 +1766,7 @@ Instruction *InstCombiner::visitSelectIn
if (Instruction *FoldI = foldSelectIntoOp(SI, TrueVal, FalseVal))
return FoldI;
- Value *LHS, *RHS, *LHS2, *RHS2;
+ Value *LHS, *RHS;
Instruction::CastOps CastOp;
SelectPatternResult SPR = matchSelectPattern(&SI, LHS, RHS, &CastOp);
auto SPF = SPR.Flavor;
@@ -1825,6 +1825,7 @@ Instruction *InstCombiner::visitSelectIn
// MIN(MAX(a, b), a) -> a
// ABS(ABS(a)) -> ABS(a)
// NABS(NABS(a)) -> NABS(a)
+ Value *LHS2, *RHS2;
if (SelectPatternFlavor SPF2 = matchSelectPattern(LHS, LHS2, RHS2).Flavor)
if (Instruction *R = foldSPFofSPF(cast<Instruction>(LHS),SPF2,LHS2,RHS2,
SI, SPF, RHS))
More information about the llvm-commits
mailing list