[jdk19] Integrated: 8289127: Apache Lucene triggers: DEBUG MESSAGE: duplicated predicate failed which is impossible
Roland Westrelin
roland at openjdk.org
Mon Jul 18 07:12:19 UTC 2022
On Fri, 15 Jul 2022 12:30:56 GMT, Roland Westrelin <roland at openjdk.org> wrote:
> Loop predication adds a skeleton predicate for a range check that computes:
>
> (AddL (ConvI2L (MulI (CastII (AddI (OpaqueLoopInit 0) (SubI (OpaqueLoopStride ..) 1))) 7)) ..)
>
> later transformed into:
>
> (AddL (SubL (ConvI2L (LShiftI (CastII (AddI (OpaqueLoopInit 0) (OpaqueLoopStride ..))) 3)) (AddL (ConvI2L (CastII (AddI (OpaqueLoopInit 0) (OpaqueLoopStride ..)))) -1)) ..)
>
> When pre/main/post loops are added, this expression is copied (above
> the main loop) and updated. The logic performing the copy relies on
> skeleton_follow_inputs() to find the OpaqueLoopInit nodes and clone it
> with an updated initial value. Note there are 2 OpaqueLoopInit nodes
> to update in the transformed expression. But because
> skeleton_follow_inputs() doesn't include LShiftI only one of the
> OpaqueLoopInit node is cloned with an updated initial value.
>
> After loop opts are over, the OpaqueLoopInit nodes are replaced by
> their input which result in this particular case in a predicate that
> always fails.
>
> The fix is to fix skeleton_follow_inputs() to include LShiftI. I also
> added verification code to catch similar issues in the future.
This pull request has now been integrated.
Changeset: 4f3f74c1
Author: Roland Westrelin <roland at openjdk.org>
URL: https://git.openjdk.org/jdk19/commit/4f3f74c14121d0a80f0dcf1d593b4cf1c3e4a64c
Stats: 86 lines in 2 files changed: 83 ins; 0 del; 3 mod
8289127: Apache Lucene triggers: DEBUG MESSAGE: duplicated predicate failed which is impossible
Reviewed-by: kvn, dlong
-------------
PR: https://git.openjdk.org/jdk19/pull/143
More information about the hotspot-compiler-dev
mailing list