[llvm] [SCEV] Introduce SCEVExactFlags for UDiv (PR #225065)

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 21 09:47:19 PDT 2026


================
@@ -7942,7 +7945,7 @@ const SCEV *ScalarEvolution::createSCEV(Value *V) {
     case Instruction::UDiv:
       LHS = getSCEV(BO->LHS);
       RHS = getSCEV(BO->RHS);
-      return getUDivExpr(LHS, RHS);
+      return getUDivExpr(LHS, RHS, BO->IsExact);
----------------
efriedma-quic wrote:

This is setting the flag on the expression, not the SCEVUse, right?  That seems suspicious; a failure of "exact" produces poison, similar to nsw.

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


More information about the llvm-commits mailing list