diff options
| author | Ian Li <ianayl.work@gmail.com> | 2025-09-03 12:48:53 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-03 12:48:53 -0400 |
| commit | c5a141bb8b5dfc4be06bb165d88e724e66bf5c4c (patch) | |
| tree | 718cdcacec41908216ea0d93be5cac6c5c655ac4 /lldb/test/API/python_api/sbstructureddata/TestStructuredDataAPI.py | |
| parent | 303bea8e6350bb2ff0c29d4aaf9621569918d836 (diff) | |
[mlir][spirv] Add pattern matching for arith.index_cast index to i1 for ArithToSPIRV (#156031)
Currently, `arith.index_cast` gets converted to `OpSConvert`:
https://github.com/llvm/llvm-project/blob/9bf5bf3baf3c7aec82cdd235c6a2fd57b4dd55ab/mlir/lib/Conversion/ArithToSPIRV/ArithToSPIRV.cpp#L1331
[OpSConvert requires its operands to be of integer
type](https://registry.khronos.org/SPIR-V/specs/unified1/SPIRV.html#OpSConvert),
which poses an issue for `i1` since SPIRV distinguishes between booleans
and integers. As a result, the following example doesn't get converted,
leaving behind illegal ops:
```
%0 = arith.index_cast %arg0 : index to i1
```
This PR adds additional logic to convert `arith.index_casts` to SPIRV
dialect when casting from `index` to `i1`. Converting `index_cast`s from
`i1` to `index` is submitted as
https://github.com/llvm/llvm-project/pull/155729.
---------
Co-authored-by: Md Abdullah Shahneous Bari <98356296+mshahneo@users.noreply.github.com>
Co-authored-by: Jakub Kuderski <kubakuderski@gmail.com>
Diffstat (limited to 'lldb/test/API/python_api/sbstructureddata/TestStructuredDataAPI.py')
0 files changed, 0 insertions, 0 deletions
