<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Thanks for reverting. Reapplied with a fix in r363613. Please
let me know if you have any further issues.<br>
</p>
<p>Philip<br>
</p>
<div class="moz-cite-prefix">On 6/14/19 10:26 AM, Florian Hahn
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:BB21FF69-FAE9-4978-AAC2-DB29E9F7BACC@apple.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
Hi
<div class=""><br class="">
</div>
<div class="">I temporarily reverted the patch in r363427, because
it breaks a green dragon</div>
<div class="">build:<br class="">
<a
href="http://green.lab.llvm.org/green/job/clang-stage2-Rthinlto/18208"
class="" moz-do-not-send="true">http://green.lab.llvm.org/green/job/clang-stage2-Rthinlto/18208</a>
<div class=""><br class="">
</div>
<div class="">I’ll upload a reduced reproducer at <a
href="https://bugs.llvm.org/show_bug.cgi?id=42279" class=""
moz-do-not-send="true">https://bugs.llvm.org/show_bug.cgi?id=42279</a>
as soon as bugpoint is done.</div>
<div><br class="">
<blockquote type="cite" class="">
<div class="">On Jun 13, 2019, at 19:23, Philip Reames via
llvm-commits <<a
href="mailto:llvm-commits@lists.llvm.org" class=""
moz-do-not-send="true">llvm-commits@lists.llvm.org</a>>
wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">Author: reames<br class="">
Date: Thu Jun 13 11:23:13 2019<br class="">
New Revision: 363289<br class="">
<br class="">
URL: <a
href="http://llvm.org/viewvc/llvm-project?rev=363289&view=rev"
class="" moz-do-not-send="true">http://llvm.org/viewvc/llvm-project?rev=363289&view=rev</a><br
class="">
Log:<br class="">
Fix a bug w/inbounds invalidation in LFTR<br class="">
<br class="">
This contains fixes for two cases where we might
invalidate inbounds and leave it stale in the IR (a
miscompile). Case 1 is when switching to an IV with no
dynamically live uses, and case 2 is when doing
pre-to-post conversion on the same pointer type IV.<br
class="">
<br class="">
The basic scheme used is to prove that using the given
IV (pre or post increment forms) would have to already
trigger UB on the path to the test we're modifying. As
such, our potential UB triggering use does not change
the semantics of the original program.<br class="">
<br class="">
As was pointed out in the review thread by Nikita, this
is defending against a separate issue from the
hasConcreteDef case. This is about poison, that's about
undef. Unfortunately, the two are different, see
Nikita's comment for a fuller explanation, he explains
it well.<br class="">
<br class="">
(Note: I'm going to address Nikita's last style comment
in a separate commit just to minimize chance of subtle
bugs being introduced due to typos.)<br class="">
<br class="">
Differential Revision: <a
href="https://reviews.llvm.org/D62939" class=""
moz-do-not-send="true">https://reviews.llvm.org/D62939</a><br
class="">
<br class="">
<br class="">
Modified:<br class="">
llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp<br
class="">
llvm/trunk/test/Transforms/IndVarSimplify/2011-10-27-lftrnull.ll<br
class="">
llvm/trunk/test/Transforms/IndVarSimplify/2011-11-01-lftrptr.ll<br
class="">
llvm/trunk/test/Transforms/IndVarSimplify/lftr-dead-ivs.ll<br
class="">
llvm/trunk/test/Transforms/IndVarSimplify/lftr.ll<br
class="">
<br class="">
Modified:
llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp<br
class="">
URL: <a
href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp?rev=363289&r1=363288&r2=363289&view=diff"
class="" moz-do-not-send="true">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp?rev=363289&r1=363288&r2=363289&view=diff</a><br
class="">
==============================================================================<br
class="">
--- llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp
(original)<br class="">
+++ llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp
Thu Jun 13 11:23:13 2019<br class="">
@@ -31,6 +31,7 @@<br class="">
#include "llvm/ADT/None.h"<br class="">
#include "llvm/ADT/Optional.h"<br class="">
#include "llvm/ADT/STLExtras.h"<br class="">
+#include "llvm/ADT/SmallSet.h"<br class="">
#include "llvm/ADT/SmallPtrSet.h"<br class="">
#include "llvm/ADT/SmallVector.h"<br class="">
#include "llvm/ADT/Statistic.h"<br class="">
@@ -42,6 +43,7 @@<br class="">
#include "llvm/Analysis/ScalarEvolutionExpressions.h"<br
class="">
#include "llvm/Analysis/TargetLibraryInfo.h"<br class="">
#include "llvm/Analysis/TargetTransformInfo.h"<br
class="">
+#include "llvm/Analysis/ValueTracking.h"<br class="">
#include "llvm/Transforms/Utils/Local.h"<br class="">
#include "llvm/IR/BasicBlock.h"<br class="">
#include "llvm/IR/Constant.h"<br class="">
@@ -2077,6 +2079,48 @@ static bool needsLFTR(Loop *L,
BasicBloc<br class="">
return Phi != getLoopPhiForCounter(IncV, L);<br
class="">
}<br class="">
<br class="">
+/// Return true if undefined behavior would provable be
executed on the path to<br class="">
+/// OnPathTo if Root produced a posion result. Note
that this doesn't say<br class="">
+/// anything about whether OnPathTo is actually
executed or whether Root is<br class="">
+/// actually poison. This can be used to assess
whether a new use of Root can<br class="">
+/// be added at a location which is control equivalent
with OnPathTo (such as<br class="">
+/// immediately before it) without introducing UB which
didn't previously<br class="">
+/// exist. Note that a false result conveys no
information. <br class="">
+static bool mustExecuteUBIfPoisonOnPathTo(Instruction
*Root,<br class="">
+ Instruction
*OnPathTo, <br class="">
+ DominatorTree
*DT) {<br class="">
+ // Basic approach is to assume Root is poison,
propagate poison forward<br class="">
+ // through all users we can easily track, and then
check whether any of those<br class="">
+ // users are provable UB and must execute before out
exiting block might<br class="">
+ // exit.<br class="">
+<br class="">
+ // The set of all recursive users we've visited
(which are assumed to all be<br class="">
+ // poison because of said visit)<br class="">
+ SmallSet<const Value *, 16> KnownPoison;<br
class="">
+ SmallVector<const Instruction*, 16> Worklist;<br
class="">
+ Worklist.push_back(Root);<br class="">
+ while (!Worklist.empty()) {<br class="">
+ const Instruction *I = Worklist.pop_back_val();<br
class="">
+<br class="">
+ // If we know this must trigger UB on a path
leading our target.<br class="">
+ if (mustTriggerUB(I, KnownPoison) &&
DT->dominates(I, OnPathTo))<br class="">
+ return true;<br class="">
+ <br class="">
+ // If we can't analyze propagation through this
instruction, just skip it<br class="">
+ // and transitive users. Safe as false is a
conservative result.<br class="">
+ if (!propagatesFullPoison(I) && I != Root)<br
class="">
+ continue;<br class="">
+<br class="">
+ if (KnownPoison.insert(I).second)<br class="">
+ for (const User *User : I->users())<br
class="">
+
Worklist.push_back(cast<Instruction>(User));<br
class="">
+ }<br class="">
+<br class="">
+ // Might be non-UB, or might have a path we couldn't
prove must execute on<br class="">
+ // way to exiting bb. <br class="">
+ return false;<br class="">
+}<br class="">
+<br class="">
/// Recursive helper for hasConcreteDef().
Unfortunately, this currently boils<br class="">
/// down to checking that all operands are constant and
listing instructions<br class="">
/// that may hide undef.<br class="">
@@ -2165,7 +2209,8 @@ static bool isLoopCounter(PHINode*
Phi,<br class="">
/// valid count without scaling the address stride, so
it remains a pointer<br class="">
/// expression as far as SCEV is concerned.<br class="">
static PHINode *FindLoopCounter(Loop *L, BasicBlock
*ExitingBB,<br class="">
- const SCEV *BECount,
ScalarEvolution *SE) {<br class="">
+ const SCEV *BECount,<br
class="">
+ ScalarEvolution *SE,
DominatorTree *DT) {<br class="">
uint64_t BCWidth =
SE->getTypeSizeInBits(BECount->getType());<br
class="">
<br class="">
Value *Cond =
cast<BranchInst>(ExitingBB->getTerminator())->getCondition();<br
class="">
@@ -2210,6 +2255,18 @@ static PHINode
*FindLoopCounter(Loop *L,<br class="">
continue;<br class="">
}<br class="">
<br class="">
+ // Avoid introducing undefined behavior due to
poison which didn't exist in<br class="">
+ // the original program. (Annoyingly, the rules
for poison and undef<br class="">
+ // propagation are distinct, so this does NOT cover
the undef case above.)<br class="">
+ // We have to ensure that we don't introduce UB by
introducing a use on an<br class="">
+ // iteration where said IV produces poison. Our
strategy here differs for<br class="">
+ // pointers and integer IVs. For integers, we
strip and reinfer as needed,<br class="">
+ // see code in linearFunctionTestReplace. For
pointers, we restrict<br class="">
+ // transforms as there is no good way to reinfer
inbounds once lost.<br class="">
+ if (!Phi->getType()->isIntegerTy() &&<br
class="">
+ !mustExecuteUBIfPoisonOnPathTo(Phi,
ExitingBB->getTerminator(), DT))<br class="">
+ continue;<br class="">
+ <br class="">
const SCEV *Init = AR->getStart();<br class="">
<br class="">
if (BestPhi && !AlmostDeadIV(BestPhi,
LatchBlock, Cond)) {<br class="">
@@ -2338,15 +2395,30 @@ linearFunctionTestReplace(Loop
*L, Basic<br class="">
// compare against the post-incremented value,
otherwise we must compare<br class="">
// against the preincremented value.<br class="">
if (ExitingBB == L->getLoopLatch()) {<br class="">
- // Add one to the "backedge-taken" count to get the
trip count.<br class="">
- // This addition may overflow, which is valid as
long as the comparison is<br class="">
- // truncated to BackedgeTakenCount->getType().<br
class="">
- IVCount = SE->getAddExpr(BackedgeTakenCount,<br
class="">
-
SE->getOne(BackedgeTakenCount->getType()));<br
class="">
- // The BackedgeTaken expression contains the number
of times that the<br class="">
- // backedge branches to the loop header. This is
one less than the<br class="">
- // number of times the loop executes, so use the
incremented indvar.<br class="">
- CmpIndVar =
IndVar->getIncomingValueForBlock(ExitingBB);<br
class="">
+ bool SafeToPostInc =
IndVar->getType()->isIntegerTy();<br class="">
+ if (!SafeToPostInc) {<br class="">
+ // For pointer IVs, we chose to not strip
inbounds which requires us not<br class="">
+ // to add a potentially UB introducing use. We
need to either a) show<br class="">
+ // the loop test we're modifying is already in
post-inc form, or b) show<br class="">
+ // that adding a use must not introduce UB.<br
class="">
+ Instruction *Inc =<br class="">
+
cast<Instruction>(IndVar->getIncomingValueForBlock(L->getLoopLatch()));<br
class="">
+ ICmpInst *LoopTest = getLoopTest(L, ExitingBB);<br
class="">
+ SafeToPostInc = LoopTest->getOperand(0) == Inc
||<br class="">
+ LoopTest->getOperand(1) == Inc ||<br
class="">
+ mustExecuteUBIfPoisonOnPathTo(Inc,
ExitingBB->getTerminator(), DT);<br class="">
+ }<br class="">
+ if (SafeToPostInc) {<br class="">
+ // Add one to the "backedge-taken" count to get
the trip count.<br class="">
+ // This addition may overflow, which is valid as
long as the comparison<br class="">
+ // is truncated to
BackedgeTakenCount->getType().<br class="">
+ IVCount = SE->getAddExpr(BackedgeTakenCount,<br
class="">
+
SE->getOne(BackedgeTakenCount->getType()));<br
class="">
+ // The BackedgeTaken expression contains the
number of times that the<br class="">
+ // backedge branches to the loop header. This is
one less than the<br class="">
+ // number of times the loop executes, so use the
incremented indvar.<br class="">
+ CmpIndVar =
IndVar->getIncomingValueForBlock(ExitingBB);<br
class="">
+ }<br class="">
}<br class="">
<br class="">
// It may be necessary to drop nowrap flags on the
incrementing instruction<br class="">
@@ -2646,7 +2718,7 @@ bool IndVarSimplify::run(Loop *L)
{<br class="">
if (BETakenCount->isZero())<br class="">
continue;<br class="">
<br class="">
- PHINode *IndVar = FindLoopCounter(L, ExitingBB,
BETakenCount, SE);<br class="">
+ PHINode *IndVar = FindLoopCounter(L, ExitingBB,
BETakenCount, SE, DT);<br class="">
if (!IndVar)<br class="">
continue;<br class="">
<br class="">
<br class="">
Modified:
llvm/trunk/test/Transforms/IndVarSimplify/2011-10-27-lftrnull.ll<br
class="">
URL: <a
href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/IndVarSimplify/2011-10-27-lftrnull.ll?rev=363289&r1=363288&r2=363289&view=diff"
class="" moz-do-not-send="true">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/IndVarSimplify/2011-10-27-lftrnull.ll?rev=363289&r1=363288&r2=363289&view=diff</a><br
class="">
==============================================================================<br
class="">
---
llvm/trunk/test/Transforms/IndVarSimplify/2011-10-27-lftrnull.ll
(original)<br class="">
+++
llvm/trunk/test/Transforms/IndVarSimplify/2011-10-27-lftrnull.ll
Thu Jun 13 11:23:13 2019<br class="">
@@ -28,13 +28,15 @@ define void @test() nounwind {<br
class="">
; CHECK-NEXT: br label [[FOR_BODY21_I:%.*]]<br
class="">
; CHECK: for.body21.i:<br class="">
; CHECK-NEXT: [[DESTYPIXELPTR_010_I:%.*]] = phi i8* [
null, [[FOR_BODY21_LR_PH_I]] ], [ [[INCDEC_PTR_I:%.*]],
[[IF_END_I126:%.*]] ]<br class="">
+; CHECK-NEXT: [[X_09_I:%.*]] = phi i32 [ 0,
[[FOR_BODY21_LR_PH_I]] ], [ [[INC_I125:%.*]],
[[IF_END_I126]] ]<br class="">
; CHECK-NEXT: br i1 undef, label [[IF_END_I126]],
label [[IF_ELSE_I124:%.*]]<br class="">
; CHECK: if.else.i124:<br class="">
; CHECK-NEXT: store i8 undef, i8*
[[DESTYPIXELPTR_010_I]], align 1<br class="">
; CHECK-NEXT: br label [[IF_END_I126]]<br class="">
; CHECK: if.end.i126:<br class="">
; CHECK-NEXT: [[INCDEC_PTR_I]] = getelementptr
inbounds i8, i8* [[DESTYPIXELPTR_010_I]], i32 1<br
class="">
-; CHECK-NEXT: [[EXITCOND:%.*]] = icmp ne i8*
[[INCDEC_PTR_I]], null<br class="">
+; CHECK-NEXT: [[INC_I125]] = add nuw i32 [[X_09_I]],
1<br class="">
+; CHECK-NEXT: [[EXITCOND:%.*]] = icmp ne i32
[[INC_I125]], undef<br class="">
; CHECK-NEXT: br i1 [[EXITCOND]], label
[[FOR_BODY21_I]], label [[FOR_END_I129_LOOPEXIT:%.*]]<br
class="">
; CHECK: for.end.i129.loopexit:<br class="">
; CHECK-NEXT: br label [[FOR_END_I129]]<br class="">
<br class="">
Modified:
llvm/trunk/test/Transforms/IndVarSimplify/2011-11-01-lftrptr.ll<br
class="">
URL: <a
href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/IndVarSimplify/2011-11-01-lftrptr.ll?rev=363289&r1=363288&r2=363289&view=diff"
class="" moz-do-not-send="true">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/IndVarSimplify/2011-11-01-lftrptr.ll?rev=363289&r1=363288&r2=363289&view=diff</a><br
class="">
==============================================================================<br
class="">
---
llvm/trunk/test/Transforms/IndVarSimplify/2011-11-01-lftrptr.ll
(original)<br class="">
+++
llvm/trunk/test/Transforms/IndVarSimplify/2011-11-01-lftrptr.ll
Thu Jun 13 11:23:13 2019<br class="">
@@ -301,13 +301,12 @@ define void @testnullptr([512 x
i8]* %ba<br class="">
; PTR64-NEXT: [[CMP1604192:%.*]] = icmp ult i8*
undef, [[ADD_PTR1603]]<br class="">
; PTR64-NEXT: br i1 [[CMP1604192]], label
[[FOR_BODY_PREHEADER:%.*]], label [[FOR_END1609:%.*]]<br
class="">
; PTR64: for.body.preheader:<br class="">
-; PTR64-NEXT: [[SCEVGEP:%.*]] = getelementptr [512 x
i8], [512 x i8]* [[BASE]], i64 1, i64 0<br class="">
; PTR64-NEXT: br label [[FOR_BODY:%.*]]<br class="">
; PTR64: for.body:<br class="">
; PTR64-NEXT: [[R_17193:%.*]] = phi i8* [
[[INCDEC_PTR1608:%.*]], [[FOR_BODY]] ], [ null,
[[FOR_BODY_PREHEADER]] ]<br class="">
; PTR64-NEXT: [[INCDEC_PTR1608]] = getelementptr i8,
i8* [[R_17193]], i64 1<br class="">
-; PTR64-NEXT: [[EXITCOND:%.*]] = icmp ne i8*
[[INCDEC_PTR1608]], [[SCEVGEP]]<br class="">
-; PTR64-NEXT: br i1 [[EXITCOND]], label
[[FOR_BODY]], label [[FOR_END1609_LOOPEXIT:%.*]]<br
class="">
+; PTR64-NEXT: [[CMP1604:%.*]] = icmp ult i8*
[[INCDEC_PTR1608]], [[ADD_PTR1603]]<br class="">
+; PTR64-NEXT: br i1 [[CMP1604]], label [[FOR_BODY]],
label [[FOR_END1609_LOOPEXIT:%.*]]<br class="">
; PTR64: for.end1609.loopexit:<br class="">
; PTR64-NEXT: br label [[FOR_END1609]]<br class="">
; PTR64: for.end1609:<br class="">
@@ -321,13 +320,12 @@ define void @testnullptr([512 x
i8]* %ba<br class="">
; PTR32-NEXT: [[CMP1604192:%.*]] = icmp ult i8*
undef, [[ADD_PTR1603]]<br class="">
; PTR32-NEXT: br i1 [[CMP1604192]], label
[[FOR_BODY_PREHEADER:%.*]], label [[FOR_END1609:%.*]]<br
class="">
; PTR32: for.body.preheader:<br class="">
-; PTR32-NEXT: [[SCEVGEP:%.*]] = getelementptr [512 x
i8], [512 x i8]* [[BASE]], i32 1, i32 0<br class="">
; PTR32-NEXT: br label [[FOR_BODY:%.*]]<br class="">
; PTR32: for.body:<br class="">
; PTR32-NEXT: [[R_17193:%.*]] = phi i8* [
[[INCDEC_PTR1608:%.*]], [[FOR_BODY]] ], [ null,
[[FOR_BODY_PREHEADER]] ]<br class="">
; PTR32-NEXT: [[INCDEC_PTR1608]] = getelementptr i8,
i8* [[R_17193]], i64 1<br class="">
-; PTR32-NEXT: [[EXITCOND:%.*]] = icmp ne i8*
[[INCDEC_PTR1608]], [[SCEVGEP]]<br class="">
-; PTR32-NEXT: br i1 [[EXITCOND]], label
[[FOR_BODY]], label [[FOR_END1609_LOOPEXIT:%.*]]<br
class="">
+; PTR32-NEXT: [[CMP1604:%.*]] = icmp ult i8*
[[INCDEC_PTR1608]], [[ADD_PTR1603]]<br class="">
+; PTR32-NEXT: br i1 [[CMP1604]], label [[FOR_BODY]],
label [[FOR_END1609_LOOPEXIT:%.*]]<br class="">
; PTR32: for.end1609.loopexit:<br class="">
; PTR32-NEXT: br label [[FOR_END1609]]<br class="">
; PTR32: for.end1609:<br class="">
<br class="">
Modified:
llvm/trunk/test/Transforms/IndVarSimplify/lftr-dead-ivs.ll<br
class="">
URL: <a
href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/IndVarSimplify/lftr-dead-ivs.ll?rev=363289&r1=363288&r2=363289&view=diff"
class="" moz-do-not-send="true">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/IndVarSimplify/lftr-dead-ivs.ll?rev=363289&r1=363288&r2=363289&view=diff</a><br
class="">
==============================================================================<br
class="">
---
llvm/trunk/test/Transforms/IndVarSimplify/lftr-dead-ivs.ll
(original)<br class="">
+++
llvm/trunk/test/Transforms/IndVarSimplify/lftr-dead-ivs.ll
Thu Jun 13 11:23:13 2019<br class="">
@@ -25,14 +25,16 @@ define void
@neg_dynamically_dead_inboun<br class="">
; CHECK-NEXT: entry:<br class="">
; CHECK-NEXT: br label [[LOOP:%.*]]<br class="">
; CHECK: loop:<br class="">
-; CHECK-NEXT: [[P_0:%.*]] = phi i8* [ getelementptr
inbounds ([240 x i8], [240 x i8]* @data, i64 0, i64 0),
[[ENTRY:%.*]] ], [ [[TMP3:%.*]], [[CONT:%.*]] ]<br
class="">
+; CHECK-NEXT: [[I_0:%.*]] = phi i8 [ 0,
[[ENTRY:%.*]] ], [ [[TMP4:%.*]], [[CONT:%.*]] ]<br
class="">
+; CHECK-NEXT: [[P_0:%.*]] = phi i8* [ getelementptr
inbounds ([240 x i8], [240 x i8]* @data, i64 0, i64 0),
[[ENTRY]] ], [ [[TMP3:%.*]], [[CONT]] ]<br class="">
; CHECK-NEXT: [[TMP3]] = getelementptr inbounds i8,
i8* [[P_0]], i64 1<br class="">
; CHECK-NEXT: br i1 [[ALWAYS_FALSE:%.*]], label
[[NEVER_EXECUTED:%.*]], label [[CONT]]<br class="">
; CHECK: never_executed:<br class="">
; CHECK-NEXT: store volatile i8 0, i8* [[TMP3]]<br
class="">
; CHECK-NEXT: br label [[CONT]]<br class="">
; CHECK: cont:<br class="">
-; CHECK-NEXT: [[EXITCOND:%.*]] = icmp ne i8*
[[TMP3]], getelementptr (i8, i8* getelementptr inbounds
([240 x i8], [240 x i8]* @data, i64 0, i64 0), i64 246)<br
class="">
+; CHECK-NEXT: [[TMP4]] = add nuw i8 [[I_0]], 1<br
class="">
+; CHECK-NEXT: [[EXITCOND:%.*]] = icmp ne i8
[[TMP4]], -10<br class="">
; CHECK-NEXT: br i1 [[EXITCOND]], label [[LOOP]],
label [[EXIT:%.*]]<br class="">
; CHECK: exit:<br class="">
; CHECK-NEXT: ret void<br class="">
@@ -110,7 +112,7 @@ define void @dom_store_preinc() #0 {<br
class="">
; CHECK-NEXT: [[P_0:%.*]] = phi i8* [ getelementptr
inbounds ([240 x i8], [240 x i8]* @data, i64 0, i64 0),
[[ENTRY:%.*]] ], [ [[TMP3:%.*]], [[LOOP]] ]<br class="">
; CHECK-NEXT: store volatile i8 0, i8* [[P_0]]<br
class="">
; CHECK-NEXT: [[TMP3]] = getelementptr inbounds i8,
i8* [[P_0]], i64 1<br class="">
-; CHECK-NEXT: [[EXITCOND:%.*]] = icmp ne i8*
[[TMP3]], getelementptr (i8, i8* getelementptr inbounds
([240 x i8], [240 x i8]* @data, i64 0, i64 0), i64 246)<br
class="">
+; CHECK-NEXT: [[EXITCOND:%.*]] = icmp ne i8*
[[P_0]], getelementptr (i8, i8* getelementptr inbounds
([240 x i8], [240 x i8]* @data, i64 0, i64 0), i64 245)<br
class="">
; CHECK-NEXT: br i1 [[EXITCOND]], label [[LOOP]],
label [[EXIT:%.*]]<br class="">
; CHECK: exit:<br class="">
; CHECK-NEXT: ret void<br class="">
<br class="">
Modified:
llvm/trunk/test/Transforms/IndVarSimplify/lftr.ll<br
class="">
URL: <a
href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/IndVarSimplify/lftr.ll?rev=363289&r1=363288&r2=363289&view=diff"
class="" moz-do-not-send="true">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/IndVarSimplify/lftr.ll?rev=363289&r1=363288&r2=363289&view=diff</a><br
class="">
==============================================================================<br
class="">
--- llvm/trunk/test/Transforms/IndVarSimplify/lftr.ll
(original)<br class="">
+++ llvm/trunk/test/Transforms/IndVarSimplify/lftr.ll
Thu Jun 13 11:23:13 2019<br class="">
@@ -167,7 +167,7 @@ define void @test_zext(i8* %a) #0 {<br
class="">
; CHECK-NEXT: [[TMP2:%.*]] = load i8, i8* [[DOT0]],
align 1<br class="">
; CHECK-NEXT: [[TMP3]] = getelementptr inbounds i8,
i8* [[P_0]], i64 1<br class="">
; CHECK-NEXT: store i8 [[TMP2]], i8* [[P_0]], align 1<br
class="">
-; CHECK-NEXT: [[EXITCOND:%.*]] = icmp ne i8*
[[TMP3]], getelementptr (i8, i8* getelementptr inbounds
([240 x i8], [240 x i8]* @data, i64 0, i64 0), i64 240)<br
class="">
+; CHECK-NEXT: [[EXITCOND:%.*]] = icmp ne i8*
[[P_0]], getelementptr inbounds ([240 x i8], [240 x i8]*
@data, i64 0, i64 239)<br class="">
; CHECK-NEXT: br i1 [[EXITCOND]], label [[LOOP]],
label [[EXIT:%.*]]<br class="">
; CHECK: exit:<br class="">
; CHECK-NEXT: ret void<br class="">
<br class="">
<br class="">
_______________________________________________<br
class="">
llvm-commits mailing list<br class="">
<a href="mailto:llvm-commits@lists.llvm.org" class=""
moz-do-not-send="true">llvm-commits@lists.llvm.org</a><br
class="">
<a class="moz-txt-link-freetext" href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</blockquote>
</body>
</html>