[Mlir-commits] [mlir] [mlir][arith] Mark `arith.remsi` and `arith.remui` as conditionally speculatable (PR #188263)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Mar 24 08:17:34 PDT 2026


================
@@ -954,6 +958,10 @@ OpFoldResult arith::RemSIOp::fold(FoldAdaptor adaptor) {
   return div0 ? Attribute() : result;
 }
 
+Speculation::Speculatability arith::RemSIOp::getSpeculatability() {
+  return getDivSISpeculatability(getRhs());
----------------
abylinkin-hue wrote:

Isn't  "x % -1" always 0? getDivSISpeculatability() doesn't allow -1 divisor.

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


More information about the Mlir-commits mailing list