Displaying 1 result from an estimated 1 matches for "scevtype".
Did you mean:
devtype
2019 Mar 25
2
[IndVars] Rewriting exit value of SCEV add expressions
...b.ll
After rL346397 we have additional ADD instruction inside the loop which is a performance regression.
I think after rL346397 LSR is not able to rewrite all the uses of %2 because phi node (%.lcssa) was not rewritten by indvars pass.
Simple fix would be just returning back original check for SCEVType in lib/Transforms/Scalar/IndVarSimplify.cpp:
- if (!isa<SCEVConstant>(ExitValue) && hasHardUserWithinLoop(L, Inst))
+ if ((ExitValue->getSCEVType() >= scMulExpr) && hasHardUserWithinLoop(L, Inst))
Note, there is another bug opened for the mentioned patch:...