[12] RFR(M): 8210215: C2 should optimize trichotomy calculations

Tobias Hartmann tobias.hartmann at oracle.com
Tue Oct 9 17:29:52 UTC 2018


Hi,

I had an off thread discussion with John and he suggested the following changes in addition:
- Use randomization for integer values in the test
- Add some asserts and comments to improve readability
- Don't apply optimization to floating point compares because they don't obey trichotomy laws (for
example, NaN always compares to false)
- Handle the case where the merge result is BoolTest::illegal (just for robustness, I haven't seen
this ever during testing but it might show up when overflow tests mix with "normal" other tests)
- While testing, I found that we also have to add a call to add_users_to_worklist(iff1) to make sure
that the dead if is removed (otherwise we hit failures like JDK-8075922).

Incremental webrev:
http://cr.openjdk.java.net/~thartmann/8210215/webrev.04_inc/

Full webrev:
http://cr.openjdk.java.net/~thartmann/8210215/webrev.04/

Best regards,
Tobias


More information about the hotspot-compiler-dev mailing list