[llvm] [DA] Fix overflow in symbolic RDIV test (PR #185805)
Ruoyu Qiu via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 11 00:10:44 PDT 2026
cabbaken wrote:
@kasuga-fj
Hi! I noticed you've recently worked on DependenceAnalysis. I'm looking at the overflow happens in `symbolicRDIVtest` computes index bounds and noticed it uses raw `SE->getMulExpr` without guarding against signed overflow, which could potentially trick isKnownPredicate into proving a false independence. And this is the reason of the failure of detecting dependence in symbolic-rdiv-overflow.ll.
I've put together this draft proposing a `mulSCEVNoSignedOverflow` helper (similar to the existing subtraction helper `minusSCEVNoSignedOverflow`) to bail out safely if an overflow is possible. Since you're familiar with this pass, do you think this is the right approach to handle this?
https://github.com/llvm/llvm-project/pull/185805
More information about the llvm-commits
mailing list