-
Bug
-
Resolution: Fixed
-
P2
-
18, 19, 20
-
b29
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8289404 | 20 | Christian Hagedorn | P2 | Resolved | Fixed | b04 |
JDK-8291343 | 19.0.2 | Christian Hagedorn | P2 | Resolved | Fixed | b01 |
JDK-8291158 | 19.0.1 | Christian Hagedorn | P2 | Resolved | Fixed | b04 |
This optimization works fine but causes problems in CCP. After calling Value() for a node in CCP, we only add the direct users of it back to the worklist if the type changed. We special case some nodes where we need to add additional nodes back to the worklist to not miss updating them. We should also explicitly add AndI/AndL users of an LShift node that is being put on the worklist. In rare cases, we could wrongly replace and AndI/AndL node by zero in CCP because we miss another Value() call. This can lead to a wrong execution which was found by the attached reduced fuzzer test:
$ java -Xint Test.java > int
$ java -Xbatch Test.java > c2
$ diff int c2
1c1
< result: 35072
---
> result: 0
We could think about adding a new verification phase to CCP to call Value() for each node one more time after we've reached a fixed point. Finding another type change could indicate a bug. This, however, should be investigated separately.
- backported by
-
JDK-8289404 C2: And node gets wrong type due to not adding it back to the worklist in CCP
- Resolved
-
JDK-8291158 C2: And node gets wrong type due to not adding it back to the worklist in CCP
- Resolved
-
JDK-8291343 C2: And node gets wrong type due to not adding it back to the worklist in CCP
- Resolved
- blocks
-
JDK-8289051 C2: Cleanup PhaseCCP::analyze()
- Resolved
- relates to
-
JDK-8257197 Add additional verification code to PhaseCCP
- Resolved
-
JDK-8277850 C2: optimize mask checks in counted loops
- Resolved
(1 relates to, 2 links to)