matthias-springer wrote: If that's the only reason, we should be able to replace the implementation with a call to `getConstantIntValue`, which uses the matcher API. Then we won't rely on the Arith dialect anymore. https://github.com/llvm/llvm-project/pull/84544