[Mlir-commits] [mlir] Make index computation used divsi/remsi (PR #124390)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Fri Jan 24 20:15:08 PST 2025


MaheshRavishankar wrote:

It does prevent some folding. AFAIU this is legal

```
%0 = arith.muli %a, %b : index
%1 = arith.divsi %0, %b : index
```

To just be `%a` when I add `nsw` on the `muli`. But I cant really add `nuw` to index computations without analysis. My understanding is that it's just better to keep all indexing math signed 

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


More information about the Mlir-commits mailing list