RFR: 8238812: assert(false) failed: bad AD file [v2]
Rahul Raghavan
rraghavan at openjdk.java.net
Tue Mar 9 06:37:11 UTC 2021
On Fri, 5 Mar 2021 14:35:12 GMT, Roland Westrelin <roland at openjdk.org> wrote:
>> Changes requested by roland (Reviewer).
>
> This fixes the bug when the tests that need to be optimized out are next to one an another and the logic for folding comparisons can be used. It's hard to be certain that it's not possible for the 2 tests be separated by some other control flow. In that case the fix would fail.
>
> A conservative fix would be to not use a narrow type in the CastII that tableswitch/lookupswitch switch introduces. It would be a simpler fix and a more robust one.
Thank you @rwestrel for the comments.
Understood your point.
Based on the review comments now planning to -
i. Do proposal by Roland and remove the narrow type from the CastII as fix for this bug task.
As of now found no issues with reported java_fuzzer cases / unit tests, mach5 tier 1-7 & pre-integration tests
for the following changes to avoid use any narrow type in the `CastII` introduced by `lookupswitch`.
[src/hotspot/share/opto/parse2.cpp]
- const TypeInt* ikeytype = TypeInt::make(0, num_cases, Type::WidenMin);
............
- key_val = C->conv_I2X_index(&_gvn, key_val, ikeytype, control());
..............
+#ifdef _LP64
+ key_val = C->constrained_convI2L(&_gvn, key_val, TypeInt::INT, control());
+#endif
ii. Integrate the other proposed fix to improve `fold_compares` optimizations as a separate enhancement.
(after addressing the comments in `filtered_int_type()`)
-------------
PR: https://git.openjdk.java.net/jdk/pull/2758
More information about the hotspot-compiler-dev
mailing list