Commit 8e1c0bc
[vm,compiler] Fix incorrect handling of unwrapped phi in constant propagation
When constant propagation evaluates EqualityCompare or StrictCompare,
it can unwrap phis (if they are redundant wrt current set of reachable
blocks), and calculate value if both lhs and rhs operands are the same.
Previously, phi was marked as unwrapped only if that calculation changes
the constant value of comparison.
This is not correct as calculation based on unwrapped phi
needs to be invalidated anyway if more reachable blocks are discovered
and unwrapped phi becomes non-redundant.
The fix is to mark the unwrapped phis regardless of whether the constant
value of comparison has been changed or not.
TEST=vm/dart/regress_60349_test
Fixes #60349
Change-Id: I01e46d6def67fdc5d4c0bdc3a73aaac94725e221
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/417021
Reviewed-by: Slava Egorov <[email protected]>
Commit-Queue: Alexander Markov <[email protected]>1 parent c0e8f90 commit 8e1c0bc
File tree
2 files changed
+66
-14
lines changed- runtime
- tests/vm/dart
- vm/compiler/backend
2 files changed
+66
-14
lines changed| 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 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
586 | 586 | | |
587 | 587 | | |
588 | 588 | | |
589 | | - | |
590 | | - | |
591 | | - | |
592 | | - | |
593 | | - | |
594 | | - | |
595 | | - | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
596 | 595 | | |
597 | 596 | | |
598 | 597 | | |
| |||
711 | 710 | | |
712 | 711 | | |
713 | 712 | | |
714 | | - | |
715 | | - | |
716 | | - | |
717 | | - | |
718 | | - | |
719 | | - | |
720 | | - | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
721 | 719 | | |
722 | 720 | | |
723 | 721 | | |
| |||
0 commit comments