diff --git a/lib/Analysis/DependenceAnalysis.cpp b/lib/Analysis/DependenceAnalysis.cpp index 6291e995847..684da98ce25 100644 --- a/lib/Analysis/DependenceAnalysis.cpp +++ b/lib/Analysis/DependenceAnalysis.cpp @@ -2218,7 +2218,7 @@ bool DependenceAnalysis::gcdMIVtest(const SCEV *Src, FullDependence &Result) const { DEBUG(dbgs() << "starting gcd\n"); ++GCDapplications; - unsigned BitWidth = Src->getType()->getIntegerBitWidth(); + unsigned BitWidth = SE->getTypeSizeInBits(Src->getType()); APInt RunningGCD = APInt::getNullValue(BitWidth); // Examine Src coefficients. @@ -3194,7 +3194,8 @@ static void dumpSmallBitVector(SmallBitVector &BV) { // Goff, Kennedy, Tseng // PLDI 1991 // -// Care is required to keep the code below up to date w.r.t. this routine. +// Care is required to keep the routine below, getSplitIteration(), +// up to date with respect to this routine. Dependence *DependenceAnalysis::depends(Instruction *Src, Instruction *Dst, bool PossiblyLoopIndependent) { @@ -3203,9 +3204,11 @@ Dependence *DependenceAnalysis::depends(Instruction *Src, // if both instructions don't reference memory, there's no dependence return NULL; - if (!isLoadOrStore(Src) || !isLoadOrStore(Dst)) + if (!isLoadOrStore(Src) || !isLoadOrStore(Dst)) { // can only analyze simple loads and stores, i.e., no calls, invokes, etc. + DEBUG(dbgs() << "can only handle simple loads and stores\n"); return new Dependence(Src, Dst); + } Value *SrcPtr = getPointerOperand(Src); Value *DstPtr = getPointerOperand(Dst); @@ -3214,22 +3217,16 @@ Dependence *DependenceAnalysis::depends(Instruction *Src, case AliasAnalysis::MayAlias: case AliasAnalysis::PartialAlias: // cannot analyse objects if we don't understand their aliasing. + DEBUG(dbgs() << "can't analyze may or partial alias\n"); return new Dependence(Src, Dst); case AliasAnalysis::NoAlias: // If the objects noalias, they are distinct, accesses are independent. + DEBUG(dbgs() << "no alias\n"); return NULL; case AliasAnalysis::MustAlias: break; // The underlying objects alias; test accesses for dependence. } - GEPOperator *SrcGEP = dyn_cast(SrcPtr); - GEPOperator *DstGEP = dyn_cast(DstPtr); - if (!SrcGEP || !DstGEP) - return new Dependence(Src, Dst); // missing GEP, assume dependence - - if (SrcGEP->getPointerOperandType() != DstGEP->getPointerOperandType()) - return new Dependence(Src, Dst); // different types, assume dependence - // establish loop nesting levels establishNestingLevels(Src, Dst); DEBUG(dbgs() << " common nesting levels = " << CommonLevels << "\n"); @@ -3238,36 +3235,62 @@ Dependence *DependenceAnalysis::depends(Instruction *Src, FullDependence Result(Src, Dst, PossiblyLoopIndependent, CommonLevels); ++TotalArrayPairs; - // classify subscript pairs - unsigned Pairs = SrcGEP->idx_end() - SrcGEP->idx_begin(); - SmallVector Pair(Pairs); - for (unsigned SI = 0; SI < Pairs; ++SI) { - Pair[SI].Loops.resize(MaxLevels + 1); - Pair[SI].GroupLoops.resize(MaxLevels + 1); - Pair[SI].Group.resize(Pairs); + // See if there are GEPs we can use. + bool UsefulGEP = false; + GEPOperator *SrcGEP = dyn_cast(SrcPtr); + GEPOperator *DstGEP = dyn_cast(DstPtr); + if (SrcGEP && DstGEP && + SrcGEP->getPointerOperandType() == DstGEP->getPointerOperandType()) { + const SCEV *SrcPtrSCEV = SE->getSCEV(SrcGEP->getPointerOperand()); + const SCEV *DstPtrSCEV = SE->getSCEV(DstGEP->getPointerOperand()); + DEBUG(dbgs() << " SrcPtrSCEV = " << *SrcPtrSCEV << "\n"); + DEBUG(dbgs() << " DstPtrSCEV = " << *DstPtrSCEV << "\n"); + + UsefulGEP = + isLoopInvariant(SrcPtrSCEV, LI->getLoopFor(Src->getParent())) && + isLoopInvariant(DstPtrSCEV, LI->getLoopFor(Dst->getParent())); } - Pairs = 0; - for (GEPOperator::const_op_iterator SrcIdx = SrcGEP->idx_begin(), - SrcEnd = SrcGEP->idx_end(), - DstIdx = DstGEP->idx_begin(), - DstEnd = DstGEP->idx_end(); - SrcIdx != SrcEnd && DstIdx != DstEnd; - ++SrcIdx, ++DstIdx, ++Pairs) { - Pair[Pairs].Src = SE->getSCEV(*SrcIdx); - Pair[Pairs].Dst = SE->getSCEV(*DstIdx); - removeMatchingExtensions(&Pair[Pairs]); - Pair[Pairs].Classification = - classifyPair(Pair[Pairs].Src, LI->getLoopFor(Src->getParent()), - Pair[Pairs].Dst, LI->getLoopFor(Dst->getParent()), - Pair[Pairs].Loops); - Pair[Pairs].GroupLoops = Pair[Pairs].Loops; - Pair[Pairs].Group.set(Pairs); - DEBUG(dbgs() << " subscript " << Pairs << "\n"); - DEBUG(dbgs() << "\tsrc = " << *Pair[Pairs].Src << "\n"); - DEBUG(dbgs() << "\tdst = " << *Pair[Pairs].Dst << "\n"); - DEBUG(dbgs() << "\tclass = " << Pair[Pairs].Classification << "\n"); + unsigned Pairs = UsefulGEP ? SrcGEP->idx_end() - SrcGEP->idx_begin() : 1; + SmallVector Pair(Pairs); + if (UsefulGEP) { + DEBUG(dbgs() << " using GEPs\n"); + unsigned P = 0; + for (GEPOperator::const_op_iterator SrcIdx = SrcGEP->idx_begin(), + SrcEnd = SrcGEP->idx_end(), + DstIdx = DstGEP->idx_begin(); + SrcIdx != SrcEnd; + ++SrcIdx, ++DstIdx, ++P) { + Pair[P].Src = SE->getSCEV(*SrcIdx); + Pair[P].Dst = SE->getSCEV(*DstIdx); + } + } + else { + DEBUG(dbgs() << " ignoring GEPs\n"); + const SCEV *SrcSCEV = SE->getSCEV(SrcPtr); + const SCEV *DstSCEV = SE->getSCEV(DstPtr); + DEBUG(dbgs() << " SrcSCEV = " << *SrcSCEV << "\n"); + DEBUG(dbgs() << " DstSCEV = " << *DstSCEV << "\n"); + Pair[0].Src = SrcSCEV; + Pair[0].Dst = DstSCEV; + } + + for (unsigned P = 0; P < Pairs; ++P) { + Pair[P].Loops.resize(MaxLevels + 1); + Pair[P].GroupLoops.resize(MaxLevels + 1); + Pair[P].Group.resize(Pairs); + removeMatchingExtensions(&Pair[P]); + Pair[P].Classification = + classifyPair(Pair[P].Src, LI->getLoopFor(Src->getParent()), + Pair[P].Dst, LI->getLoopFor(Dst->getParent()), + Pair[P].Loops); + Pair[P].GroupLoops = Pair[P].Loops; + Pair[P].Group.set(P); + DEBUG(dbgs() << " subscript " << P << "\n"); + DEBUG(dbgs() << "\tsrc = " << *Pair[P].Src << "\n"); + DEBUG(dbgs() << "\tdst = " << *Pair[P].Dst << "\n"); + DEBUG(dbgs() << "\tclass = " << Pair[P].Classification << "\n"); DEBUG(dbgs() << "\tloops = "); - DEBUG(dumpSmallBitVector(Pair[Pairs].Loops)); + DEBUG(dumpSmallBitVector(Pair[P].Loops)); } SmallBitVector Separable(Pairs); @@ -3562,7 +3585,8 @@ Dependence *DependenceAnalysis::depends(Instruction *Src, // though simplified since we know that the dependence exists. // It's tedious, since we must go through all propagations, etc. // -// Care is required to keep this code up to date w.r.t. the code above. +// Care is required to keep this code up to date with respect to the routine +// above, depends(). // // Generally, the dependence analyzer will be used to build // a dependence graph for a function (basically a map from instructions @@ -3611,44 +3635,59 @@ const SCEV *DependenceAnalysis::getSplitIteration(const Dependence *Dep, assert(Dst->mayReadFromMemory() || Dst->mayWriteToMemory()); assert(isLoadOrStore(Src)); assert(isLoadOrStore(Dst)); - const Value *SrcPtr = getPointerOperand(Src); - const Value *DstPtr = getPointerOperand(Dst); + Value *SrcPtr = getPointerOperand(Src); + Value *DstPtr = getPointerOperand(Dst); assert(underlyingObjectsAlias(AA, DstPtr, SrcPtr) == AliasAnalysis::MustAlias); - const GEPOperator *SrcGEP = dyn_cast(SrcPtr); - const GEPOperator *DstGEP = dyn_cast(DstPtr); - assert(SrcGEP); - assert(DstGEP); - assert(SrcGEP->getPointerOperandType() == DstGEP->getPointerOperandType()); // establish loop nesting levels establishNestingLevels(Src, Dst); FullDependence Result(Src, Dst, false, CommonLevels); - // classify subscript pairs - unsigned Pairs = SrcGEP->idx_end() - SrcGEP->idx_begin(); - SmallVector Pair(Pairs); - for (unsigned SI = 0; SI < Pairs; ++SI) { - Pair[SI].Loops.resize(MaxLevels + 1); - Pair[SI].GroupLoops.resize(MaxLevels + 1); - Pair[SI].Group.resize(Pairs); + // See if there are GEPs we can use. + bool UsefulGEP = false; + GEPOperator *SrcGEP = dyn_cast(SrcPtr); + GEPOperator *DstGEP = dyn_cast(DstPtr); + if (SrcGEP && DstGEP && + SrcGEP->getPointerOperandType() == DstGEP->getPointerOperandType()) { + const SCEV *SrcPtrSCEV = SE->getSCEV(SrcGEP->getPointerOperand()); + const SCEV *DstPtrSCEV = SE->getSCEV(DstGEP->getPointerOperand()); + UsefulGEP = + isLoopInvariant(SrcPtrSCEV, LI->getLoopFor(Src->getParent())) && + isLoopInvariant(DstPtrSCEV, LI->getLoopFor(Dst->getParent())); } - Pairs = 0; - for (GEPOperator::const_op_iterator SrcIdx = SrcGEP->idx_begin(), - SrcEnd = SrcGEP->idx_end(), - DstIdx = DstGEP->idx_begin(), - DstEnd = DstGEP->idx_end(); - SrcIdx != SrcEnd && DstIdx != DstEnd; - ++SrcIdx, ++DstIdx, ++Pairs) { - Pair[Pairs].Src = SE->getSCEV(*SrcIdx); - Pair[Pairs].Dst = SE->getSCEV(*DstIdx); - Pair[Pairs].Classification = - classifyPair(Pair[Pairs].Src, LI->getLoopFor(Src->getParent()), - Pair[Pairs].Dst, LI->getLoopFor(Dst->getParent()), - Pair[Pairs].Loops); - Pair[Pairs].GroupLoops = Pair[Pairs].Loops; - Pair[Pairs].Group.set(Pairs); + unsigned Pairs = UsefulGEP ? SrcGEP->idx_end() - SrcGEP->idx_begin() : 1; + SmallVector Pair(Pairs); + if (UsefulGEP) { + unsigned P = 0; + for (GEPOperator::const_op_iterator SrcIdx = SrcGEP->idx_begin(), + SrcEnd = SrcGEP->idx_end(), + DstIdx = DstGEP->idx_begin(); + SrcIdx != SrcEnd; + ++SrcIdx, ++DstIdx, ++P) { + Pair[P].Src = SE->getSCEV(*SrcIdx); + Pair[P].Dst = SE->getSCEV(*DstIdx); + } + } + else { + const SCEV *SrcSCEV = SE->getSCEV(SrcPtr); + const SCEV *DstSCEV = SE->getSCEV(DstPtr); + Pair[0].Src = SrcSCEV; + Pair[0].Dst = DstSCEV; + } + + for (unsigned P = 0; P < Pairs; ++P) { + Pair[P].Loops.resize(MaxLevels + 1); + Pair[P].GroupLoops.resize(MaxLevels + 1); + Pair[P].Group.resize(Pairs); + removeMatchingExtensions(&Pair[P]); + Pair[P].Classification = + classifyPair(Pair[P].Src, LI->getLoopFor(Src->getParent()), + Pair[P].Dst, LI->getLoopFor(Dst->getParent()), + Pair[P].Loops); + Pair[P].GroupLoops = Pair[P].Loops; + Pair[P].Group.set(P); } SmallBitVector Separable(Pairs); diff --git a/test/Analysis/DependenceAnalysis/Banerjee.ll b/test/Analysis/DependenceAnalysis/Banerjee.ll index d498ee3a7a6..bc6de425a33 100644 --- a/test/Analysis/DependenceAnalysis/Banerjee.ll +++ b/test/Analysis/DependenceAnalysis/Banerjee.ll @@ -19,7 +19,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - input [= =|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - output [= =|<]! for.cond1.preheader: ; preds = %entry, %for.inc7 %B.addr.04 = phi i64* [ %B, %entry ], [ %scevgep, %for.inc7 ] @@ -70,7 +70,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - input [* *|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - output [* *|<]! for.cond1.preheader.preheader: ; preds = %entry %0 = add i64 %n, 1 @@ -136,7 +136,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - input [= =|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - output [= =|<]! for.cond1.preheader: ; preds = %entry, %for.inc8 %B.addr.04 = phi i64* [ %B, %entry ], [ %scevgep, %for.inc8 ] @@ -186,7 +186,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - input [= =|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - output [= =|<]! for.cond1.preheader: ; preds = %entry, %for.inc8 %B.addr.04 = phi i64* [ %B, %entry ], [ %scevgep, %for.inc8 ] @@ -236,7 +236,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - input [= =|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - output [= =|<]! for.cond1.preheader: ; preds = %entry, %for.inc7 %B.addr.04 = phi i64* [ %B, %entry ], [ %scevgep, %for.inc7 ] @@ -286,7 +286,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - input [= =|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - output [= =|<]! for.cond1.preheader: ; preds = %entry, %for.inc7 %B.addr.04 = phi i64* [ %B, %entry ], [ %scevgep, %for.inc7 ] @@ -336,7 +336,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - input [= =|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - output [= =|<]! for.cond1.preheader: ; preds = %entry, %for.inc8 %B.addr.04 = phi i64* [ %B, %entry ], [ %scevgep, %for.inc8 ] @@ -386,7 +386,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - input [= =|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - output [= =|<]! for.cond1.preheader: ; preds = %entry, %for.inc8 %B.addr.04 = phi i64* [ %B, %entry ], [ %scevgep, %for.inc8 ] @@ -436,7 +436,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - input [= =|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - output [= =|<]! for.cond1.preheader: ; preds = %entry, %for.inc8 %B.addr.04 = phi i64* [ %B, %entry ], [ %scevgep, %for.inc8 ] @@ -486,7 +486,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - input [= =|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - output [= =|<]! for.cond1.preheader: ; preds = %entry, %for.inc8 %B.addr.04 = phi i64* [ %B, %entry ], [ %scevgep, %for.inc8 ] @@ -537,7 +537,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - input [= =|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - output [= =|<]! for.cond1.preheader: ; preds = %entry, %for.inc7 %B.addr.04 = phi i64* [ %B, %entry ], [ %scevgep, %for.inc7 ] @@ -587,7 +587,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - input [= =|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - output [= =|<]! for.cond1.preheader: ; preds = %entry, %for.inc7 %B.addr.04 = phi i64* [ %B, %entry ], [ %scevgep, %for.inc7 ] @@ -637,7 +637,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - input [= =|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - output [= =|<]! for.cond1.preheader: ; preds = %entry, %for.inc7 %B.addr.04 = phi i64* [ %B, %entry ], [ %scevgep, %for.inc7 ] diff --git a/test/Analysis/DependenceAnalysis/Coupled.ll b/test/Analysis/DependenceAnalysis/Coupled.ll index 6bf286650b7..a5989fb88e3 100644 --- a/test/Analysis/DependenceAnalysis/Coupled.ll +++ b/test/Analysis/DependenceAnalysis/Coupled.ll @@ -18,7 +18,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -54,7 +54,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -90,7 +90,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -128,7 +128,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -166,7 +166,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -205,7 +205,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -246,7 +246,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -282,7 +282,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -318,7 +318,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -355,7 +355,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -393,7 +393,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -431,7 +431,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -469,7 +469,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -506,7 +506,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -543,7 +543,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -580,7 +580,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ] diff --git a/test/Analysis/DependenceAnalysis/ExactRDIV.ll b/test/Analysis/DependenceAnalysis/ExactRDIV.ll index 3174a27f53f..8120739cc55 100644 --- a/test/Analysis/DependenceAnalysis/ExactRDIV.ll +++ b/test/Analysis/DependenceAnalysis/ExactRDIV.ll @@ -19,7 +19,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.03 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -67,7 +67,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.03 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -113,7 +113,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.03 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -159,7 +159,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.03 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -205,7 +205,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.03 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -251,7 +251,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.03 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -298,7 +298,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.03 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -345,7 +345,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.03 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -392,7 +392,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.03 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -439,7 +439,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [S S|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - output [= =|<]! for.cond1.preheader: ; preds = %entry, %for.inc5 %B.addr.04 = phi i32* [ %B, %entry ], [ %scevgep, %for.inc5 ] @@ -488,7 +488,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [S S|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - output [= =|<]! for.cond1.preheader: ; preds = %entry, %for.inc5 %B.addr.04 = phi i32* [ %B, %entry ], [ %scevgep, %for.inc5 ] @@ -536,7 +536,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [S S|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - output [= =|<]! for.cond1.preheader: ; preds = %entry, %for.inc5 %B.addr.04 = phi i32* [ %B, %entry ], [ %scevgep, %for.inc5 ] @@ -584,7 +584,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [S S|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - output [= =|<]! for.cond1.preheader: ; preds = %entry, %for.inc5 %B.addr.04 = phi i32* [ %B, %entry ], [ %scevgep, %for.inc5 ] diff --git a/test/Analysis/DependenceAnalysis/ExactSIV.ll b/test/Analysis/DependenceAnalysis/ExactSIV.ll index 9d9dcdd80d2..74850341084 100644 --- a/test/Analysis/DependenceAnalysis/ExactSIV.ll +++ b/test/Analysis/DependenceAnalysis/ExactSIV.ll @@ -18,7 +18,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -55,7 +55,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -93,7 +93,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -129,7 +129,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -165,7 +165,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -201,7 +201,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -237,7 +237,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -273,7 +273,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -309,7 +309,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -345,7 +345,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -381,7 +381,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -417,7 +417,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -453,7 +453,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -489,7 +489,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ] diff --git a/test/Analysis/DependenceAnalysis/GCD.ll b/test/Analysis/DependenceAnalysis/GCD.ll index a60c1bbc3d4..6bad8ae9a16 100644 --- a/test/Analysis/DependenceAnalysis/GCD.ll +++ b/test/Analysis/DependenceAnalysis/GCD.ll @@ -19,7 +19,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - input [* *|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - output [= =|<]! for.cond1.preheader: ; preds = %entry, %for.inc8 %B.addr.04 = phi i32* [ %B, %entry ], [ %scevgep, %for.inc8 ] @@ -71,7 +71,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - input [* *|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - output [= =|<]! for.cond1.preheader: ; preds = %entry, %for.inc9 %B.addr.04 = phi i32* [ %B, %entry ], [ %scevgep, %for.inc9 ] @@ -124,7 +124,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - input [* *|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - output [= =|<]! for.cond1.preheader: ; preds = %entry, %for.inc9 %B.addr.04 = phi i32* [ %B, %entry ], [ %scevgep, %for.inc9 ] @@ -177,7 +177,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - input [* *|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - output [= =|<]! for.cond1.preheader: ; preds = %entry, %for.inc7 %B.addr.04 = phi i32* [ %B, %entry ], [ %scevgep, %for.inc7 ] @@ -228,7 +228,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - input [* *|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - output [= =|<]! for.cond1.preheader: ; preds = %entry, %for.inc17 %B.addr.04 = phi i32* [ %B, %entry ], [ %scevgep, %for.inc17 ] @@ -289,7 +289,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - input [* *|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - output [= =|<]! for.cond1.preheader: ; preds = %entry, %for.inc17 %B.addr.04 = phi i32* [ %B, %entry ], [ %scevgep, %for.inc17 ] @@ -351,7 +351,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - input [* *|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - output [* *|<]! for.cond1.preheader.preheader: ; preds = %entry br label %for.cond1.preheader @@ -422,7 +422,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - input [* *|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - output [* *|<]! for.cond1.preheader.preheader: ; preds = %entry br label %for.cond1.preheader @@ -505,7 +505,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - input [* *|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - output [* *|<]! for.cond1.preheader.preheader: ; preds = %entry br label %for.cond1.preheader @@ -583,7 +583,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - input [* *|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - output [* *|<]! for.cond1.preheader.preheader: ; preds = %entry br label %for.cond1.preheader diff --git a/test/Analysis/DependenceAnalysis/Preliminary.ll b/test/Analysis/DependenceAnalysis/Preliminary.ll index c550158f717..97589db3004 100644 --- a/test/Analysis/DependenceAnalysis/Preliminary.ll +++ b/test/Analysis/DependenceAnalysis/Preliminary.ll @@ -13,7 +13,7 @@ define i32 @p0(i32 %n, i32* %A, i32* %B) nounwind uwtable ssp { entry: store i32 %n, i32* %A, align 4 -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output! ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input! @@ -31,7 +31,7 @@ define i32 @p1(i32 %n, i32* noalias %A, i32* noalias %B) nounwind uwtable ssp { entry: store i32 %n, i32* %A, align 4 -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output! ; CHECK: da analyze - none! ; CHECK: da analyze - consistent input! @@ -59,7 +59,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0 0 0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - output [* * *|<]! for.cond1.preheader.preheader: ; preds = %entry br label %for.cond1.preheader @@ -168,7 +168,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0 S 0 0 S 0 S S S S 0 0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - output [* * * * * * * * * * * *|<]! for.cond1.preheader.preheader: ; preds = %entry br label %for.cond1.preheader @@ -430,7 +430,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body.preheader: ; preds = %entry br label %for.body @@ -476,7 +476,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body.preheader: ; preds = %entry br label %for.body @@ -522,7 +522,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body.preheader: ; preds = %entry br label %for.body @@ -564,7 +564,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output! store i32 0, i32* %arrayidx, align 4 %conv = sext i8 %n to i64 @@ -591,7 +591,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output! %conv = sext i16 %n to i64 %add = add i64 %conv, 1 @@ -617,7 +617,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output! %add = add nsw i32 %n, 1 %idxprom1 = sext i32 %add to i64 @@ -643,7 +643,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output! %add = add i32 %n, 1 %idxprom1 = zext i32 %add to i64 @@ -652,3 +652,48 @@ entry: store i32 %0, i32* %B, align 4 ret void } + + +;;typedef struct { int v; } S; +;; +;;void f(S *s, unsigned size) { +;; S *i = s, *e = s + size - 1; +;; while (i != e) { +;; *i = *(i + 1); +;; ++i; + +%struct.S = type { i32 } + +define void @f(%struct.S* %s, i32 %size) nounwind uwtable ssp { +entry: + %idx.ext = zext i32 %size to i64 + %add.ptr.sum = add i64 %idx.ext, -1 + %add.ptr1 = getelementptr inbounds %struct.S* %s, i64 %add.ptr.sum + %cmp1 = icmp eq i64 %add.ptr.sum, 0 + br i1 %cmp1, label %while.end, label %while.body.preheader + +; CHECK: da analyze - consistent input [0|<]! +; CHECK: da analyze - consistent anti [1]! +; CHECK: da analyze - consistent output [0|<]! + +while.body.preheader: ; preds = %entry + br label %while.body + +while.body: ; preds = %while.body.preheader, %while.body + %i.02 = phi %struct.S* [ %incdec.ptr, %while.body ], [ %s, %while.body.preheader ] + %0 = getelementptr inbounds %struct.S* %i.02, i64 1, i32 0 + %1 = load i32* %0, align 4 + %2 = getelementptr inbounds %struct.S* %i.02, i64 0, i32 0 + store i32 %1, i32* %2, align 4 + %incdec.ptr = getelementptr inbounds %struct.S* %i.02, i64 1 + %cmp = icmp eq %struct.S* %incdec.ptr, %add.ptr1 + br i1 %cmp, label %while.end.loopexit, label %while.body + +while.end.loopexit: ; preds = %while.body + br label %while.end + +while.end: ; preds = %while.end.loopexit, %entry + ret void +} + +declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32, i1) nounwind diff --git a/test/Analysis/DependenceAnalysis/Propagating.ll b/test/Analysis/DependenceAnalysis/Propagating.ll index 7a7219d696c..32d253593f2 100644 --- a/test/Analysis/DependenceAnalysis/Propagating.ll +++ b/test/Analysis/DependenceAnalysis/Propagating.ll @@ -19,7 +19,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0 0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - output [= =|<]! for.cond1.preheader: ; preds = %entry, %for.inc9 %B.addr.04 = phi i32* [ %B, %entry ], [ %scevgep, %for.inc9 ] @@ -69,7 +69,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0 0 0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - output [= = =|<]! for.cond1.preheader: ; preds = %entry, %for.inc18 %B.addr.06 = phi i32* [ %B, %entry ], [ %scevgep7, %for.inc18 ] @@ -131,7 +131,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0 0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - output [= =|<]! for.cond1.preheader: ; preds = %entry, %for.inc8 %B.addr.04 = phi i32* [ %B, %entry ], [ %scevgep, %for.inc8 ] @@ -181,7 +181,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0 0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - output [= =|<]! for.cond1.preheader: ; preds = %entry, %for.inc9 %B.addr.04 = phi i32* [ %B, %entry ], [ %scevgep, %for.inc9 ] @@ -232,7 +232,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0 0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - output [= =|<]! for.cond1.preheader: ; preds = %entry, %for.inc11 %B.addr.04 = phi i32* [ %B, %entry ], [ %scevgep, %for.inc11 ] @@ -285,7 +285,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0 0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - output [= =|<]! for.cond1.preheader: ; preds = %entry, %for.inc13 %B.addr.04 = phi i32* [ %B, %entry ], [ %scevgep, %for.inc13 ] @@ -338,7 +338,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0 0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - output [= =|<]! for.cond1.preheader: ; preds = %entry, %for.inc12 %B.addr.04 = phi i32* [ %B, %entry ], [ %scevgep, %for.inc12 ] @@ -392,7 +392,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0 0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - output [= =|<]! for.cond1.preheader: ; preds = %entry, %for.inc14 %B.addr.04 = phi i32* [ %B, %entry ], [ %scevgep, %for.inc14 ] @@ -447,7 +447,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0 0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - output [= =|<]! for.cond1.preheader: ; preds = %entry, %for.inc10 %B.addr.04 = phi i32* [ %B, %entry ], [ %scevgep, %for.inc10 ] @@ -498,7 +498,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [S 0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - output [= =|<]! for.cond1.preheader: ; preds = %entry, %for.inc10 %B.addr.04 = phi i32* [ %B, %entry ], [ %scevgep, %for.inc10 ] diff --git a/test/Analysis/DependenceAnalysis/Separability.ll b/test/Analysis/DependenceAnalysis/Separability.ll index aaa1060cb9a..beda448e83e 100644 --- a/test/Analysis/DependenceAnalysis/Separability.ll +++ b/test/Analysis/DependenceAnalysis/Separability.ll @@ -21,7 +21,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - input [0 * S *|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - output [= = = =|<]! for.cond1.preheader: ; preds = %entry, %for.inc22 %B.addr.08 = phi i32* [ %B, %entry ], [ %scevgep11, %for.inc22 ] @@ -96,7 +96,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - input [0 * S *|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - output [= = = =|<]! for.cond1.preheader: ; preds = %entry, %for.inc22 %B.addr.08 = phi i32* [ %B, %entry ], [ %scevgep11, %for.inc22 ] @@ -170,7 +170,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - input [0 * * 0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - output [= = = =|<]! for.cond1.preheader: ; preds = %entry, %for.inc26 %B.addr.08 = phi i32* [ %B, %entry ], [ %scevgep11, %for.inc26 ] @@ -244,7 +244,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - input [0 * * 0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - output [= = = =|<]! for.cond1.preheader: ; preds = %entry, %for.inc27 %B.addr.08 = phi i32* [ %B, %entry ], [ %scevgep11, %for.inc27 ] diff --git a/test/Analysis/DependenceAnalysis/StrongSIV.ll b/test/Analysis/DependenceAnalysis/StrongSIV.ll index 156d55f8451..1cf00ad9c1b 100644 --- a/test/Analysis/DependenceAnalysis/StrongSIV.ll +++ b/test/Analysis/DependenceAnalysis/StrongSIV.ll @@ -19,7 +19,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body.preheader: ; preds = %entry br label %for.body @@ -61,7 +61,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body.preheader: ; preds = %entry %0 = sext i32 %n to i64 @@ -104,7 +104,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body.preheader: ; preds = %entry br label %for.body @@ -146,7 +146,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body.preheader: ; preds = %entry br label %for.body @@ -188,7 +188,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -223,7 +223,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -258,7 +258,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -295,7 +295,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -332,7 +332,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -368,7 +368,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body.preheader: ; preds = %entry br label %for.body @@ -411,7 +411,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ] diff --git a/test/Analysis/DependenceAnalysis/SymbolicRDIV.ll b/test/Analysis/DependenceAnalysis/SymbolicRDIV.ll index 35c17b956f2..5565f648119 100644 --- a/test/Analysis/DependenceAnalysis/SymbolicRDIV.ll +++ b/test/Analysis/DependenceAnalysis/SymbolicRDIV.ll @@ -20,7 +20,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body.preheader: ; preds = %entry br label %for.body @@ -82,7 +82,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body.preheader: ; preds = %entry br label %for.body @@ -146,7 +146,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body.preheader: ; preds = %entry br label %for.body @@ -208,7 +208,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body.preheader: ; preds = %entry br label %for.body @@ -268,7 +268,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body.preheader: ; preds = %entry br label %for.body @@ -329,7 +329,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body.preheader: ; preds = %entry br label %for.body @@ -390,7 +390,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [S S|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - output [* *|<]! for.cond1.preheader.preheader: ; preds = %entry br label %for.cond1.preheader diff --git a/test/Analysis/DependenceAnalysis/SymbolicSIV.ll b/test/Analysis/DependenceAnalysis/SymbolicSIV.ll index 619abd5c59a..074cc56e9b8 100644 --- a/test/Analysis/DependenceAnalysis/SymbolicSIV.ll +++ b/test/Analysis/DependenceAnalysis/SymbolicSIV.ll @@ -19,7 +19,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body.preheader: ; preds = %entry br label %for.body @@ -64,7 +64,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body.preheader: ; preds = %entry br label %for.body @@ -111,7 +111,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body.preheader: ; preds = %entry br label %for.body @@ -156,7 +156,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body.preheader: ; preds = %entry br label %for.body @@ -202,7 +202,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body.preheader: ; preds = %entry br label %for.body @@ -247,7 +247,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body.preheader: ; preds = %entry br label %for.body @@ -295,7 +295,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body.preheader: ; preds = %entry br label %for.body @@ -339,7 +339,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body.preheader: ; preds = %entry br label %for.body @@ -388,7 +388,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body.preheader: ; preds = %entry br label %for.body diff --git a/test/Analysis/DependenceAnalysis/WeakCrossingSIV.ll b/test/Analysis/DependenceAnalysis/WeakCrossingSIV.ll index 1bc6c166b86..0fc73aa6434 100644 --- a/test/Analysis/DependenceAnalysis/WeakCrossingSIV.ll +++ b/test/Analysis/DependenceAnalysis/WeakCrossingSIV.ll @@ -22,7 +22,7 @@ for.body.preheader: ; preds = %entry ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %for.body.preheader, %for.body %i.03 = phi i64 [ %inc, %for.body ], [ 0, %for.body.preheader ] @@ -65,7 +65,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body.preheader: ; preds = %entry br label %for.body @@ -108,7 +108,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -143,7 +143,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -178,7 +178,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -214,7 +214,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body.preheader: ; preds = %entry br label %for.body @@ -258,7 +258,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ] diff --git a/test/Analysis/DependenceAnalysis/WeakZeroDstSIV.ll b/test/Analysis/DependenceAnalysis/WeakZeroDstSIV.ll index 064d88efd32..e78bc5a1393 100644 --- a/test/Analysis/DependenceAnalysis/WeakZeroDstSIV.ll +++ b/test/Analysis/DependenceAnalysis/WeakZeroDstSIV.ll @@ -18,7 +18,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [S|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -55,7 +55,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [S|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body.preheader: ; preds = %entry br label %for.body @@ -97,7 +97,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [S|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -132,7 +132,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [S|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -167,7 +167,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [S|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -202,7 +202,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [S|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -238,7 +238,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [S|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body.preheader: ; preds = %entry br label %for.body diff --git a/test/Analysis/DependenceAnalysis/WeakZeroSrcSIV.ll b/test/Analysis/DependenceAnalysis/WeakZeroSrcSIV.ll index 4fe491c9165..2edba669010 100644 --- a/test/Analysis/DependenceAnalysis/WeakZeroSrcSIV.ll +++ b/test/Analysis/DependenceAnalysis/WeakZeroSrcSIV.ll @@ -18,7 +18,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -55,7 +55,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body.preheader: ; preds = %entry br label %for.body @@ -97,7 +97,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -132,7 +132,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -167,7 +167,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -202,7 +202,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body: ; preds = %entry, %for.body %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ] @@ -238,7 +238,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input [0|<]! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output [0|<]! for.body.preheader: ; preds = %entry br label %for.body diff --git a/test/Analysis/DependenceAnalysis/ZIV.ll b/test/Analysis/DependenceAnalysis/ZIV.ll index 7b004be6819..1e833baf28d 100644 --- a/test/Analysis/DependenceAnalysis/ZIV.ll +++ b/test/Analysis/DependenceAnalysis/ZIV.ll @@ -19,7 +19,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output! %add1 = add i64 %n, 1 %arrayidx2 = getelementptr inbounds i32* %A, i64 %add1 @@ -42,7 +42,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output! %add = add i64 %n, 1 %arrayidx1 = getelementptr inbounds i32* %A, i64 %add @@ -65,7 +65,7 @@ entry: ; CHECK: da analyze - confused! ; CHECK: da analyze - consistent input! ; CHECK: da analyze - confused! -; CHECK: da analyze - confused! +; CHECK: da analyze - consistent output! %arrayidx1 = getelementptr inbounds i32* %A, i64 %m %0 = load i32* %arrayidx1, align 4