llvm-project
llvm-project copied to clipboard
[mlir][arith] `arith.addui_extended` on `index` types rejected on lowering: what's the intended semantics?
Reproduction: https://godbolt.org/z/6jMa76WEb
module {
func.func @main() {
%ca = arith.constant 5 : index
%c1 = call @get_idx() : () -> (index)
%sum, %overflow = arith.addui_extended %ca, %c1 : index, i1
vector.print %sum : index
vector.print %overflow : i1
return
}
func.func @get_idx() -> (index) {
%c1 = arith.constant 1 : index
return %c1 : index
}
}
fails to lower with mlir-opt --test-lower-to-llvm. From the spec it seems like it should work on index types too, as the supported lhs, rhs types are "signless-integer-like", which includes index types.
If this rejection is intended, then we should update the spec