SCEV expander assertion in LSR
| 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
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
Fix merged: https://reviews.llvm.org/rL324866
Fix https://reviews.llvm.org/D42953 on review.
I was able to make a simple test on top of https://reviews.llvm.org/D42835 that exposes the problem. Preparing patch.
I will try to not use getAddExpr in this method and see where it gets us.
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))
And with the patch, we have a bit different pattern:
{(((((483452896 + (118973571 * -1))
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.
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.
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).
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.
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.
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.
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.
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.
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.
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.
Backtrace with assertion failure:
#​4 0x00007ffff5147dcc in llvm::cast<llvm::SCEVAddRecExpr, llvm::SCEV const> () at trunk/include/llvm/Support/Casting.h:255
#​5 0x00007ffff607e2e1 in llvm::SCEVAddRecExpr::getPostIncExpr(llvm::ScalarEvolution&) const () at trunk/include/llvm/Analysis/ScalarEvolutionExpressions.h:355
#​6 0x00007ffff6071578 in llvm::ScalarEvolution::getZeroExtendExpr(llvm::SCEV const*, llvm::Type*, unsigned int) () at trunk/lib/Analysis/ScalarEvolution.cpp:1741
#​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
#​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
#​9 0x00007ffff6071329 in llvm::ScalarEvolution::getZeroExtendExpr(llvm::SCEV const*, llvm::Type*, unsigned int) () at trunk/lib/Analysis/ScalarEvolution.cpp:1738
#​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
#​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
#​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
#​13 0x00007ffff6071329 in llvm::ScalarEvolution::getZeroExtendExpr(llvm::SCEV const*, llvm::Type*, unsigned int) () at trunk/lib/Analysis/ScalarEvolution.cpp:1738
#​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
#​15 0x00007ffff609afd3 in llvm::SCEVExpander::expandAddRecExprLiterally(llvm::SCEVAddRecExpr const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1360
#​16 0x00007ffff609752b in llvm::SCEVExpander::expand(llvm::SCEV const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1779
#​17 0x00007ffff60976d6 in llvm::SCEVExpander::expandCodeFor(llvm::SCEV const*, llvm::Type*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1674
#​18 0x00007ffff60977e2 in llvm::SCEVExpander::visitMulExpr(llvm::SCEVMulExpr const*)::{lambda()#1}::operator()() const () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:774
#​19 0x00007ffff6097a90 in llvm::SCEVExpander::visitMulExpr(llvm::SCEVMulExpr const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:800
#​20 0x00007ffff609752b in llvm::SCEVExpander::expand(llvm::SCEV const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1779
#​21 0x00007ffff60976d6 in llvm::SCEVExpander::expandCodeFor(llvm::SCEV const*, llvm::Type*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1674
#​22 0x00007ffff609bc5f in llvm::SCEVExpander::visitAddExpr(llvm::SCEVAddExpr const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:723
#​23 0x00007ffff609752b in llvm::SCEVExpander::expand(llvm::SCEV const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1779
#​24 0x00007ffff60976d6 in llvm::SCEVExpander::expandCodeFor(llvm::SCEV const*, llvm::Type*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1674
#​25 0x00007ffff60977e2 in llvm::SCEVExpander::visitMulExpr(llvm::SCEVMulExpr const*)::{lambda()#1}::operator()() const () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:774
#​26 0x00007ffff6097a90 in llvm::SCEVExpander::visitMulExpr(llvm::SCEVMulExpr const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:800
#​27 0x00007ffff609752b in llvm::SCEVExpander::expand(llvm::SCEV const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1779
#​28 0x00007ffff60976d6 in llvm::SCEVExpander::expandCodeFor(llvm::SCEV const*, llvm::Type*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1674
#​29 0x00007ffff609bc5f in llvm::SCEVExpander::visitAddExpr(llvm::SCEVAddExpr const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:723
#​30 0x00007ffff609752b in llvm::SCEVExpander::expand(llvm::SCEV const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1779
#​31 0x00007ffff60976d6 in llvm::SCEVExpander::expandCodeFor(llvm::SCEV const*, llvm::Type*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1674
#​32 0x00007ffff60977e2 in llvm::SCEVExpander::visitMulExpr(llvm::SCEVMulExpr const*)::{lambda()#1}::operator()() const () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:774
#​33 0x00007ffff6097a90 in llvm::SCEVExpander::visitMulExpr(llvm::SCEVMulExpr const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:800
#​34 0x00007ffff609752b in llvm::SCEVExpander::expand(llvm::SCEV const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1779
#​35 0x00007ffff60976d6 in llvm::SCEVExpander::expandCodeFor(llvm::SCEV const*, llvm::Type*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1674
#​36 0x00007ffff609bc5f in llvm::SCEVExpander::visitAddExpr(llvm::SCEVAddExpr const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:723
#​37 0x00007ffff609752b in llvm::SCEVExpander::expand(llvm::SCEV const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1779
#​38 0x00007ffff60976d6 in llvm::SCEVExpander::expandCodeFor(llvm::SCEV const*, llvm::Type*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1674
#​39 0x00007ffff60977e2 in llvm::SCEVExpander::visitMulExpr(llvm::SCEVMulExpr const*)::{lambda()#1}::operator()() const () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:774
#​40 0x00007ffff6097a90 in llvm::SCEVExpander::visitMulExpr(llvm::SCEVMulExpr const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:800
#​41 0x00007ffff609752b in llvm::SCEVExpander::expand(llvm::SCEV const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1779
#​42 0x00007ffff60976d6 in llvm::SCEVExpander::expandCodeFor(llvm::SCEV const*, llvm::Type*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1674
#​43 0x00007ffff609bc5f in llvm::SCEVExpander::visitAddExpr(llvm::SCEVAddExpr const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:723
#​44 0x00007ffff609752b in llvm::SCEVExpander::expand(llvm::SCEV const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1779
#​45 0x00007ffff60976d6 in llvm::SCEVExpander::expandCodeFor(llvm::SCEV const*, llvm::Type*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1674
#​46 0x00007ffff60977e2 in llvm::SCEVExpander::visitMulExpr(llvm::SCEVMulExpr const*)::{lambda()#1}::operator()() const () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:774
#​47 0x00007ffff6097a90 in llvm::SCEVExpander::visitMulExpr(llvm::SCEVMulExpr const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:800
#​48 0x00007ffff609752b in llvm::SCEVExpander::expand(llvm::SCEV const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1779
#​49 0x00007ffff60976d6 in llvm::SCEVExpander::expandCodeFor(llvm::SCEV const*, llvm::Type*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1674
#​50 0x00007ffff609bc5f in llvm::SCEVExpander::visitAddExpr(llvm::SCEVAddExpr const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:723
#​51 0x00007ffff609752b in llvm::SCEVExpander::expand(llvm::SCEV const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1779
#​52 0x00007ffff60976d6 in llvm::SCEVExpander::expandCodeFor(llvm::SCEV const*, llvm::Type*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1674
#​53 0x00007ffff60977e2 in llvm::SCEVExpander::visitMulExpr(llvm::SCEVMulExpr const*)::{lambda()#1}::operator()() const () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:774
#​54 0x00007ffff6097a90 in llvm::SCEVExpander::visitMulExpr(llvm::SCEVMulExpr const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:800
#​55 0x00007ffff609752b in llvm::SCEVExpander::expand(llvm::SCEV const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1779
#​56 0x00007ffff60976d6 in llvm::SCEVExpander::expandCodeFor(llvm::SCEV const*, llvm::Type*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1674
#​57 0x00007ffff609bc5f in llvm::SCEVExpander::visitAddExpr(llvm::SCEVAddExpr const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:723
#​58 0x00007ffff609752b in llvm::SCEVExpander::expand(llvm::SCEV const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1779
#​59 0x00007ffff60976d6 in llvm::SCEVExpander::expandCodeFor(llvm::SCEV const*, llvm::Type*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1674
#​60 0x00007ffff60977e2 in llvm::SCEVExpander::visitMulExpr(llvm::SCEVMulExpr const*)::{lambda()#1}::operator()() const () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:774
#​61 0x00007ffff6097a90 in llvm::SCEVExpander::visitMulExpr(llvm::SCEVMulExpr const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:800
#​62 0x00007ffff609752b in llvm::SCEVExpander::expand(llvm::SCEV const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1779
#​63 0x00007ffff60976d6 in llvm::SCEVExpander::expandCodeFor(llvm::SCEV const*, llvm::Type*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1674
#​64 0x00007ffff609bc5f in llvm::SCEVExpander::visitAddExpr(llvm::SCEVAddExpr const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:723
#​65 0x00007ffff609752b in llvm::SCEVExpander::expand(llvm::SCEV const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1779
#​66 0x00007ffff60976d6 in llvm::SCEVExpander::expandCodeFor(llvm::SCEV const*, llvm::Type*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1674
#​67 0x00007ffff60977e2 in llvm::SCEVExpander::visitMulExpr(llvm::SCEVMulExpr const*)::{lambda()#1}::operator()() const () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:774
#​68 0x00007ffff6097a90 in llvm::SCEVExpander::visitMulExpr(llvm::SCEVMulExpr const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:800
#​69 0x00007ffff609752b in llvm::SCEVExpander::expand(llvm::SCEV const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1779
#​70 0x00007ffff60976d6 in llvm::SCEVExpander::expandCodeFor(llvm::SCEV const*, llvm::Type*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1674
#​71 0x00007ffff609bc5f in llvm::SCEVExpander::visitAddExpr(llvm::SCEVAddExpr const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:723
#​72 0x00007ffff609752b in llvm::SCEVExpander::expand(llvm::SCEV const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1779
#​73 0x00007ffff60976d6 in llvm::SCEVExpander::expandCodeFor(llvm::SCEV const*, llvm::Type*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1674
#​74 0x00007ffff60977e2 in llvm::SCEVExpander::visitMulExpr(llvm::SCEVMulExpr const*)::{lambda()#1}::operator()() const () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:774
#​75 0x00007ffff6097a90 in llvm::SCEVExpander::visitMulExpr(llvm::SCEVMulExpr const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:800
#​76 0x00007ffff609752b in llvm::SCEVExpander::expand(llvm::SCEV const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1779
#​77 0x00007ffff60976d6 in llvm::SCEVExpander::expandCodeFor(llvm::SCEV const*, llvm::Type*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1674
#​78 0x00007ffff609bc5f in llvm::SCEVExpander::visitAddExpr(llvm::SCEVAddExpr const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:723
#​79 0x00007ffff609752b in llvm::SCEVExpander::expand(llvm::SCEV const*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1779
#​80 0x00007ffff60976d6 in llvm::SCEVExpander::expandCodeFor(llvm::SCEV const*, llvm::Type*) () at trunk/lib/Analysis/ScalarEvolutionExpander.cpp:1674
#​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
#​82 0x00007ffff5cdc598 in (anonymous namespace)::LSRInstance::ImplementSolution(llvm::SmallVectorImpl<(anonymous namespace)::Formula const*> const&) () at trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp:5189
#​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
#​84 0x00007ffff6000aeb in llvm::LPPassManager::runOnFunction(llvm::Function&) () at trunk/lib/Analysis/LoopPass.cpp:202