[PATCH] D48338: [SCEV] Improve zext(A /u B) and zext(A % B)
Alexandre Isoard via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 19 16:56:18 PDT 2018
alexandre.isoard added a comment.
I have been working on related issue but my strategy is different:
When we reduce `AddExpr(zext(X), Y, Z)` I ask for `X' = getAnyExtendExpr(X)` (which do not involve any `zext`/`sext`/`trunc` usually and try to look for a matching `(A*X'/A)` in `Y` or `Z`.
If I find it, then I replace the `zext(X)` by `X'` and remove the matching `(A*X'/A)`.
That is, it is equivalent to replace `zext(X)` by `X'-(X'/A*A)` and have the subtract part cancel out with one of the other element of the addition.
https://reviews.llvm.org/D48338
More information about the llvm-commits
mailing list