[llvm] [SCEV] Add non-poison/non-zero checks on denominators (PR #117152)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 21 05:06:11 PST 2024
================
@@ -3422,9 +3422,14 @@ const SCEV *ScalarEvolution::getUDivExpr(const SCEV *LHS,
if (const SCEV *S = UniqueSCEVs.FindNodeOrInsertPos(ID, IP))
return S;
+ // If the denominator is zero, the udiv will trap.
----------------
fhahn wrote:
```suggestion
// If the denominator is zero or poison, the udiv will trap.
```
https://github.com/llvm/llvm-project/pull/117152
More information about the llvm-commits
mailing list