Skip to content

[SCEV,LAA] Introduce scoped SCEV, use in LAA computations (WIP). #90742

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions llvm/include/llvm/Analysis/LoopAccessAnalysis.h
Original file line number Diff line number Diff line change
Expand Up @@ -435,8 +435,10 @@ class RuntimePointerChecking {
/// Reset the state of the pointer runtime information.
void reset() {
Need = false;
AlwaysFalse = false;
Pointers.clear();
Checks.clear();
CheckingGroups.clear();
}

/// Insert a pointer and calculate the start and end SCEVs.
Expand Down Expand Up @@ -493,6 +495,8 @@ class RuntimePointerChecking {
/// This flag indicates if we need to add the runtime check.
bool Need = false;

bool AlwaysFalse = false;

/// Information about the pointers that may require checking.
SmallVector<PointerInfo, 2> Pointers;

Expand Down
14 changes: 14 additions & 0 deletions llvm/include/llvm/Analysis/ScalarEvolution.h
Original file line number Diff line number Diff line change
Expand Up @@ -1346,6 +1346,12 @@ class ScalarEvolution {
}
};

void setExprScope(const Loop *L);

void clearExprScope();

bool isScopedExpr(const SCEV *S);

private:
/// A CallbackVH to arrange for ScalarEvolution to be notified whenever a
/// Value is deleted.
Expand Down Expand Up @@ -1435,6 +1441,14 @@ class ScalarEvolution {
/// Memoized values for the getConstantMultiple
DenseMap<const SCEV *, APInt> ConstantMultipleCache;

/// When not nullptr, this indicates the scope for which an expression needs
/// to be valid for. This allows creation of SCEV expressions that only need
/// to be valid in a specific loop, allowing to use more specific no-wrap
/// flags.
const Loop *ExprScope = nullptr;

SmallVector<const SCEV *> ScopedExprs;

/// Return the Value set from which the SCEV expr is generated.
ArrayRef<Value *> getSCEVValues(const SCEV *S);

Expand Down
22 changes: 20 additions & 2 deletions llvm/lib/Analysis/LoopAccessAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "llvm/ADT/EquivalenceClasses.h"
#include "llvm/ADT/PointerIntPair.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/ScopeExit.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallSet.h"
Expand Down Expand Up @@ -208,7 +209,8 @@ void RuntimePointerChecking::insert(Loop *Lp, Value *Ptr, const SCEV *PtrExpr,
PredicatedScalarEvolution &PSE,
bool NeedsFreeze) {
ScalarEvolution *SE = PSE.getSE();

SE->setExprScope(Lp);
auto ClearOnExit = make_scope_exit([SE]() { SE->clearExprScope(); });
const SCEV *ScStart;
const SCEV *ScEnd;

Expand All @@ -222,6 +224,10 @@ void RuntimePointerChecking::insert(Loop *Lp, Value *Ptr, const SCEV *PtrExpr,
ScStart = AR->getStart();
ScEnd = AR->evaluateAtIteration(Ex, *SE);
const SCEV *Step = AR->getStepRecurrence(*SE);
if (AR->getNoWrapFlags(SCEV::FlagNUW) && SE->isScopedExpr(ScEnd)) {
if (auto *Comm = dyn_cast<SCEVCommutativeExpr>(ScEnd))
const_cast<SCEVCommutativeExpr *>(Comm)->setNoWrapFlags(SCEV::FlagNUW);
}

// For expressions with negative step, the upper bound is ScStart and the
// lower bound is ScEnd.
Expand All @@ -243,7 +249,13 @@ void RuntimePointerChecking::insert(Loop *Lp, Value *Ptr, const SCEV *PtrExpr,
auto &DL = Lp->getHeader()->getModule()->getDataLayout();
Type *IdxTy = DL.getIndexType(Ptr->getType());
const SCEV *EltSizeSCEV = SE->getStoreSizeOfExpr(IdxTy, AccessTy);
ScEnd = SE->getAddExpr(ScEnd, EltSizeSCEV);
// TODO: this computes one-past-the-end. ScEnd + EltSizeSCEV - 1 is the last
// accessed byte. Not entirely sure if one-past-the-end must also not wrap? If
// it does, could compute and use last accessed byte instead.
if (SE->isScopedExpr(ScEnd))
ScEnd = SE->getAddExpr(ScEnd, EltSizeSCEV, SCEV::FlagNUW);
else
ScEnd = SE->getAddExpr(ScEnd, EltSizeSCEV, SCEV::FlagNUW);

Pointers.emplace_back(Ptr, ScStart, ScEnd, WritePtr, DepSetId, ASId, PtrExpr,
NeedsFreeze);
Expand Down Expand Up @@ -378,6 +390,11 @@ SmallVector<RuntimePointerCheck, 4> RuntimePointerChecking::generateChecks() {
if (needsChecking(CGI, CGJ)) {
tryToCreateDiffCheck(CGI, CGJ);
Checks.push_back(std::make_pair(&CGI, &CGJ));
if (SE->isKnownPredicate(CmpInst::ICMP_UGT, CGI.High, CGJ.Low) &&
SE->isKnownPredicate(CmpInst::ICMP_ULE, CGI.Low, CGJ.High)) {
AlwaysFalse = true;
return {};
}
}
}
}
Expand Down Expand Up @@ -1273,6 +1290,7 @@ bool AccessAnalysis::canCheckPtrAtRT(RuntimePointerChecking &RtCheck,
// If we can do run-time checks, but there are no checks, no runtime checks
// are needed. This can happen when all pointers point to the same underlying
// object for example.
CanDoRT &= !RtCheck.AlwaysFalse;
RtCheck.Need = CanDoRT ? RtCheck.getNumberOfChecks() != 0 : MayNeedRTCheck;

bool CanDoRTIfNeeded = !RtCheck.Need || CanDoRT;
Expand Down
29 changes: 28 additions & 1 deletion llvm/lib/Analysis/ScalarEvolution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2981,13 +2981,35 @@ const SCEV *ScalarEvolution::getAddExpr(SmallVectorImpl<const SCEV *> &Ops,
return getOrCreateAddExpr(Ops, ComputeFlags(Ops));
}

void ScalarEvolution::setExprScope(const Loop *L) {
assert(!ExprScope && "cannot overwrite existing expression scope");
ExprScope = L;
}

void ScalarEvolution::clearExprScope() { ExprScope = nullptr; }

bool ScalarEvolution::isScopedExpr(const SCEV *S) {
if (!ExprScope || !isa<SCEVCommutativeExpr>(S))
return false;

FoldingSetNodeID ID;
ID.AddInteger(S->getSCEVType());
for (const SCEV *Op : S->operands())
ID.AddPointer(Op);
ID.AddPointer(ExprScope);
void *IP = nullptr;
return UniqueSCEVs.FindNodeOrInsertPos(ID, IP);
}

const SCEV *
ScalarEvolution::getOrCreateAddExpr(ArrayRef<const SCEV *> Ops,
SCEV::NoWrapFlags Flags) {
FoldingSetNodeID ID;
ID.AddInteger(scAddExpr);
for (const SCEV *Op : Ops)
ID.AddPointer(Op);
if (ExprScope)
ID.AddPointer(ExprScope);
void *IP = nullptr;
SCEVAddExpr *S =
static_cast<SCEVAddExpr *>(UniqueSCEVs.FindNodeOrInsertPos(ID, IP));
Expand Down Expand Up @@ -3034,6 +3056,8 @@ ScalarEvolution::getOrCreateMulExpr(ArrayRef<const SCEV *> Ops,
ID.AddInteger(scMulExpr);
for (const SCEV *Op : Ops)
ID.AddPointer(Op);
if (ExprScope)
ID.AddPointer(ExprScope);
void *IP = nullptr;
SCEVMulExpr *S =
static_cast<SCEVMulExpr *>(UniqueSCEVs.FindNodeOrInsertPos(ID, IP));
Expand Down Expand Up @@ -14746,12 +14770,15 @@ PredicatedScalarEvolution::PredicatedScalarEvolution(ScalarEvolution &SE,

void ScalarEvolution::registerUser(const SCEV *User,
ArrayRef<const SCEV *> Ops) {
for (const auto *Op : Ops)
for (const auto *Op : Ops) {
// We do not expect that forgetting cached data for SCEVConstants will ever
// open any prospects for sharpening or introduce any correctness issues,
// so we don't bother storing their dependencies.
if (!isa<SCEVConstant>(Op))
SCEVUsers[Op].insert(User);
assert((ExprScope || !isScopedExpr(Op)) &&
"Non-scoped expression cannot have scoped operands!");
}
}

const SCEV *PredicatedScalarEvolution::getSCEV(Value *V) {
Expand Down
60 changes: 30 additions & 30 deletions llvm/test/Analysis/LoopAccessAnalysis/forked-pointers.ll
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ define void @forked_ptrs_simple(ptr nocapture readonly %Base1, ptr nocapture rea
; CHECK-NEXT: %select = select i1 %cmp, ptr %gep.1, ptr %gep.2
; CHECK-NEXT: Grouped accesses:
; CHECK-NEXT: Group [[GRP1]]:
; CHECK-NEXT: (Low: %Dest High: (400 + %Dest))
; CHECK-NEXT: (Low: %Dest High: (400 + %Dest)<nuw>)
; CHECK-NEXT: Member: {%Dest,+,4}<nuw><%loop>
; CHECK-NEXT: Member: {%Dest,+,4}<nuw><%loop>
; CHECK-NEXT: Group [[GRP2]]:
Expand Down Expand Up @@ -58,7 +58,7 @@ define void @forked_ptrs_simple(ptr nocapture readonly %Base1, ptr nocapture rea
; RECURSE-NEXT: %select = select i1 %cmp, ptr %gep.1, ptr %gep.2
; RECURSE-NEXT: Grouped accesses:
; RECURSE-NEXT: Group [[GRP4]]:
; RECURSE-NEXT: (Low: %Dest High: (400 + %Dest))
; RECURSE-NEXT: (Low: %Dest High: (400 + %Dest)<nuw>)
; RECURSE-NEXT: Member: {%Dest,+,4}<nuw><%loop>
; RECURSE-NEXT: Member: {%Dest,+,4}<nuw><%loop>
; RECURSE-NEXT: Group [[GRP5]]:
Expand Down Expand Up @@ -132,10 +132,10 @@ define dso_local void @forked_ptrs_different_base_same_offset(ptr nocapture read
; CHECK-NEXT: %.sink.in = getelementptr inbounds float, ptr %spec.select, i64 %indvars.iv
; CHECK-NEXT: Grouped accesses:
; CHECK-NEXT: Group [[GRP7]]:
; CHECK-NEXT: (Low: %Dest High: (400 + %Dest))
; CHECK-NEXT: (Low: %Dest High: (400 + %Dest)<nuw>)
; CHECK-NEXT: Member: {%Dest,+,4}<nuw><%for.body>
; CHECK-NEXT: Group [[GRP8]]:
; CHECK-NEXT: (Low: %Preds High: (400 + %Preds))
; CHECK-NEXT: (Low: %Preds High: (400 + %Preds)<nuw>)
; CHECK-NEXT: Member: {%Preds,+,4}<nuw><%for.body>
; CHECK-NEXT: Group [[GRP9]]:
; CHECK-NEXT: (Low: %Base2 High: (400 + %Base2))
Expand Down Expand Up @@ -171,10 +171,10 @@ define dso_local void @forked_ptrs_different_base_same_offset(ptr nocapture read
; RECURSE-NEXT: %.sink.in = getelementptr inbounds float, ptr %spec.select, i64 %indvars.iv
; RECURSE-NEXT: Grouped accesses:
; RECURSE-NEXT: Group [[GRP11]]:
; RECURSE-NEXT: (Low: %Dest High: (400 + %Dest))
; RECURSE-NEXT: (Low: %Dest High: (400 + %Dest)<nuw>)
; RECURSE-NEXT: Member: {%Dest,+,4}<nuw><%for.body>
; RECURSE-NEXT: Group [[GRP12]]:
; RECURSE-NEXT: (Low: %Preds High: (400 + %Preds))
; RECURSE-NEXT: (Low: %Preds High: (400 + %Preds)<nuw>)
; RECURSE-NEXT: Member: {%Preds,+,4}<nuw><%for.body>
; RECURSE-NEXT: Group [[GRP13]]:
; RECURSE-NEXT: (Low: %Base2 High: (400 + %Base2))
Expand Down Expand Up @@ -232,10 +232,10 @@ define dso_local void @forked_ptrs_different_base_same_offset_64b(ptr nocapture
; CHECK-NEXT: %.sink.in = getelementptr inbounds double, ptr %spec.select, i64 %indvars.iv
; CHECK-NEXT: Grouped accesses:
; CHECK-NEXT: Group [[GRP15]]:
; CHECK-NEXT: (Low: %Dest High: (800 + %Dest))
; CHECK-NEXT: (Low: %Dest High: (800 + %Dest)<nuw>)
; CHECK-NEXT: Member: {%Dest,+,8}<nuw><%for.body>
; CHECK-NEXT: Group [[GRP16]]:
; CHECK-NEXT: (Low: %Preds High: (400 + %Preds))
; CHECK-NEXT: (Low: %Preds High: (400 + %Preds)<nuw>)
; CHECK-NEXT: Member: {%Preds,+,4}<nuw><%for.body>
; CHECK-NEXT: Group [[GRP17]]:
; CHECK-NEXT: (Low: %Base2 High: (800 + %Base2))
Expand Down Expand Up @@ -271,10 +271,10 @@ define dso_local void @forked_ptrs_different_base_same_offset_64b(ptr nocapture
; RECURSE-NEXT: %.sink.in = getelementptr inbounds double, ptr %spec.select, i64 %indvars.iv
; RECURSE-NEXT: Grouped accesses:
; RECURSE-NEXT: Group [[GRP19]]:
; RECURSE-NEXT: (Low: %Dest High: (800 + %Dest))
; RECURSE-NEXT: (Low: %Dest High: (800 + %Dest)<nuw>)
; RECURSE-NEXT: Member: {%Dest,+,8}<nuw><%for.body>
; RECURSE-NEXT: Group [[GRP20]]:
; RECURSE-NEXT: (Low: %Preds High: (400 + %Preds))
; RECURSE-NEXT: (Low: %Preds High: (400 + %Preds)<nuw>)
; RECURSE-NEXT: Member: {%Preds,+,4}<nuw><%for.body>
; RECURSE-NEXT: Group [[GRP21]]:
; RECURSE-NEXT: (Low: %Base2 High: (800 + %Base2))
Expand Down Expand Up @@ -332,10 +332,10 @@ define dso_local void @forked_ptrs_different_base_same_offset_23b(ptr nocapture
; CHECK-NEXT: %.sink.in = getelementptr inbounds i23, ptr %spec.select, i64 %indvars.iv
; CHECK-NEXT: Grouped accesses:
; CHECK-NEXT: Group [[GRP23]]:
; CHECK-NEXT: (Low: %Dest High: (399 + %Dest))
; CHECK-NEXT: (Low: %Dest High: (399 + %Dest)<nuw>)
; CHECK-NEXT: Member: {%Dest,+,4}<nuw><%for.body>
; CHECK-NEXT: Group [[GRP24]]:
; CHECK-NEXT: (Low: %Preds High: (400 + %Preds))
; CHECK-NEXT: (Low: %Preds High: (400 + %Preds)<nuw>)
; CHECK-NEXT: Member: {%Preds,+,4}<nuw><%for.body>
; CHECK-NEXT: Group [[GRP25]]:
; CHECK-NEXT: (Low: %Base2 High: (399 + %Base2))
Expand Down Expand Up @@ -371,10 +371,10 @@ define dso_local void @forked_ptrs_different_base_same_offset_23b(ptr nocapture
; RECURSE-NEXT: %.sink.in = getelementptr inbounds i23, ptr %spec.select, i64 %indvars.iv
; RECURSE-NEXT: Grouped accesses:
; RECURSE-NEXT: Group [[GRP27]]:
; RECURSE-NEXT: (Low: %Dest High: (399 + %Dest))
; RECURSE-NEXT: (Low: %Dest High: (399 + %Dest)<nuw>)
; RECURSE-NEXT: Member: {%Dest,+,4}<nuw><%for.body>
; RECURSE-NEXT: Group [[GRP28]]:
; RECURSE-NEXT: (Low: %Preds High: (400 + %Preds))
; RECURSE-NEXT: (Low: %Preds High: (400 + %Preds)<nuw>)
; RECURSE-NEXT: Member: {%Preds,+,4}<nuw><%for.body>
; RECURSE-NEXT: Group [[GRP29]]:
; RECURSE-NEXT: (Low: %Base2 High: (399 + %Base2))
Expand Down Expand Up @@ -432,10 +432,10 @@ define dso_local void @forked_ptrs_different_base_same_offset_6b(ptr nocapture r
; CHECK-NEXT: %.sink.in = getelementptr inbounds i6, ptr %spec.select, i64 %indvars.iv
; CHECK-NEXT: Grouped accesses:
; CHECK-NEXT: Group [[GRP31]]:
; CHECK-NEXT: (Low: %Dest High: (100 + %Dest))
; CHECK-NEXT: (Low: %Dest High: (100 + %Dest)<nuw>)
; CHECK-NEXT: Member: {%Dest,+,1}<nuw><%for.body>
; CHECK-NEXT: Group [[GRP32]]:
; CHECK-NEXT: (Low: %Preds High: (400 + %Preds))
; CHECK-NEXT: (Low: %Preds High: (400 + %Preds)<nuw>)
; CHECK-NEXT: Member: {%Preds,+,4}<nuw><%for.body>
; CHECK-NEXT: Group [[GRP33]]:
; CHECK-NEXT: (Low: %Base2 High: (100 + %Base2))
Expand Down Expand Up @@ -471,10 +471,10 @@ define dso_local void @forked_ptrs_different_base_same_offset_6b(ptr nocapture r
; RECURSE-NEXT: %.sink.in = getelementptr inbounds i6, ptr %spec.select, i64 %indvars.iv
; RECURSE-NEXT: Grouped accesses:
; RECURSE-NEXT: Group [[GRP35]]:
; RECURSE-NEXT: (Low: %Dest High: (100 + %Dest))
; RECURSE-NEXT: (Low: %Dest High: (100 + %Dest)<nuw>)
; RECURSE-NEXT: Member: {%Dest,+,1}<nuw><%for.body>
; RECURSE-NEXT: Group [[GRP36]]:
; RECURSE-NEXT: (Low: %Preds High: (400 + %Preds))
; RECURSE-NEXT: (Low: %Preds High: (400 + %Preds)<nuw>)
; RECURSE-NEXT: Member: {%Preds,+,4}<nuw><%for.body>
; RECURSE-NEXT: Group [[GRP37]]:
; RECURSE-NEXT: (Low: %Base2 High: (100 + %Base2))
Expand Down Expand Up @@ -535,7 +535,7 @@ define dso_local void @forked_ptrs_different_base_same_offset_possible_poison(pt
; CHECK-NEXT: (Low: %Dest High: (400 + %Dest))
; CHECK-NEXT: Member: {%Dest,+,4}<nw><%for.body>
; CHECK-NEXT: Group [[GRP40]]:
; CHECK-NEXT: (Low: %Preds High: (400 + %Preds))
; CHECK-NEXT: (Low: %Preds High: (400 + %Preds)<nuw>)
; CHECK-NEXT: Member: {%Preds,+,4}<nuw><%for.body>
; CHECK-NEXT: Group [[GRP41]]:
; CHECK-NEXT: (Low: %Base2 High: (400 + %Base2))
Expand Down Expand Up @@ -574,7 +574,7 @@ define dso_local void @forked_ptrs_different_base_same_offset_possible_poison(pt
; RECURSE-NEXT: (Low: %Dest High: (400 + %Dest))
; RECURSE-NEXT: Member: {%Dest,+,4}<nw><%for.body>
; RECURSE-NEXT: Group [[GRP44]]:
; RECURSE-NEXT: (Low: %Preds High: (400 + %Preds))
; RECURSE-NEXT: (Low: %Preds High: (400 + %Preds)<nuw>)
; RECURSE-NEXT: Member: {%Preds,+,4}<nuw><%for.body>
; RECURSE-NEXT: Group [[GRP45]]:
; RECURSE-NEXT: (Low: %Base2 High: (400 + %Base2))
Expand Down Expand Up @@ -696,10 +696,10 @@ define dso_local void @forked_ptrs_add_to_offset(ptr nocapture readonly %Base, p
; CHECK-NEXT: %arrayidx3 = getelementptr inbounds float, ptr %Base, i64 %offset
; CHECK-NEXT: Grouped accesses:
; CHECK-NEXT: Group [[GRP47]]:
; CHECK-NEXT: (Low: %Dest High: (400 + %Dest))
; CHECK-NEXT: (Low: %Dest High: (400 + %Dest)<nuw>)
; CHECK-NEXT: Member: {%Dest,+,4}<nuw><%for.body>
; CHECK-NEXT: Group [[GRP48]]:
; CHECK-NEXT: (Low: %Preds High: (400 + %Preds))
; CHECK-NEXT: (Low: %Preds High: (400 + %Preds)<nuw>)
; CHECK-NEXT: Member: {%Preds,+,4}<nuw><%for.body>
; CHECK-NEXT: Group [[GRP49]]:
; CHECK-NEXT: (Low: ((4 * %extra_offset) + %Base) High: (404 + (4 * %extra_offset) + %Base))
Expand Down Expand Up @@ -764,10 +764,10 @@ define dso_local void @forked_ptrs_sub_from_offset(ptr nocapture readonly %Base,
; CHECK-NEXT: %arrayidx3 = getelementptr inbounds float, ptr %Base, i64 %offset
; CHECK-NEXT: Grouped accesses:
; CHECK-NEXT: Group [[GRP50]]:
; CHECK-NEXT: (Low: %Dest High: (400 + %Dest))
; CHECK-NEXT: (Low: %Dest High: (400 + %Dest)<nuw>)
; CHECK-NEXT: Member: {%Dest,+,4}<nuw><%for.body>
; CHECK-NEXT: Group [[GRP51]]:
; CHECK-NEXT: (Low: %Preds High: (400 + %Preds))
; CHECK-NEXT: (Low: %Preds High: (400 + %Preds)<nuw>)
; CHECK-NEXT: Member: {%Preds,+,4}<nuw><%for.body>
; CHECK-NEXT: Group [[GRP52]]:
; CHECK-NEXT: (Low: ((-4 * %extra_offset) + %Base) High: (404 + (-4 * %extra_offset) + %Base))
Expand Down Expand Up @@ -832,10 +832,10 @@ define dso_local void @forked_ptrs_add_sub_offset(ptr nocapture readonly %Base,
; CHECK-NEXT: %arrayidx3 = getelementptr inbounds float, ptr %Base, i64 %offset
; CHECK-NEXT: Grouped accesses:
; CHECK-NEXT: Group [[GRP53]]:
; CHECK-NEXT: (Low: %Dest High: (400 + %Dest))
; CHECK-NEXT: (Low: %Dest High: (400 + %Dest)<nuw>)
; CHECK-NEXT: Member: {%Dest,+,4}<nuw><%for.body>
; CHECK-NEXT: Group [[GRP54]]:
; CHECK-NEXT: (Low: %Preds High: (400 + %Preds))
; CHECK-NEXT: (Low: %Preds High: (400 + %Preds)<nuw>)
; CHECK-NEXT: Member: {%Preds,+,4}<nuw><%for.body>
; CHECK-NEXT: Group [[GRP55]]:
; CHECK-NEXT: (Low: ((4 * %to_add) + (-4 * %to_sub) + %Base) High: (404 + (4 * %to_add) + (-4 * %to_sub) + %Base))
Expand Down Expand Up @@ -1256,7 +1256,7 @@ define void @sc_add_expr_ice(ptr %Base1, ptr %Base2, i64 %N) {
; CHECK-NEXT: %fptr = getelementptr inbounds double, ptr %Base2, i64 %sel
; CHECK-NEXT: Grouped accesses:
; CHECK-NEXT: Group [[GRP56]]:
; CHECK-NEXT: (Low: %Base1 High: (8 + %Base1))
; CHECK-NEXT: (Low: %Base1 High: (8 + %Base1)<nuw>)
; CHECK-NEXT: Member: %Base1
; CHECK-NEXT: Group [[GRP57]]:
; CHECK-NEXT: (Low: %Base2 High: ((8 * %N) + %Base2))
Expand All @@ -1283,7 +1283,7 @@ define void @sc_add_expr_ice(ptr %Base1, ptr %Base2, i64 %N) {
; RECURSE-NEXT: %fptr = getelementptr inbounds double, ptr %Base2, i64 %sel
; RECURSE-NEXT: Grouped accesses:
; RECURSE-NEXT: Group [[GRP58]]:
; RECURSE-NEXT: (Low: %Base1 High: (8 + %Base1))
; RECURSE-NEXT: (Low: %Base1 High: (8 + %Base1)<nuw>)
; RECURSE-NEXT: Member: %Base1
; RECURSE-NEXT: Group [[GRP59]]:
; RECURSE-NEXT: (Low: %Base2 High: ((8 * %N) + %Base2))
Expand Down Expand Up @@ -1351,7 +1351,7 @@ define void @forked_ptrs_with_different_base(ptr nocapture readonly %Preds, ptr
; CHECK-NEXT: (Low: %2 High: (63992 + %2))
; CHECK-NEXT: Member: {%2,+,8}<nw><%for.body>
; CHECK-NEXT: Group [[GRP61]]:
; CHECK-NEXT: (Low: %Preds High: (31996 + %Preds))
; CHECK-NEXT: (Low: %Preds High: (31996 + %Preds)<nuw>)
; CHECK-NEXT: Member: {%Preds,+,4}<nuw><%for.body>
; CHECK-NEXT: Group [[GRP62]]:
; CHECK-NEXT: (Low: %0 High: (63992 + %0))
Expand Down Expand Up @@ -1395,7 +1395,7 @@ define void @forked_ptrs_with_different_base(ptr nocapture readonly %Preds, ptr
; RECURSE-NEXT: (Low: %2 High: (63992 + %2))
; RECURSE-NEXT: Member: {%2,+,8}<nw><%for.body>
; RECURSE-NEXT: Group [[GRP65]]:
; RECURSE-NEXT: (Low: %Preds High: (31996 + %Preds))
; RECURSE-NEXT: (Low: %Preds High: (31996 + %Preds)<nuw>)
; RECURSE-NEXT: Member: {%Preds,+,4}<nuw><%for.body>
; RECURSE-NEXT: Group [[GRP66]]:
; RECURSE-NEXT: (Low: %0 High: (63992 + %0))
Expand Down
Loading