Jhalak Patel ec179f2269
[mlir][vector]: Extend convertIntegerAttr to handle float-to-integer conversion (#159627)
Fixes #159613

`vector.from_elements` crashes when processing float attributes with
integer result types (e.g., `llvm.mlir.constant(0.0 : f8E4M3FN) : i8`
from arith-to-llvm lowering):

```
Assertion `newType.getElementType() == curType.getElementType() && "expected the same element type"' failed.
```

## Implementation
- Rename `convertIntegerAttr` → `convertNumericAttr` 
- Add float-to-integer conversion using `APFloat::convertToInteger()`
with exactness assertion
- Preserve existing integer-to-integer conversion behavior

Only implements conversions that pass LLVM verification. Other patterns
(int→float, float→float, bool→int) are rejected by LLVM verifier before
reaching this code, as documented in the attached verification failures.
2025-09-25 15:23:49 +08:00
..