RFR(XS): 8211451: ~2.5% regression on compression benchmark starting with 12-b11

Roland Westrelin rwestrel at redhat.com
Wed Nov 7 12:30:56 UTC 2018

Thanks for looking at the new webrev.

> I think code in insert_loop_limit_check() is not matching previous code:
> now:
> +  _igvn.replace_input_of(iff, 1, bol);
> before:
> -    _igvn.replace_input_of(opq, 1, bol);
> -    // Update ctrl.
> -    set_ctrl(opq, check_iff->in(0));
> -    set_ctrl(check_iff->in(1), check_iff->in(0));

It's not matching the previous code indeed.

My understanding is that the previous code preserved the Conv2B/Opaque1
pattern so the predicate is matched by ProjNode::is_uncommon_trap_if_pattern():

  // we need "If(Conv2B(Opaque1(...)))" pattern for reason_predicate
  if (reason != Deoptimization::Reason_none) {
    if (iff->in(1)->Opcode() != Op_Conv2B ||
       iff->in(1)->in(1)->Opcode() != Op_Opaque1) {
      return NULL;

The code that adds the loop limit check now uses
create_new_if_for_predicate(). That code creates a new if and leaves the
one with the Conv2B/Opaque1 added at parse time untouched. So I think
it's fine to not keep the Conv2B/Opaque1 for the actual limit checks and
follow what's done for other predicates.


More information about the hotspot-compiler-dev mailing list