[PATCH] D28308: [SCEV] Model ashr(shl(x, n), m) as mul(x, 2^(n-m)) when n > m
Z. Zheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 22 11:55:40 PST 2017
zzheng added a comment.
Sanjoy,
I'm not familiar with SCEV, can you clarify my questions below?
> - Lower `ashr X C` as `sext(trunc(udiv(X, 1 << C)))`, irrespective of what `X` is
This part should be done in const SCEV *ScalarEvolution::createSCEV(Value *V) as the patch is doing
> - Add a separate rule that `(A mul (1 << C0)) udiv (1 << C1)` is `sext(trunc(A mul (1 << (C0 - C1))))` if `C0 > C1`
Should this be done inside getMulExpr()?
I'm not very familiar with SCEV, do you mean
Repository:
rL LLVM
https://reviews.llvm.org/D28308
More information about the llvm-commits
mailing list