Commit 6fef24a
committed
Skip CopyObject emission when operand and result types differ
When the egraph unifies values of different SPIR-V types (e.g. Vec4
and Vec2 are both Expr), extraction may resolve to an ID with a
different type. Previously a CopyObject was emitted regardless,
causing "operand type not matching result type" validation errors.
Now only emit CopyObject and create an alias when the SPIR-V types
actually match. When they don't, the original instruction is preserved.1 parent eee67f1 commit 6fef24a
1 file changed
Lines changed: 15 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1076 | 1076 | | |
1077 | 1077 | | |
1078 | 1078 | | |
1079 | | - | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
1080 | 1084 | | |
1081 | 1085 | | |
1082 | 1086 | | |
1083 | 1087 | | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
1084 | 1098 | | |
1085 | | - | |
1086 | | - | |
1087 | | - | |
1088 | | - | |
1089 | | - | |
1090 | | - | |
1091 | | - | |
1092 | | - | |
1093 | | - | |
1094 | | - | |
1095 | 1099 | | |
1096 | 1100 | | |
1097 | 1101 | | |
| |||
0 commit comments