Commit 3d7e89c
authored
Remove the "anything + null => null" optimization (#61518)
This optimization is only legal if:
1) "Anything" is a sufficiently small constant itself.
2) We are in a context where we know the address will in
fact be used for an indirection.
It is the second point that is problematic - one would
like to use MorphAddrContext, but it is not suitable
for this purpose, as an unknown context is counted as
an indirecting one. Additionally, the value of this
optimization is rather low. I am guessing it was meant
to support the legacy nullchecks, before GT_NULLCHECK
was introduced, and had higher impact then.
So, just remove the optimization and leave the 5 small
regressions across all of SPMI be.1 parent 4cf86c2 commit 3d7e89c
File tree
3 files changed
+33
-18
lines changed- src
- coreclr/jit
- tests/JIT/Regression/JitBlue/Runtime_61510
3 files changed
+33
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12401 | 12401 | | |
12402 | 12402 | | |
12403 | 12403 | | |
12404 | | - | |
12405 | | - | |
12406 | 12404 | | |
12407 | | - | |
12408 | 12405 | | |
12409 | 12406 | | |
12410 | | - | |
12411 | | - | |
12412 | | - | |
12413 | | - | |
12414 | | - | |
12415 | | - | |
12416 | | - | |
12417 | | - | |
12418 | | - | |
12419 | | - | |
12420 | | - | |
12421 | | - | |
12422 | | - | |
12423 | | - | |
12424 | | - | |
12425 | 12407 | | |
12426 | 12408 | | |
12427 | 12409 | | |
| |||
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
0 commit comments