[llvm] [LLVM][SCEV] udiv (mul nuw a, vscale), (mul nuw b, vscale) -> udiv a, b (PR #157836)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 30 11:48:34 PDT 2025


================
@@ -3598,6 +3598,12 @@ const SCEV *ScalarEvolution::getUDivExpr(const SCEV *LHS,
     }
   }
 
+  // udiv (mul nuw a, vscale), (mul nuw b, vscale) --> udiv a, b
----------------
nikic wrote:

`// TODO: Generalize to handle any common factors.`

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


More information about the llvm-commits mailing list