Issue 203380
Summary [MLIR][DialectConversion] convertFuncOpTypes of the function op converts does not update arg attributes
Labels mlir
Assignees
Reporter red1bluelost
    When using populateFunctionOpInterfaceTypeConversionPattern or similar functions that call to convertFuncOpTypes, if multiple parameters get expanded to more than a single new value, the argument attributes of the function will no longer line up properly.

Example:

```mlir
func.func @some_func(%arg0: i64 {my_attr = 0 : i32}, %arg1: i64  {my_attr = 1 : i32}) {
 func.return
}
```
If we use the function op conversion to make these 32 bit integers, we could end up with the following:
```mlir
func.func @some_func(%arg0_0: i32 {my_attr = 0 : i32}, %arg0_1: i32  {my_attr = 1 : i32}, %arg1_0: i32, %arg1_1: i32) {
  func.return
}
```
Where the argument attribute of the original %arg1 is now attached to an argument associated with %arg0.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to