Skip to content

Commit c66e728

Browse files
Merge branch 'main' into main
2 parents 4ff5454 + 18507a7 commit c66e728

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

llvm/lib/Analysis/DependenceAnalysis.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3698,8 +3698,8 @@ DependenceInfo::depends(Instruction *Src, Instruction *Dst,
36983698

36993699
unsigned Pairs = 1;
37003700
SmallVector<Subscript, 2> Pair(Pairs);
3701-
Pair[0].Src = SrcSCEV;
3702-
Pair[0].Dst = DstSCEV;
3701+
Pair[0].Src = SrcEv;
3702+
Pair[0].Dst = DstEv;
37033703

37043704
if (Delinearize) {
37053705
if (tryDelinearize(Src, Dst, Pair)) {
@@ -3709,6 +3709,8 @@ DependenceInfo::depends(Instruction *Src, Instruction *Dst,
37093709
}
37103710

37113711
for (unsigned P = 0; P < Pairs; ++P) {
3712+
assert(Pair[P].Src->getType()->isIntegerTy() && "Src must be an integer");
3713+
assert(Pair[P].Dst->getType()->isIntegerTy() && "Dst must be an integer");
37123714
Pair[P].Loops.resize(MaxLevels + 1);
37133715
Pair[P].GroupLoops.resize(MaxLevels + 1);
37143716
Pair[P].Group.resize(Pairs);
@@ -4111,8 +4113,8 @@ const SCEV *DependenceInfo::getSplitIteration(const Dependence &Dep,
41114113
SmallVector<Subscript, 2> Pair(Pairs);
41124114
const SCEV *SrcSCEV = SE->getSCEV(SrcPtr);
41134115
const SCEV *DstSCEV = SE->getSCEV(DstPtr);
4114-
Pair[0].Src = SrcSCEV;
4115-
Pair[0].Dst = DstSCEV;
4116+
Pair[0].Src = SE->removePointerBase(SrcSCEV);
4117+
Pair[0].Dst = SE->removePointerBase(DstSCEV);
41164118

41174119
if (Delinearize) {
41184120
if (tryDelinearize(Src, Dst, Pair)) {
@@ -4122,6 +4124,8 @@ const SCEV *DependenceInfo::getSplitIteration(const Dependence &Dep,
41224124
}
41234125

41244126
for (unsigned P = 0; P < Pairs; ++P) {
4127+
assert(Pair[P].Src->getType()->isIntegerTy() && "Src must be an integer");
4128+
assert(Pair[P].Dst->getType()->isIntegerTy() && "Dst must be an integer");
41254129
Pair[P].Loops.resize(MaxLevels + 1);
41264130
Pair[P].GroupLoops.resize(MaxLevels + 1);
41274131
Pair[P].Group.resize(Pairs);

0 commit comments

Comments
 (0)