[PATCH] D66890: [IndVarSimplify] Do not use SCEV expander for IVCount in LFTR when possible.

Alexander Us via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 11 03:24:45 PDT 2019


aus_intel marked an inline comment as done.
aus_intel added a comment.

Sorry for delayed answer.

1. How can I land tests in precommit? I tested my patch locally (lit tests and LNT on x86) and everything seems to be ok. I would be glad to know if there is possibility for more testing.
2. About auto-generation of affected test. Is it about these ll tests that I attached to patch? If so, I have already used script to regenerate them.
3. Probably, I left a bad comment pointing to SCEV expander. Actually, it is SCEV analysis issue. It loses flags from add instruction and then SCEV expander cannot find any cached value to use it which results in extra instruction without flags. This new instruction is for logically the same operation (compute loop limit) so the old value could be reused. There is a function getNoWrapFlagsFromUB that tries to set flags for computed SCEV. It calls isSCEVExprNeverPoison which does not handle loop invariants and this leads to losing of flags. However, if I fix this function (I tried this locally), the problem still presents. The issue is that there are some transformations of SCEV obtained from loop limit and these can lose flags again.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66890/new/

https://reviews.llvm.org/D66890





More information about the llvm-commits mailing list