[llvm] r315328 - Revert "[SCCP] Fix mem-sanitizer failure introduced by r315288."
Bruno Cardoso Lopes via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 10 09:37:51 PDT 2017
Author: bruno
Date: Tue Oct 10 09:37:51 2017
New Revision: 315328
URL: http://llvm.org/viewvc/llvm-project?rev=315328&view=rev
Log:
Revert "[SCCP] Fix mem-sanitizer failure introduced by r315288."
This reverts commit r315294. Part of fixing seg fault introduced in:
http://green.lab.llvm.org/green/job/clang-stage2-configure-Rlto/21675/
Modified:
llvm/trunk/lib/Transforms/Scalar/SCCP.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/SCCP.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SCCP.cpp?rev=315328&r1=315327&r2=315328&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/SCCP.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/SCCP.cpp Tue Oct 10 09:37:51 2017
@@ -1600,10 +1600,8 @@ static bool tryToReplaceWithConstantRang
if (!(V->getType()->isIntegerTy() && IV.isConstantRange()))
return false;
- for (auto UI = V->uses().begin(), E = V->uses().end(); UI != E;) {
- // Advance the iterator here, as we might remove the current use.
- const Use &U = *UI++;
- auto *Icmp = dyn_cast<ICmpInst>(U.getUser());
+ for (auto &Use : V->uses()) {
+ auto *Icmp = dyn_cast<ICmpInst>(Use.getUser());
if (!Icmp)
continue;
More information about the llvm-commits
mailing list