Commit 3eebd3f
committed
[mlir][tosa] Interpret boolean values correctly in cast folder
Previously the cast folder would sign extend boolean values, leading
"true" to be casted to a value of -1 instead of 1. This change
ensures i1 values are zero extended, since i1 is used as a boolean
value in TOSA. According to the TOSA spec, the result of a boolean
cast with value "true" to another integer type should result in "1".
Fixes #57951
Change-Id: I21486cae0b8ad1cf7901e7b3eb92c1ad56c3797c1 parent b9b2661 commit 3eebd3f
File tree
2 files changed
+15
-2
lines changed- mlir
- lib/Dialect/Tosa/IR
- test/Dialect/Tosa
2 files changed
+15
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1301 | 1301 | | |
1302 | 1302 | | |
1303 | 1303 | | |
1304 | | - | |
| 1304 | + | |
| 1305 | + | |
1305 | 1306 | | |
1306 | 1307 | | |
1307 | 1308 | | |
1308 | 1309 | | |
1309 | 1310 | | |
1310 | 1311 | | |
1311 | 1312 | | |
1312 | | - | |
| 1313 | + | |
| 1314 | + | |
1313 | 1315 | | |
1314 | 1316 | | |
1315 | 1317 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1338 | 1338 | | |
1339 | 1339 | | |
1340 | 1340 | | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
0 commit comments