llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

SCEV expander assertion in LSR

Open annamthomas opened this issue 8 years ago • 15 comments

Bugzilla Link 35890
Resolution FIXED
Resolved on Feb 11, 2018 21:35
Version trunk
OS All
Attachments input IR to pass with -loop-reduce
CC @sanjoy

Extended Description

With the following bugpoint code attached, llvm trunk (without rL321550) crashes when trying to retrieve a PostIncExpr because the PostIncExpr is not an AddRecurrence.

rL321550 limits the depth in recursive call to getAddRec because we were missing passing the depth.

I think the change only hides the actual problem in SCEV because limiting the recursion depth is only a compile time restriction and not a functional requirement. Is this correct?

Command to use: opt -loop-reduce reduced.ll

Trunk with the following diff [1] still crashes with assertion failure: Assertion failed: (isa(Val) && "cast() argument of incompatible type!") when trying to cast the result of getAddRec into SCEVAddRecExpr: #​4 0x00007ffff5147dcc in llvm::cast<llvm::SCEVAddRecExpr, llvm::SCEV const> ()

Diff to apply is basically the revert of rL321550: diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp index 10b5c74e378..32fd05d2ea4 100644 --- a/lib/Analysis/ScalarEvolution.cpp +++ b/lib/Analysis/ScalarEvolution.cpp @@ -2358,7 +2358,7 @@ const SCEV *ScalarEvolution::getAddExpr(SmallVectorImpl<const SCEV *> &Ops, FoundMatch = true; } if (FoundMatch)

  • return getAddExpr(Ops, Flags, Depth + 1);
  • return getAddExpr(Ops, Flags);

// Check for truncates. If all the operands are truncated from the same // type, see if factoring out the truncate would permit the result to be

annamthomas avatar Jan 10 '18 18:01 annamthomas

Fix merged: https://reviews.llvm.org/rL324866

llvmbot avatar Feb 12 '18 05:02 llvmbot

Fix https://reviews.llvm.org/D42953 on review.

llvmbot avatar Feb 06 '18 11:02 llvmbot

I was able to make a simple test on top of https://reviews.llvm.org/D42835 that exposes the problem. Preparing patch.

llvmbot avatar Feb 06 '18 11:02 llvmbot

I will try to not use getAddExpr in this method and see where it gets us.

llvmbot avatar Feb 05 '18 12:02 llvmbot

It sounds dangerous from compile time perspective.

I don't think this should regress compile time. Today when computing the post-increment of {A,+,B,+,C} we evaluate "{A,+,B,+,C}+{B,+,C}" which recurses into evaluating "A+B and "B+C" each with depth increased by one. I'm suggesting we keep doing the same thing, just more explicitly.

But there is something I don't understand about this bug -- according to the description, we failed to simplify "SE.getAddExpr(this, getStepRecurrence(SE))" back when we forgot to pipe in the depth into a recursive getAddExpr call, which I find counter-intuitive. If anything we should have simplified more (by spending more compile time) when we forgot to pipe in the depth and rL321550 should have exposed the bug, not hidden it.

We are dealing with the pattern (C1 + (C2 + (C3 + ... + (CN * CM)))...) All C1, C2... are constants. And the interesting thing is that the depth where we reach this final multiplication is exactly equal to max arithmetic analysis depth. If we run it with depth increased by 1, the entire expression is folded into one constant.

And the reason why the issue hides when we apply the patch that propagate depth is that in this case we simplify less, but do it differently. Compare: in case of crash we have

{(-535950090 + (2126782302 + (1954857326 + (-1234263759 + (986233913 + (-118973571 + (-384153867 + (76143863 + (1160690127 + (-1514660733 + (561722923 + (-1268608580 + (1524548252 + (299387084 + (-693986836 + (-1494204716 + (-2134379020 + (1652214564 + (1251677700 + (938758275 + (696498075 + (510765255 + (369864495 + (264188925 + (185910725 + (128707425 + (87521049 + (58347366 + (38052630 + (24215310 + (14990430 + (8994258 + (5207202 + (2 * 2892890)))))))))))))))))))))))))))))))))),+,(536878650 + (450978066 + (377348994 + (314457495 + (260932815 + (215553195 + (177232627 + (145008513 + (118030185 + (95548245 + (76904685 + (61523748 + (48903492 + (38608020 + (30260340 + (23535820 + (18156204 + (13884156 + (10518300 + (7888725 + (5852925 + (4292145 + (3108105 + (2220075 + (1562275 + (1081575 + (735471 + (490314 + (319770 + (203490 + (125970 + (75582 + (43758 + (2 * 24310))))))))))))))))))))))))))))))))))}<%bb2>

And with the patch, we have a bit different pattern:

{(((((483452896 + (118973571 * -1)) + (1234263759 * -1)) + (-2126782302 * -1)) + (-765765 * -1)) + (-153153 * -1)),+,(((((2061315872 + (-215553195 * -1)) + (-314457495 * -1)) + (-450978066 * -1)) + (-6435 * -1)) + (-1287 * -1))}<%bb2>

It looks like there is some canonicalization that increases the depth of canonicalized expression which doesn't apply because of depth limit. It's a paradox, but if we didn't apply canonicalizing rule "X + Y + Y --> X + Y*2" deceause of depth limit, then we have a smaller expression as result. So the bigger is depth limit, the deeper trees we get after these transforms. Not sure which exactly transform was happening here, but at least we see that in some cases deeper analysis creates even deeper trees.

But so far I'm convinced that it is not good idea to expect SCEVAddRec if we do it as we do. I'm ok with rewriting getPostIncRecurrence without SCEVAddRec.

llvmbot avatar Feb 05 '18 12:02 llvmbot

I see a weird thing here. When the crash happens, the step is following: Step recurrency is: (536878650 + (450978066 + (377348994 + (314457495 + (260932815 + (215553195 + (177232627 + (145008513 + (118030185 + (95548245 + (76904685 + (61523748 + (48903492 + (38608020 + (30260340 + (23535820 + (18156204 + (13884156 + (10518300 + (7888725 + (5852925 + (4292145 + (3108105 + (2220075 + (1562275 + (1081575 + (735471 + (490314 + (319770 + (203490 + (125970 + (75582 + (43758 + (2 * 24310))))))))))))))))))))))))))))))))))

Looks like we fail to constant-fold SCEVs.

llvmbot avatar Feb 05 '18 10:02 llvmbot

It sounds dangerous from compile time perspective.

I don't think this should regress compile time. Today when computing the post-increment of {A,+,B,+,C} we evaluate "{A,+,B,+,C}+{B,+,C}" which recurses into evaluating "A+B and "B+C" each with depth increased by one. I'm suggesting we keep doing the same thing, just more explicitly. I guess the difference is that at any point when we bail out because of the depth limitation, we return a SCEV AddRec rather than just a SCEV. Also, IIUC, using the chrec rewriting rules we can always return an AddRecExpr for getPostIncExpr because getStepRecurrence is either an AddRecExpr or some constant (for affine addrecs).

annamthomas avatar Jan 16 '18 00:01 annamthomas

But there is something I don't understand about this bug -- according to the description, we failed to simplify "SE.getAddExpr(this, getStepRecurrence(SE))" back when we forgot to pipe in the depth into a recursive getAddExpr call, which I find counter-intuitive. If anything we should have simplified more (by spending more compile time) when we forgot to pipe in the depth and rL321550 should have exposed the bug, not hidden it. I see your point, I dont understand why rL321550 hides the bug either. By passing in the depth correctly as done in rL321550, we will bail out once we reach the maxdepth and just create and return an AddExpr (not necessarily an AddRecExpr).

Also, as an aside, I tried passing in -scalar-evolution-max-arith-depth=4294967295 (UINT_MAX) and we cannot reproduce the assertion when rL321550 is present on ToT. This should have the effect of not caring about the depth in the recursion, even though we correctly pipe in the depth. IOW, "rL321550 with -scalar-evolution-max-arith-depth=UINT_MAX" should have the same effect as "rL321550 reverted". That's not the case though. I've checked that all calls within getAddExpr calls some form of arithmetic expression where we check for max-arith-depth.

annamthomas avatar Jan 12 '18 16:01 annamthomas

It sounds dangerous from compile time perspective.

I don't think this should regress compile time. Today when computing the post-increment of {A,+,B,+,C} we evaluate "{A,+,B,+,C}+{B,+,C}" which recurses into evaluating "A+B and "B+C" each with depth increased by one. I'm suggesting we keep doing the same thing, just more explicitly.

But there is something I don't understand about this bug -- according to the description, we failed to simplify "SE.getAddExpr(this, getStepRecurrence(SE))" back when we forgot to pipe in the depth into a recursive getAddExpr call, which I find counter-intuitive. If anything we should have simplified more (by spending more compile time) when we forgot to pipe in the depth and rL321550 should have exposed the bug, not hidden it.

sanjoy avatar Jan 12 '18 07:01 sanjoy

I think it is better to instead change getPostIncRecurrence to not use getAddExpr. We know that the post-inst expr for {A,+,B,+,C,+,D} is {A+B,B+C,C+D,D} etc. and we should be able to just do that in getPostIncRecurrence (which is guaranteed to give us an AddRec) instead of relying on getAddExpr.

It sounds dangerous from compile time perspective. In fact, the only reason why getAddExpr(SCEVAddRec, SCEV) did not return us an AddRecExpr was big recursion depth to evaluate this. What you propose is correct, but it takes us to make a lot of potential SCEV simplifications.

I think we should do it only if for some reason we need the result to be SCEVAddRec.

llvmbot avatar Jan 12 '18 05:01 llvmbot

I think the change only hides the actual problem in SCEV because limiting the recursion depth is only a compile time restriction and not a functional requirement. Is this correct?

SCEV does not guarantee us anything about type of sum of two other SCEVs. So you are right, limiting or not limiting the recursion depth is only done for saving the compile time. But in the same time, we do not have any guarantee that sum of AddRec and something is an AddRec. Imagine case:

S1 = {0,+,1} S2 = 1 + {0,+,-1}

SCEV has a right to say that the sum of these two SCEVis is 1. So in your case, it is incorrect to expect AddRec in the end. The bug is in using cast instead of dyn_cast. If this algorithm cannot proceed with non-AddRecExpr, we should somehow bail out.

I think it is better to instead change getPostIncRecurrence to not use getAddExpr. We know that the post-inst expr for {A,+,B,+,C,+,D} is {A+B,B+C,C+D,D} etc. and we should be able to just do that in getPostIncRecurrence (which is guaranteed to give us an AddRec) instead of relying on getAddExpr.

sanjoy avatar Jan 12 '18 02:01 sanjoy

I've check its users. Most of them are in ScalarEvolution.cpp, and there it is used for isLoopBackedgeGuardedByCond. Here we don't actually need to cast anything to SCEVAddExpr. The only place where it can be (possibly) neeed is LoopPredication.cpp.

So I think we can just remove the problematic cast, change returned type of getPostIncExpr to const SCEV *, and maybe fix its usage loop predication.

llvmbot avatar Jan 11 '18 04:01 llvmbot

I think the change only hides the actual problem in SCEV because limiting the recursion depth is only a compile time restriction and not a functional requirement. Is this correct?

SCEV does not guarantee us anything about type of sum of two other SCEVs. So you are right, limiting or not limiting the recursion depth is only done for saving the compile time. But in the same time, we do not have any guarantee that sum of AddRec and something is an AddRec. Imagine case:

S1 = {0,+,1} S2 = 1 + {0,+,-1}

SCEV has a right to say that the sum of these two SCEVis is 1. So in your case, it is incorrect to expect AddRec in the end. The bug is in using cast instead of dyn_cast. If this algorithm cannot proceed with non-AddRecExpr, we should somehow bail out.

I believe that this bug can also be reproduced without rL321550, the reproducer just will be a bit more complex. So I think we need to fix getPostIncExpr funciton or its users.

llvmbot avatar Jan 11 '18 04:01 llvmbot

The assertion failure occurs here in ScalarEvolutionExpressions.h:

const SCEVAddRecExpr *getPostIncExpr(ScalarEvolution &SE) const {
  return cast<SCEVAddRecExpr>(SE.getAddExpr(this, getStepRecurrence(SE)));
} 

At the assertion, I've confirmed "this" is an AddRec and the StepRecurrence is not an AddRecExpr, which is fine. At the end of getAddExpr, we have an expr that's not SCEVAddRecExpr. It looks like something incorrect is going on within getAddRec which is why limiting the Depth and creating an AddRec (instead of simplifying the SCEV operands further) hides the problem.

annamthomas avatar Jan 10 '18 18:01 annamthomas

Backtrace with assertion failure:

#&#8203;4  0x00007ffff5147dcc in llvm::cast<llvm::SCEVAddRecExpr, llvm::SCEV const> () at trunk/include/llvm/Support/Casting.h:255
#&#8203;5  0x00007ffff607e2e1 in llvm::SCEVAddRecExpr::getPostIncExpr(llvm::ScalarEvolution&) const () at trunk/include/llvm/Analysis/ScalarEvolutionExpressions.h:355
#&#8203;6  0x00007ffff6071578 in llvm::ScalarEvolution::getZeroExtendExpr(llvm::SCEV const*, llvm::Type*, unsigned int) () at trunk/lib/Analysis/ScalarEvolution.cpp:1741
#&#8203;7  0x00007ffff6079b1f in llvm::ScalarEvolution::isImpliedCond(llvm::CmpInst::Predicate, llvm::SCEV const*, llvm::SCEV const*, llvm::CmpInst::Predicate, llvm::SCEV const*, llvm::SCEV const*) () at trunk/lib/Analysis/ScalarEvolution.cpp:9140
#&#8203;8  0x00007ffff60707e9 in llvm::ScalarEvolution::isLoopBackedgeGuardedByCond(llvm::Loop const*, llvm::CmpInst::Predicate, llvm::SCEV const*, llvm::SCEV const*) () at trunk/lib/Analysis/ScalarEvolution.cpp:8975
#&#8203;9  0x00007ffff6071329 in llvm::ScalarEvolution::getZeroExtendExpr(llvm::SCEV const*, llvm::Type*, unsigned int) () at trunk/lib/Analysis/ScalarEvolution.cpp:1738
#&#8203;10 0x00007ffff6079b1f in llvm::ScalarEvolution::isImpliedCond(llvm::CmpInst::Predicate, llvm::SCEV const*, llvm::SCEV const*, llvm::CmpInst::Predicate, llvm::SCEV const*, llvm::SCEV const*) () at trunk/lib/Analysis/ScalarEvolution.cpp:9140
#&#8203;11 0x00007ffff607a12f in llvm::ScalarEvolution::isImpliedCond(llvm::CmpInst::Predicate, llvm::SCEV const*, llvm::SCEV const*, llvm::Value*, bool) () at trunk/lib/Analysis/ScalarEvolution.cpp:9125
#&#8203;12 0x00007ffff6070932 in llvm::ScalarEvolution::isLoopBackedgeGuardedByCond(llvm::Loop const*, llvm::CmpInst::Predicate, llvm::SCEV const*, llvm::SCEV const*) () at trunk/lib/Analysis/ScalarEvolution.cpp:8954
#&#8203;13 0x00007ffff6071329 in llvm::ScalarEvolution::getZeroExtendExpr(llvm::SCEV const*, llvm::Type*, unsigned int) () at trunk/lib/Analysis/ScalarEvolution.cpp:1738
#&#8203;14 0x00007ffff609acad in llvm::SCEVExpander::getAddRecExprPHILiterally(llvm::SCEVAddRecExpr const*, llvm::Loop const*, llvm::Type*, llvm::Type*, llvm::Type*&, bool&) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1112
#&#8203;15 0x00007ffff609afd3 in llvm::SCEVExpander::expandAddRecExprLiterally(llvm::SCEVAddRecExpr const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1360
#&#8203;16 0x00007ffff609752b in llvm::SCEVExpander::expand(llvm::SCEV const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1779
#&#8203;17 0x00007ffff60976d6 in llvm::SCEVExpander::expandCodeFor(llvm::SCEV const*, llvm::Type*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1674
#&#8203;18 0x00007ffff60977e2 in llvm::SCEVExpander::visitMulExpr(llvm::SCEVMulExpr const*)::{lambda()#1}::operator()() const () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:774
#&#8203;19 0x00007ffff6097a90 in llvm::SCEVExpander::visitMulExpr(llvm::SCEVMulExpr const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:800
#&#8203;20 0x00007ffff609752b in llvm::SCEVExpander::expand(llvm::SCEV const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1779
#&#8203;21 0x00007ffff60976d6 in llvm::SCEVExpander::expandCodeFor(llvm::SCEV const*, llvm::Type*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1674
#&#8203;22 0x00007ffff609bc5f in llvm::SCEVExpander::visitAddExpr(llvm::SCEVAddExpr const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:723
#&#8203;23 0x00007ffff609752b in llvm::SCEVExpander::expand(llvm::SCEV const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1779
#&#8203;24 0x00007ffff60976d6 in llvm::SCEVExpander::expandCodeFor(llvm::SCEV const*, llvm::Type*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1674
#&#8203;25 0x00007ffff60977e2 in llvm::SCEVExpander::visitMulExpr(llvm::SCEVMulExpr const*)::{lambda()#1}::operator()() const () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:774
#&#8203;26 0x00007ffff6097a90 in llvm::SCEVExpander::visitMulExpr(llvm::SCEVMulExpr const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:800
#&#8203;27 0x00007ffff609752b in llvm::SCEVExpander::expand(llvm::SCEV const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1779
#&#8203;28 0x00007ffff60976d6 in llvm::SCEVExpander::expandCodeFor(llvm::SCEV const*, llvm::Type*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1674
#&#8203;29 0x00007ffff609bc5f in llvm::SCEVExpander::visitAddExpr(llvm::SCEVAddExpr const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:723
#&#8203;30 0x00007ffff609752b in llvm::SCEVExpander::expand(llvm::SCEV const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1779
#&#8203;31 0x00007ffff60976d6 in llvm::SCEVExpander::expandCodeFor(llvm::SCEV const*, llvm::Type*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1674
#&#8203;32 0x00007ffff60977e2 in llvm::SCEVExpander::visitMulExpr(llvm::SCEVMulExpr const*)::{lambda()#1}::operator()() const () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:774
#&#8203;33 0x00007ffff6097a90 in llvm::SCEVExpander::visitMulExpr(llvm::SCEVMulExpr const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:800
#&#8203;34 0x00007ffff609752b in llvm::SCEVExpander::expand(llvm::SCEV const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1779
#&#8203;35 0x00007ffff60976d6 in llvm::SCEVExpander::expandCodeFor(llvm::SCEV const*, llvm::Type*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1674
#&#8203;36 0x00007ffff609bc5f in llvm::SCEVExpander::visitAddExpr(llvm::SCEVAddExpr const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:723
#&#8203;37 0x00007ffff609752b in llvm::SCEVExpander::expand(llvm::SCEV const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1779
#&#8203;38 0x00007ffff60976d6 in llvm::SCEVExpander::expandCodeFor(llvm::SCEV const*, llvm::Type*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1674
#&#8203;39 0x00007ffff60977e2 in llvm::SCEVExpander::visitMulExpr(llvm::SCEVMulExpr const*)::{lambda()#1}::operator()() const () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:774
#&#8203;40 0x00007ffff6097a90 in llvm::SCEVExpander::visitMulExpr(llvm::SCEVMulExpr const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:800
#&#8203;41 0x00007ffff609752b in llvm::SCEVExpander::expand(llvm::SCEV const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1779
#&#8203;42 0x00007ffff60976d6 in llvm::SCEVExpander::expandCodeFor(llvm::SCEV const*, llvm::Type*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1674
#&#8203;43 0x00007ffff609bc5f in llvm::SCEVExpander::visitAddExpr(llvm::SCEVAddExpr const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:723
#&#8203;44 0x00007ffff609752b in llvm::SCEVExpander::expand(llvm::SCEV const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1779
#&#8203;45 0x00007ffff60976d6 in llvm::SCEVExpander::expandCodeFor(llvm::SCEV const*, llvm::Type*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1674
#&#8203;46 0x00007ffff60977e2 in llvm::SCEVExpander::visitMulExpr(llvm::SCEVMulExpr const*)::{lambda()#1}::operator()() const () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:774
#&#8203;47 0x00007ffff6097a90 in llvm::SCEVExpander::visitMulExpr(llvm::SCEVMulExpr const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:800
#&#8203;48 0x00007ffff609752b in llvm::SCEVExpander::expand(llvm::SCEV const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1779
#&#8203;49 0x00007ffff60976d6 in llvm::SCEVExpander::expandCodeFor(llvm::SCEV const*, llvm::Type*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1674
#&#8203;50 0x00007ffff609bc5f in llvm::SCEVExpander::visitAddExpr(llvm::SCEVAddExpr const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:723
#&#8203;51 0x00007ffff609752b in llvm::SCEVExpander::expand(llvm::SCEV const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1779
#&#8203;52 0x00007ffff60976d6 in llvm::SCEVExpander::expandCodeFor(llvm::SCEV const*, llvm::Type*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1674
#&#8203;53 0x00007ffff60977e2 in llvm::SCEVExpander::visitMulExpr(llvm::SCEVMulExpr const*)::{lambda()#1}::operator()() const () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:774
#&#8203;54 0x00007ffff6097a90 in llvm::SCEVExpander::visitMulExpr(llvm::SCEVMulExpr const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:800
#&#8203;55 0x00007ffff609752b in llvm::SCEVExpander::expand(llvm::SCEV const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1779
#&#8203;56 0x00007ffff60976d6 in llvm::SCEVExpander::expandCodeFor(llvm::SCEV const*, llvm::Type*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1674
#&#8203;57 0x00007ffff609bc5f in llvm::SCEVExpander::visitAddExpr(llvm::SCEVAddExpr const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:723
#&#8203;58 0x00007ffff609752b in llvm::SCEVExpander::expand(llvm::SCEV const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1779
#&#8203;59 0x00007ffff60976d6 in llvm::SCEVExpander::expandCodeFor(llvm::SCEV const*, llvm::Type*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1674
#&#8203;60 0x00007ffff60977e2 in llvm::SCEVExpander::visitMulExpr(llvm::SCEVMulExpr const*)::{lambda()#1}::operator()() const () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:774
#&#8203;61 0x00007ffff6097a90 in llvm::SCEVExpander::visitMulExpr(llvm::SCEVMulExpr const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:800
#&#8203;62 0x00007ffff609752b in llvm::SCEVExpander::expand(llvm::SCEV const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1779
#&#8203;63 0x00007ffff60976d6 in llvm::SCEVExpander::expandCodeFor(llvm::SCEV const*, llvm::Type*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1674
#&#8203;64 0x00007ffff609bc5f in llvm::SCEVExpander::visitAddExpr(llvm::SCEVAddExpr const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:723
#&#8203;65 0x00007ffff609752b in llvm::SCEVExpander::expand(llvm::SCEV const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1779
#&#8203;66 0x00007ffff60976d6 in llvm::SCEVExpander::expandCodeFor(llvm::SCEV const*, llvm::Type*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1674
#&#8203;67 0x00007ffff60977e2 in llvm::SCEVExpander::visitMulExpr(llvm::SCEVMulExpr const*)::{lambda()#1}::operator()() const () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:774
#&#8203;68 0x00007ffff6097a90 in llvm::SCEVExpander::visitMulExpr(llvm::SCEVMulExpr const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:800
#&#8203;69 0x00007ffff609752b in llvm::SCEVExpander::expand(llvm::SCEV const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1779
#&#8203;70 0x00007ffff60976d6 in llvm::SCEVExpander::expandCodeFor(llvm::SCEV const*, llvm::Type*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1674
#&#8203;71 0x00007ffff609bc5f in llvm::SCEVExpander::visitAddExpr(llvm::SCEVAddExpr const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:723
#&#8203;72 0x00007ffff609752b in llvm::SCEVExpander::expand(llvm::SCEV const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1779
#&#8203;73 0x00007ffff60976d6 in llvm::SCEVExpander::expandCodeFor(llvm::SCEV const*, llvm::Type*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1674
#&#8203;74 0x00007ffff60977e2 in llvm::SCEVExpander::visitMulExpr(llvm::SCEVMulExpr const*)::{lambda()#1}::operator()() const () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:774
#&#8203;75 0x00007ffff6097a90 in llvm::SCEVExpander::visitMulExpr(llvm::SCEVMulExpr const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:800
#&#8203;76 0x00007ffff609752b in llvm::SCEVExpander::expand(llvm::SCEV const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1779
#&#8203;77 0x00007ffff60976d6 in llvm::SCEVExpander::expandCodeFor(llvm::SCEV const*, llvm::Type*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1674
#&#8203;78 0x00007ffff609bc5f in llvm::SCEVExpander::visitAddExpr(llvm::SCEVAddExpr const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:723
#&#8203;79 0x00007ffff609752b in llvm::SCEVExpander::expand(llvm::SCEV const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1779
#&#8203;80 0x00007ffff60976d6 in llvm::SCEVExpander::expandCodeFor(llvm::SCEV const*, llvm::Type*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1674
#&#8203;81 0x00007ffff5cd6326 in (anonymous namespace)::LSRInstance::Expand((anonymous namespace)::LSRUse const&, (anonymous namespace)::LSRFixup const&, (anonymous namespace)::Formula const&, llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction, true, false, void>, false, false>, llvm::SCEVExpander&, llvm::SmallVectorImpl<llvm::WeakTrackingVH>&) const () at trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp:4966
#&#8203;82 0x00007ffff5cdc598 in (anonymous namespace)::LSRInstance::ImplementSolution(llvm::SmallVectorImpl<(anonymous namespace)::Formula const*> const&) () at trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp:5189
#&#8203;83 0x00007ffff5ce5c46 in ReduceLoopStrength(llvm::Loop*, llvm::IVUsers&, llvm::ScalarEvolution&, llvm::DominatorTree&, llvm::LoopInfo&, llvm::TargetTransformInfo const&) () at trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp:5360
#&#8203;84 0x00007ffff6000aeb in llvm::LPPassManager::runOnFunction(llvm::Function&) () at trunk/lib/Analysis/LoopPass.cpp:202

annamthomas avatar Jan 10 '18 18:01 annamthomas