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

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 30 01:46:38 PDT 2026


================
@@ -217,7 +217,7 @@ const SCEV *vputils::getSCEVExprForVPValue(const VPValue *V,
     });
   // A SDiv with non-negative operands is equivalent to an UDiv.
   if (match(V, m_SDiv(m_VPValue(LHSVal), m_VPValue(RHSVal)))) {
-    return CreateSCEV({LHSVal, RHSVal}, [&](ArrayRef<SCEVUse> Ops) {
+    return CreateSCEV({LHSVal, RHSVal}, [&](ArrayRef<SCEVUse> Ops) -> SCEVUse {
----------------
artagnon wrote:

It was necessitated by this PR changing the return type of getUDiv to SCEVUse, and lacks motivation without it?

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


More information about the llvm-commits mailing list