diff options
| author | Davide Italiano <davide@freebsd.org> | 2017-11-21 00:21:52 +0000 |
|---|---|---|
| committer | Davide Italiano <davide@freebsd.org> | 2017-11-21 00:21:52 +0000 |
| commit | 5df8080011a71042a1684317f8f297516e6f4458 (patch) | |
| tree | 63b66aebb04bc020c2881acedf5d31a4810ac59b | |
| parent | 26917db6969047b79854e840b48fd4ecdae0da11 (diff) | |
| download | bcm5719-llvm-5df8080011a71042a1684317f8f297516e6f4458.tar.gz bcm5719-llvm-5df8080011a71042a1684317f8f297516e6f4458.zip | |
[SCCP] If we replace with a constant, we can't replace with a range.
This microoptimization is NFC.
llvm-svn: 318711
| -rw-r--r-- | llvm/lib/Transforms/Scalar/SCCP.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/SCCP.cpp b/llvm/lib/Transforms/Scalar/SCCP.cpp index 1e4bf2e889d..192ba13c598 100644 --- a/llvm/lib/Transforms/Scalar/SCCP.cpp +++ b/llvm/lib/Transforms/Scalar/SCCP.cpp @@ -1866,8 +1866,10 @@ static bool runIPSCCP(Module &M, const DataLayout &DL, if (Solver.isBlockExecutable(&F.front())) for (Function::arg_iterator AI = F.arg_begin(), E = F.arg_end(); AI != E; ++AI) { - if (!AI->use_empty() && tryToReplaceWithConstant(Solver, &*AI)) + if (!AI->use_empty() && tryToReplaceWithConstant(Solver, &*AI)) { ++IPNumArgsElimed; + continue; + } if (!AI->use_empty() && tryToReplaceWithConstantRange(Solver, &*AI)) ++IPNumRangeInfoUsed; |

