Issue 115742
Summary Bug in the VectorEmulateNarrowType logic
Labels
Assignees
Reporter banach-space
    **Reproducer** 

```mlir
func.func @vector_cst_maskedload_i4(%passthru: vector<8xi4>) -> vector<8xi4> {
  %0 = memref.alloc() : memref<3x8xi4>
 %cst = arith.constant dense<0> : vector<8xi4>
  %mask = arith.constant dense<[false, true, true, true, true, false, false, false]> : vector<8xi1>
  %c0 = arith.constant 0 : index
  %1 = vector.maskedload %0[%c0, %c0], %mask, %passthru :
    memref<3x8xi4>, vector<8xi1>, vector<8xi4> into vector<8xi4>
  return %1 : vector<8xi4>
}
```

**To run**
```bash
mlir-opt --test-emulate-narrow-int="arith-compute-bitwidth=1 memref-load-bitwidth=8" --cse --split-input-file
```

**Error**

ATM, this example will trigger an infinite loop due to this [while cond](url) not supporting `arith.constant`. Once that's fixed, I get this error:

```bash
file.mlir:1 offset :8:8: error: failed to legalize operation 'vector.maskedload' that was explicitly marked illegal
  %1 = vector.maskedload %0[%c0, %c0], %mask, %passthru :
 ^
```

CC @lialan 
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to