From e9bc579c37c038abb66ac30489a1e26e5045ef9f Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Sun, 21 Feb 2016 20:39:50 +0000 Subject: ADT: Remove == and != comparisons between ilist iterators and pointers I missed == and != when I removed implicit conversions between iterators and pointers in r252380 since they were defined outside ilist_iterator. Since they depend on getNodePtrUnchecked(), they indirectly rely on UB. This commit removes all uses of these operators. (I'll delete the operators themselves in a separate commit so that it can be easily reverted if necessary.) There should be NFC here. llvm-svn: 261498 --- llvm/lib/Transforms/Vectorize/BBVectorize.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Transforms/Vectorize') diff --git a/llvm/lib/Transforms/Vectorize/BBVectorize.cpp b/llvm/lib/Transforms/Vectorize/BBVectorize.cpp index 8844d574a79..5d3af4590d8 100644 --- a/llvm/lib/Transforms/Vectorize/BBVectorize.cpp +++ b/llvm/lib/Transforms/Vectorize/BBVectorize.cpp @@ -1259,7 +1259,7 @@ namespace { bool JAfterStart = IAfterStart; BasicBlock::iterator J = std::next(I); for (unsigned ss = 0; J != E && ss <= Config.SearchLimit; ++J, ++ss) { - if (&*J == Start) + if (J == Start) JAfterStart = true; // Determine if J uses I, if so, exit the loop. -- cgit v1.2.3