[llvm] [SCEV] Improve applyLoopGuards to support Mul (PR #83428)

via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 17 01:30:06 PDT 2024


komalon1 wrote:

> > It does so by preserving the information that a SCEVMul with a SCEVConstant operand divides by this constant.
> 
> Maybe I'm misunderstanding what you are doing, but I don't think that's correct due to overflow? E.g. consider https://alive2.llvm.org/ce/z/Ljc8Jj.
> 
> You'd have to restrict this to either power of two constants, or check for appropriate nowrap flags.
> 
> > It also generalized the assumption cache divisibility propagation to non-SCEVUnknowns.
> 
> This improvement sounds unrelated to the other one -- can it be split into a separate patch?

@nikic I split the patches. Any other comments?

https://github.com/llvm/llvm-project/pull/83428


More information about the llvm-commits mailing list