[mlir][ArithToLLVM] Fix index lowering for addui_extended (#223265)
Lowering `arith.addui_extended` with `index` operands fails because the
LLVM
result struct uses the unconverted sum type, even though the operands
have
already been converted.
Convert the sum type before constructing the LLVM result struct. Extend
the
existing index-bitwidth tests to cover `arith.addui_extended` at 32-,
64-, and
128-bit widths, reusing their RUN lines. Rename
`constant-index-bitwidth.mlir`
to `index-bitwidth.mlir` to reflect the broader coverage.
This preserves the operation's existing `index` support and uses the
converted
index width for the overflow intrinsic. Related discussion of `index`
support
in extended arithmetic: https://github.com/llvm/llvm-project/pull/85973.
The index reproducer fails without the fix. All five ArithToLLVM test
files
pass with assertions enabled on upstream base `4098f568c4`, including
the
32-, 64-, and 128-bit index lowering checks.
Addresses the lowering failure reported in
https://github.com/llvm/llvm-project/issues/84986.
Assisted-by: Codex