Commit 4647502
committed
SDSL: handle OpBitcast in OpSpecConstantOp constant folding
TryGetConstantValue switch fell through to NotImplementedException
when a SpecConstant chain reinterpret-cast bits between scalar types
(e.g. int↔uint, float↔int via asfloat/asuint pattern in a constant
context). Reinterpret via BitConverter on the underlying 32-bit pattern
and dispatch on the result type's scalar.1 parent 15df70b commit 4647502
1 file changed
Lines changed: 21 additions & 0 deletions
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
107 | 128 | | |
108 | 129 | | |
109 | 130 | | |
| |||
0 commit comments