llvm.org GIT mirror llvm / 789558d
Wind SCEV back in time, to Nov 18th. This 'fixes' PR3275, PR3294, PR3295, PR3296 and PR3302. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62160 91177308-0d34-0410-b5e6-96231b3b80d8 Nick Lewycky 11 years ago
12 changed file(s) with 52 addition(s) and 268 deletion(s). Raw diff Collapse all Expand all
224224 return getMulExpr(Ops);
225225 }
226226 SCEVHandle getUDivExpr(const SCEVHandle &LHS, const SCEVHandle &RHS);
227 SCEVHandle getSDivExpr(const SCEVHandle &LHS, const SCEVHandle &RHS);
228227 SCEVHandle getAddRecExpr(const SCEVHandle &Start, const SCEVHandle &Step,
229228 const Loop *L);
230229 SCEVHandle getAddRecExpr(std::vector &Operands,
1313 #ifndef LLVM_ANALYSIS_SCALAREVOLUTION_EXPANDER_H
1414 #define LLVM_ANALYSIS_SCALAREVOLUTION_EXPANDER_H
1515
16 #include "llvm/Instruction.h"
16 #include "llvm/Instructions.h"
1717 #include "llvm/Type.h"
1818 #include "llvm/Analysis/ScalarEvolution.h"
1919 #include "llvm/Analysis/ScalarEvolutionExpressions.h"
103103
104104 Value *visitUDivExpr(SCEVUDivExpr *S);
105105
106 Value *visitSDivExpr(SCEVSDivExpr *S);
107
108106 Value *visitAddRecExpr(SCEVAddRecExpr *S);
109107
110108 Value *visitSMaxExpr(SCEVSMaxExpr *S);
118116 }
119117
120118 #endif
119
2424 // These should be ordered in terms of increasing complexity to make the
2525 // folders simpler.
2626 scConstant, scTruncate, scZeroExtend, scSignExtend, scAddExpr, scMulExpr,
27 scUDivExpr, scSDivExpr, scAddRecExpr, scUMaxExpr, scSMaxExpr, scUnknown,
27 scUDivExpr, scAddRecExpr, scUMaxExpr, scSMaxExpr, scUnknown,
2828 scCouldNotCompute
2929 };
3030
352352 static inline bool classof(const SCEVUDivExpr *S) { return true; }
353353 static inline bool classof(const SCEV *S) {
354354 return S->getSCEVType() == scUDivExpr;
355 }
356 };
357
358
359 //===--------------------------------------------------------------------===//
360 /// SCEVSDivExpr - This class represents a binary signed division operation.
361 ///
362 class SCEVSDivExpr : public SCEV {
363 friend class ScalarEvolution;
364
365 SCEVHandle LHS, RHS;
366 SCEVSDivExpr(const SCEVHandle &lhs, const SCEVHandle &rhs)
367 : SCEV(scSDivExpr), LHS(lhs), RHS(rhs) {}
368
369 virtual ~SCEVSDivExpr();
370 public:
371 const SCEVHandle &getLHS() const { return LHS; }
372 const SCEVHandle &getRHS() const { return RHS; }
373
374 virtual bool isLoopInvariant(const Loop *L) const {
375 return LHS->isLoopInvariant(L) && RHS->isLoopInvariant(L);
376 }
377
378 virtual bool hasComputableLoopEvolution(const Loop *L) const {
379 return LHS->hasComputableLoopEvolution(L) &&
380 RHS->hasComputableLoopEvolution(L);
381 }
382
383 SCEVHandle replaceSymbolicValuesWithConcrete(const SCEVHandle &Sym,
384 const SCEVHandle &Conc,
385 ScalarEvolution &SE) const {
386 SCEVHandle L = LHS->replaceSymbolicValuesWithConcrete(Sym, Conc, SE);
387 SCEVHandle R = RHS->replaceSymbolicValuesWithConcrete(Sym, Conc, SE);
388 if (L == LHS && R == RHS)
389 return this;
390 else
391 return SE.getSDivExpr(L, R);
392 }
393
394
395 virtual const Type *getType() const;
396
397 void print(std::ostream &OS) const;
398 void print(std::ostream *OS) const { if (OS) print(*OS); }
399
400 /// Methods for support type inquiry through isa, cast, and dyn_cast:
401 static inline bool classof(const SCEVSDivExpr *S) { return true; }
402 static inline bool classof(const SCEV *S) {
403 return S->getSCEVType() == scSDivExpr;
404355 }
405356 };
406357
598549 return ((SC*)this)->visitMulExpr((SCEVMulExpr*)S);
599550 case scUDivExpr:
600551 return ((SC*)this)->visitUDivExpr((SCEVUDivExpr*)S);
601 case scSDivExpr:
602 return ((SC*)this)->visitSDivExpr((SCEVSDivExpr*)S);
603552 case scAddRecExpr:
604553 return ((SC*)this)->visitAddRecExpr((SCEVAddRecExpr*)S);
605554 case scSMaxExpr:
111111 SCEV::~SCEV() {}
112112 void SCEV::dump() const {
113113 print(cerr);
114 cerr << '\n';
115114 }
116115
117116 uint32_t SCEV::getBitWidth() const {
323322 const Type *SCEVUDivExpr::getType() const {
324323 return LHS->getType();
325324 }
326
327
328 // SCEVSDivs - Only allow the creation of one SCEVSDivExpr for any particular
329 // input. Don't use a SCEVHandle here, or else the object will never be
330 // deleted!
331 static ManagedStatic,
332 SCEVSDivExpr*> > SCEVSDivs;
333
334 SCEVSDivExpr::~SCEVSDivExpr() {
335 SCEVSDivs->erase(std::make_pair(LHS, RHS));
336 }
337
338 void SCEVSDivExpr::print(std::ostream &OS) const {
339 OS << "(" << *LHS << " /s " << *RHS << ")";
340 }
341
342 const Type *SCEVSDivExpr::getType() const {
343 return LHS->getType();
344 }
345
346325
347326 // SCEVAddRecExprs - Only allow the creation of one SCEVAddRecExpr for any
348327 // particular input. Don't use a SCEVHandle here, or else the object will never
11291108 }
11301109
11311110 SCEVHandle ScalarEvolution::getUDivExpr(const SCEVHandle &LHS, const SCEVHandle &RHS) {
1132 if (LHS == RHS)
1133 return getIntegerSCEV(1, LHS->getType()); // X udiv X --> 1
1134
11351111 if (SCEVConstant *RHSC = dyn_cast(RHS)) {
11361112 if (RHSC->getValue()->equalsInt(1))
1137 return LHS; // X udiv 1 --> X
1113 return LHS; // X udiv 1 --> x
11381114
11391115 if (SCEVConstant *LHSC = dyn_cast(LHS)) {
11401116 Constant *LHSCV = LHSC->getValue();
11431119 }
11441120 }
11451121
1122 // FIXME: implement folding of (X*4)/4 when we know X*4 doesn't overflow.
1123
11461124 SCEVUDivExpr *&Result = (*SCEVUDivs)[std::make_pair(LHS, RHS)];
11471125 if (Result == 0) Result = new SCEVUDivExpr(LHS, RHS);
1148 return Result;
1149 }
1150
1151 SCEVHandle ScalarEvolution::getSDivExpr(const SCEVHandle &LHS, const SCEVHandle &RHS) {
1152 if (LHS == RHS)
1153 return getIntegerSCEV(1, LHS->getType()); // X sdiv X --> 1
1154
1155 if (SCEVConstant *RHSC = dyn_cast(RHS)) {
1156 if (RHSC->getValue()->equalsInt(1))
1157 return LHS; // X sdiv 1 --> X
1158
1159 if (RHSC->getValue()->isAllOnesValue())
1160 return getNegativeSCEV(LHS); // X sdiv -1 --> -X
1161
1162 if (SCEVConstant *LHSC = dyn_cast(LHS)) {
1163 Constant *LHSCV = LHSC->getValue();
1164 Constant *RHSCV = RHSC->getValue();
1165 return getUnknown(ConstantExpr::getSDiv(LHSCV, RHSCV));
1166 }
1167 }
1168
1169 SCEVSDivExpr *&Result = (*SCEVSDivs)[std::make_pair(LHS, RHS)];
1170 if (Result == 0) Result = new SCEVSDivExpr(LHS, RHS);
11711126 return Result;
11721127 }
11731128
15211476 /// specified less-than comparison will execute. If not computable, return
15221477 /// UnknownValue. isSigned specifies whether the less-than is signed.
15231478 SCEVHandle HowManyLessThans(SCEV *LHS, SCEV *RHS, const Loop *L,
1524 bool isSigned, bool trueWhenEqual);
1479 bool isSigned);
15251480
15261481 /// getPredecessorWithUniqueSuccessorForBB - Return a predecessor of BB
15271482 /// (which may not be an immediate predecessor) which has exactly one
15311486
15321487 /// executesAtLeastOnce - Test whether entry to the loop is protected by
15331488 /// a conditional between LHS and RHS.
1534 bool executesAtLeastOnce(const Loop *L, bool isSigned, bool trueWhenEqual,
1535 SCEV *LHS, SCEV *RHS);
1536
1537 /// potentialInfiniteLoop - Test whether the loop might jump over the exit value
1538 /// due to wrapping.
1539 bool potentialInfiniteLoop(SCEV *Stride, SCEV *RHS, bool isSigned,
1540 bool trueWhenEqual);
1489 bool executesAtLeastOnce(const Loop *L, bool isSigned, SCEV *LHS, SCEV *RHS);
15411490
15421491 /// getConstantEvolutionLoopExitValue - If we know that the specified Phi is
15431492 /// in the header of its containing loop, we know the loop executes a
17761725 return MinOpRes;
17771726 }
17781727
1779 // SCEVUDivExpr, SCEVSDivExpr, SCEVUnknown
1728 // SCEVUDivExpr, SCEVUnknown
17801729 return 0;
17811730 }
17821731
18051754 getSCEV(U->getOperand(1)));
18061755 case Instruction::UDiv:
18071756 return SE.getUDivExpr(getSCEV(U->getOperand(0)),
1808 getSCEV(U->getOperand(1)));
1809 case Instruction::SDiv:
1810 return SE.getSDivExpr(getSCEV(U->getOperand(0)),
18111757 getSCEV(U->getOperand(1)));
18121758 case Instruction::Sub:
18131759 return SE.getMinusSCEV(getSCEV(U->getOperand(0)),
18521798 break;
18531799
18541800 case Instruction::LShr:
1855 // Turn logical shift right of a constant into an unsigned divide.
1801 // Turn logical shift right of a constant into a unsigned divide.
18561802 if (ConstantInt *SA = dyn_cast(U->getOperand(1))) {
18571803 uint32_t BitWidth = cast(V->getType())->getBitWidth();
18581804 Constant *X = ConstantInt::get(
20782024 break;
20792025 }
20802026 case ICmpInst::ICMP_SLT: {
2081 SCEVHandle TC = HowManyLessThans(LHS, RHS, L, true, false);
2027 SCEVHandle TC = HowManyLessThans(LHS, RHS, L, true);
20822028 if (!isa(TC)) return TC;
20832029 break;
20842030 }
20852031 case ICmpInst::ICMP_SGT: {
20862032 SCEVHandle TC = HowManyLessThans(SE.getNotSCEV(LHS),
2087 SE.getNotSCEV(RHS), L, true, false);
2033 SE.getNotSCEV(RHS), L, true);
20882034 if (!isa(TC)) return TC;
20892035 break;
20902036 }
20912037 case ICmpInst::ICMP_ULT: {
2092 SCEVHandle TC = HowManyLessThans(LHS, RHS, L, false, false);
2038 SCEVHandle TC = HowManyLessThans(LHS, RHS, L, false);
20932039 if (!isa(TC)) return TC;
20942040 break;
20952041 }
20962042 case ICmpInst::ICMP_UGT: {
20972043 SCEVHandle TC = HowManyLessThans(SE.getNotSCEV(LHS),
2098 SE.getNotSCEV(RHS), L, false, false);
2099 if (!isa(TC)) return TC;
2100 break;
2101 }
2102 case ICmpInst::ICMP_SLE: {
2103 SCEVHandle TC = HowManyLessThans(LHS, RHS, L, true, true);
2104 if (!isa(TC)) return TC;
2105 break;
2106 }
2107 case ICmpInst::ICMP_SGE: {
2108 SCEVHandle TC = HowManyLessThans(SE.getNotSCEV(LHS),
2109 SE.getNotSCEV(RHS), L, true, true);
2110 if (!isa(TC)) return TC;
2111 break;
2112 }
2113 case ICmpInst::ICMP_ULE: {
2114 SCEVHandle TC = HowManyLessThans(LHS, RHS, L, false, true);
2115 if (!isa(TC)) return TC;
2116 break;
2117 }
2118 case ICmpInst::ICMP_UGE: {
2119 SCEVHandle TC = HowManyLessThans(SE.getNotSCEV(LHS),
2120 SE.getNotSCEV(RHS), L, false, true);
2044 SE.getNotSCEV(RHS), L, false);
21212045 if (!isa(TC)) return TC;
21222046 break;
21232047 }
25522476 return Comm;
25532477 }
25542478
2555 if (SCEVUDivExpr *UDiv = dyn_cast(V)) {
2556 SCEVHandle LHS = getSCEVAtScope(UDiv->getLHS(), L);
2479 if (SCEVUDivExpr *Div = dyn_cast(V)) {
2480 SCEVHandle LHS = getSCEVAtScope(Div->getLHS(), L);
25572481 if (LHS == UnknownValue) return LHS;
2558 SCEVHandle RHS = getSCEVAtScope(UDiv->getRHS(), L);
2482 SCEVHandle RHS = getSCEVAtScope(Div->getRHS(), L);
25592483 if (RHS == UnknownValue) return RHS;
2560 if (LHS == UDiv->getLHS() && RHS == UDiv->getRHS())
2561 return UDiv; // must be loop invariant
2484 if (LHS == Div->getLHS() && RHS == Div->getRHS())
2485 return Div; // must be loop invariant
25622486 return SE.getUDivExpr(LHS, RHS);
2563 }
2564
2565 if (SCEVSDivExpr *SDiv = dyn_cast(V)) {
2566 SCEVHandle LHS = getSCEVAtScope(SDiv->getLHS(), L);
2567 if (LHS == UnknownValue) return LHS;
2568 SCEVHandle RHS = getSCEVAtScope(SDiv->getRHS(), L);
2569 if (RHS == UnknownValue) return RHS;
2570 if (LHS == SDiv->getLHS() && RHS == SDiv->getRHS())
2571 return SDiv; // must be loop invariant
2572 return SE.getSDivExpr(LHS, RHS);
25732487 }
25742488
25752489 // If this is a loop recurrence for a loop that does not contain L, then we
28232737 /// executesAtLeastOnce - Test whether entry to the loop is protected by
28242738 /// a conditional between LHS and RHS.
28252739 bool ScalarEvolutionsImpl::executesAtLeastOnce(const Loop *L, bool isSigned,
2826 bool trueWhenEqual,
28272740 SCEV *LHS, SCEV *RHS) {
28282741 BasicBlock *Preheader = L->getLoopPreheader();
28292742 BasicBlock *PreheaderDest = L->getHeader();
28562769
28572770 switch (Cond) {
28582771 case ICmpInst::ICMP_UGT:
2859 if (isSigned || trueWhenEqual) continue;
2772 if (isSigned) continue;
28602773 std::swap(PreCondLHS, PreCondRHS);
28612774 Cond = ICmpInst::ICMP_ULT;
28622775 break;
28632776 case ICmpInst::ICMP_SGT:
2864 if (!isSigned || trueWhenEqual) continue;
2777 if (!isSigned) continue;
28652778 std::swap(PreCondLHS, PreCondRHS);
28662779 Cond = ICmpInst::ICMP_SLT;
28672780 break;
28682781 case ICmpInst::ICMP_ULT:
2869 if (isSigned || trueWhenEqual) continue;
2782 if (isSigned) continue;
28702783 break;
28712784 case ICmpInst::ICMP_SLT:
2872 if (!isSigned || trueWhenEqual) continue;
2873 break;
2874 case ICmpInst::ICMP_UGE:
2875 if (isSigned || !trueWhenEqual) continue;
2876 std::swap(PreCondLHS, PreCondRHS);
2877 Cond = ICmpInst::ICMP_ULE;
2878 break;
2879 case ICmpInst::ICMP_SGE:
2880 if (!isSigned || !trueWhenEqual) continue;
2881 std::swap(PreCondLHS, PreCondRHS);
2882 Cond = ICmpInst::ICMP_SLE;
2883 break;
2884 case ICmpInst::ICMP_ULE:
2885 if (isSigned || !trueWhenEqual) continue;
2886 break;
2887 case ICmpInst::ICMP_SLE:
2888 if (!isSigned || !trueWhenEqual) continue;
2785 if (!isSigned) continue;
28892786 break;
28902787 default:
28912788 continue;
29042801 return false;
29052802 }
29062803
2907 /// potentialInfiniteLoop - Test whether the loop might jump over the exit value
2908 /// due to wrapping around 2^n.
2909 bool ScalarEvolutionsImpl::potentialInfiniteLoop(SCEV *Stride, SCEV *RHS,
2910 bool isSigned, bool trueWhenEqual) {
2911 // Return true when the distance from RHS to maxint > Stride.
2912
2913 SCEVConstant *SC = dyn_cast(Stride);
2914 if (!SC)
2915 return true;
2916
2917 if (SC->getValue()->isZero())
2918 return true;
2919 if (!trueWhenEqual && SC->getValue()->isOne())
2920 return false;
2921
2922 SCEVConstant *R = dyn_cast(RHS);
2923 if (!R)
2924 return true;
2925
2926 // If negative, it wraps around every iteration, but we don't care about that.
2927 APInt S = SC->getValue()->getValue().abs();
2928
2929 uint32_t Width = R->getValue()->getBitWidth();
2930 APInt Dist = (isSigned ? APInt::getSignedMaxValue(Width)
2931 : APInt::getMaxValue(Width))
2932 - R->getValue()->getValue();
2933
2934 // Because we're looking at distance, we perform an unsigned comparison,
2935 // regardless of the sign of the computation.
2936 if (trueWhenEqual)
2937 return !S.ult(Dist);
2938 else
2939 return !S.ule(Dist);
2940 }
2941
29422804 /// HowManyLessThans - Return the number of times a backedge containing the
29432805 /// specified less-than comparison will execute. If not computable, return
29442806 /// UnknownValue.
29452807 SCEVHandle ScalarEvolutionsImpl::
2946 HowManyLessThans(SCEV *LHS, SCEV *RHS, const Loop *L,
2947 bool isSigned, bool trueWhenEqual) {
2808 HowManyLessThans(SCEV *LHS, SCEV *RHS, const Loop *L, bool isSigned) {
29482809 // Only handle: "ADDREC < LoopInvariant".
29492810 if (!RHS->isLoopInvariant(L)) return UnknownValue;
29502811
29532814 return UnknownValue;
29542815
29552816 if (AddRec->isAffine()) {
2956 SCEVHandle Stride = AddRec->getOperand(1);
2957 if (potentialInfiniteLoop(Stride, RHS, isSigned, trueWhenEqual))
2817 // FORNOW: We only support unit strides.
2818 SCEVHandle One = SE.getIntegerSCEV(1, RHS->getType());
2819 if (AddRec->getOperand(1) != One)
29582820 return UnknownValue;
29592821
2960 // We don't handle this correctly at the moment. The problem is that when
2961 // the stride is negative, we're not counting how many times 'less-than' is
2962 // true as we approach it, we're counting how far away we are from wrapping
2963 // around the backside.
2964 if (isSigned &&
2965 cast(Stride)->getValue()->getValue().isNegative())
2966 return UnknownValue;
2967
2968 // We know the LHS is of the form {n,+,s} and the RHS is some loop-invariant
2969 // m. So, we count the number of iterations in which {n,+,s} < m is true.
2970 // Note that we cannot simply return max(m-n,0)/s because it's not safe to
2822 // We know the LHS is of the form {n,+,1} and the RHS is some loop-invariant
2823 // m. So, we count the number of iterations in which {n,+,1} < m is true.
2824 // Note that we cannot simply return max(m-n,0) because it's not safe to
29712825 // treat m-n as signed nor unsigned due to overflow possibility.
2972 //
2973 // Assuming that the loop will run at least once, we know that it will
2974 // run (m-n)/s times.
29752826
29762827 // First, we get the value of the LHS in the first iteration: n
29772828 SCEVHandle Start = AddRec->getOperand(0);
29782829
2979 SCEVHandle One = SE.getIntegerSCEV(1, RHS->getType());
2980
2981 // If the expression is less-than-or-equal to, we need to extend the
2982 // loop by one iteration.
2983 //
2984 // The loop won't actually run (m-n)/s times because the loop iterations
2985 // might not divide cleanly. For example, if you have {2,+,5} u< 10 the
2986 // division would equal one, but the loop runs twice putting the
2987 // induction variable at 12.
2988 SCEVHandle End = SE.getAddExpr(RHS, Stride);
2989 if (!trueWhenEqual)
2990 End = SE.getMinusSCEV(End, One);
2991
2992 if (!executesAtLeastOnce(L, isSigned, trueWhenEqual,
2993 SE.getMinusSCEV(Start, One), RHS)) {
2994 // If not, we get the value of the LHS in the first iteration in which
2995 // the above condition doesn't hold. This equals to max(m,n).
2996 End = isSigned ? SE.getSMaxExpr(End, Start)
2997 : SE.getUMaxExpr(End, Start);
2998 }
2999
3000 // Finally, we subtract these two values to get the number of times the
3001 // backedge is executed: (max(m,n)-n)/s.
3002 //
3003 // Note that a trip count is always positive. Using SDiv here produces
3004 // wrong answers when Start < End.
3005 return SE.getUDivExpr(SE.getMinusSCEV(End, Start), Stride);
2830 if (executesAtLeastOnce(L, isSigned,
2831 SE.getMinusSCEV(AddRec->getOperand(0), One), RHS)) {
2832 // Since we know that the condition is true in order to enter the loop,
2833 // we know that it will run exactly m-n times.
2834 return SE.getMinusSCEV(RHS, Start);
2835 } else {
2836 // Then, we get the value of the LHS in the first iteration in which the
2837 // above condition doesn't hold. This equals to max(m,n).
2838 SCEVHandle End = isSigned ? SE.getSMaxExpr(RHS, Start)
2839 : SE.getUMaxExpr(RHS, Start);
2840
2841 // Finally, we subtract these two values to get the number of times the
2842 // backedge is executed: max(m,n)-n.
2843 return SE.getMinusSCEV(End, Start);
2844 }
30062845 }
30072846
30082847 return UnknownValue;
142142 return InsertBinop(Instruction::UDiv, LHS, RHS, InsertPt);
143143 }
144144
145 Value *SCEVExpander::visitSDivExpr(SCEVSDivExpr *S) {
146 // Do not fold sdiv into ashr, unless you know that LHS is positive. On
147 // negative values, it rounds the wrong way.
148
149 Value *LHS = expand(S->getLHS());
150 Value *RHS = expand(S->getRHS());
151 return InsertBinop(Instruction::SDiv, LHS, RHS, InsertPt);
152 }
153
154145 Value *SCEVExpander::visitAddRecExpr(SCEVAddRecExpr *S) {
155146 const Type *Ty = S->getType();
156147 const Loop *L = S->getLoop();
0 ; RUN: llvm-as < %s | opt -analyze -scalar-evolution |& \
11 ; RUN: grep {Loop bb: (7 + (-1 \\* %argc)) iterations!}
2 ; XFAIL: *
23
34 define i32 @main(i32 %argc, i8** %argv) nounwind {
45 entry:
0 ; RUN: llvm-as < %s | opt -analyze -scalar-evolution |& grep {/u 3}
1 ; XFAIL: *
12
23 define i32 @f(i32 %x) nounwind readnone {
34 entry:
0 ; RUN: llvm-as < %s | opt -analyze -scalar-evolution |& grep {/u 3}
1 ; XFAIL: *
12
23 define i32 @f(i32 %x) nounwind readnone {
34 entry:
0 ; RUN: llvm-as < %s | opt -analyze -scalar-evolution | grep {255 iterations}
1 ; XFAIL: *
12
23 define i32 @foo(i32 %x, i32 %y, i32* %lam, i32* %alp) nounwind {
34 bb1.thread:
0 ; RUN: llvm-as < %s | opt -analyze -scalar-evolution | grep {0 smax}
1 ; XFAIL: *
12
23 define i32 @f(i32 %c.idx.val) {
34
0 ; RUN: llvm-as < %s | opt -analyze -scalar-evolution |& \
11 ; RUN: grep {(((-1 \\* %i0) + (100005 smax %i0)) /u 5)}
2 ; XFAIL: *
23
34 define i32 @foo0(i32 %i0) nounwind {
45 entry:
0 ; RUN: llvm-as < %s | opt -analyze -scalar-evolution |& grep {/u 5}
1 ; XFAIL: *
12
23 define i8 @foo0(i8 %i0) nounwind {
34 entry: