[PATCH] D32663: [SCEV] createAddRecFromPHI: Optimize for the most common case.
Sanjoy Das via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 3 15:53:22 PDT 2017
sanjoy added a comment.
In https://reviews.llvm.org/D32663#745401, @mzolotukhin wrote:
> Thanks for taking a look, I've updated the patch.
>
> The change in `2014-08-29-CompactUnwind.ll` is caused by the fact that SCEV started to produce a simpler expression for `%iv.i`, which allowed LSR to optimize the test harder.
Hm, I suspect this is because `BEValue` would be a `SCEVUnknown` in that case (== the symbolic phi) in the slow path since `%iv.i+0` would be simplified to `%iv.i`.
So that means this change isn't quite NFC. Can you please add a dedicated test case checking the difference in behavior above ^?
> The test seems to exercise instructions positions, so I tried to keep them untouched with this change. It's still a question why the original SCEV algorithm failed to construct the simpler expression for this case, I'll take a look at it later if I find a time.
>
> Michael
https://reviews.llvm.org/D32663
More information about the llvm-commits
mailing list