[PATCH] D141823: [SCEV] More precise trip multiples
Joshua Cao via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 21 01:18:37 PDT 2023
caojoshua marked 2 inline comments as done.
caojoshua added inline comments.
================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:6332
+ for (unsigned I = 1, E = N->getNumOperands(); I < E && Res != 1; ++I)
+ Res = APIntOps::GreatestCommonDivisor(
+ Res, getConstantMultiple(N->getOperand(I)));
----------------
mkazantsev wrote:
> This might be overly conservative for `mul`. You can just take constant multiple of any operand, or even their product from all operands. I'm OK if it's not in this patch, but maybe you should consider this.
Maybe you missed this. There is a `case scMulExpr` above that takes the product if there is no unsigned wrap.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141823/new/
https://reviews.llvm.org/D141823
More information about the llvm-commits
mailing list