Commit 58ecafb
authored
JIT: Fix assertion failed 'genActualType(cmp->gtGetOp1()) == genActualType(cmp->gtGetOp2())' (#128959)
Fix #128947
This assert is not a function specific assumption, rather a general IR
validation - to my understanding.
The function uses the `supportedOp` lambda to actually cull out
unsupported/uninteresting comparisons.
So it should be fine to change it.
The existing assert fired when seeing EQ(byref, long), for example:
```lua
* NE int
+--* LCL_VAR byref V01 arg1
\--* CAST long <- ulong <- uint
\--* CNS_INT int 0
```
Because it only considers `genActualType(cmp->gtGetOp1()) ==
genActualType(cmp->gtGetOp2())` legal.
I don't really know what we consider legal IR and there is no
centralized place so as a fix I copied this existing assert from
importer:
https://github.com/dotnet/runtime/blob/b0f76ec847aa48839262c4726554ea9e0f3bc4e6/src/coreclr/jit/importer.cpp#L7937-L79381 parent abb5453 commit 58ecafb
1 file changed
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10957 | 10957 | | |
10958 | 10958 | | |
10959 | 10959 | | |
10960 | | - | |
10961 | | - | |
10962 | | - | |
10963 | | - | |
10964 | 10960 | | |
10965 | 10961 | | |
10966 | 10962 | | |
| 10963 | + | |
| 10964 | + | |
| 10965 | + | |
| 10966 | + | |
| 10967 | + | |
10967 | 10968 | | |
10968 | 10969 | | |
10969 | 10970 | | |
| |||
0 commit comments