diff options
author | Craig Topper <craig.topper@intel.com> | 2018-08-20 05:35:12 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@intel.com> | 2018-08-20 05:35:12 +0000 |
commit | 24674ca77394bdd3e9d7cc7a9da0ad9477de84e2 (patch) | |
tree | 0a841adf7f7838af36969b77481c690408684b2f /llvm/lib/Transforms | |
parent | f8f9af7ba529ab900eba783fa76229f77a545e07 (diff) | |
download | bcm5719-llvm-24674ca77394bdd3e9d7cc7a9da0ad9477de84e2.tar.gz bcm5719-llvm-24674ca77394bdd3e9d7cc7a9da0ad9477de84e2.zip |
[InstCombine] Move some variable declarations into a more appropriate scope. NFC
llvm-svn: 340150
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp b/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp index f1f2a6606e2..04fa2f95182 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp @@ -1766,7 +1766,7 @@ Instruction *InstCombiner::visitSelectInst(SelectInst &SI) { 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::visitSelectInst(SelectInst &SI) { // 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)) |