Commit 2dae722
committed
Fix type inference for conversion and vector result types
Add conversion operations (ConvertFToS, ConvertFToU, ConvertSToF,
ConvertUToF) to required_result_type_class so the reconstruction
pass can infer correct result types for conversion instructions.
Preserve vector result types (TypeClass::Other) in infer_result_type
instead of incorrectly replacing them with scalar types. SPIR-V
arithmetic ops work component-wise on vectors, so a vector result
type is valid even when the opcode requires a specific scalar sort.1 parent fcdd2fa commit 2dae722
1 file changed
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2326 | 2326 | | |
2327 | 2327 | | |
2328 | 2328 | | |
2329 | | - | |
| 2329 | + | |
| 2330 | + | |
| 2331 | + | |
| 2332 | + | |
| 2333 | + | |
2330 | 2334 | | |
2331 | 2335 | | |
2332 | 2336 | | |
| |||
2398 | 2402 | | |
2399 | 2403 | | |
2400 | 2404 | | |
| 2405 | + | |
| 2406 | + | |
| 2407 | + | |
| 2408 | + | |
| 2409 | + | |
| 2410 | + | |
| 2411 | + | |
| 2412 | + | |
2401 | 2413 | | |
2402 | 2414 | | |
2403 | 2415 | | |
| |||
0 commit comments