# HG changeset patch # User shade # Date 1563997416 -7200 # Node ID b893d11d147f04296089c64e9b50ac2b2fd4789b # Parent 78c11f573795375e395af64fba3e051d7d5381ab 8228405: Incorrect format strings in PhaseIdealLoop::rc_predicate Reviewed-by: andrew, phh diff -r 78c11f573795 -r b893d11d147f src/share/vm/opto/loopPredicate.cpp --- a/src/share/vm/opto/loopPredicate.cpp Mon Aug 07 12:19:17 2017 +0200 +++ b/src/share/vm/opto/loopPredicate.cpp Wed Jul 24 21:43:36 2019 +0200 @@ -611,7 +611,11 @@ const TypeInt* idx_type = TypeInt::INT; if ((stride > 0) == (scale > 0) == upper) { if (TraceLoopPredicate) { - predString->print(limit->is_Con() ? "(%d " : "(limit ", con_limit); + if (limit->is_Con()) { + predString->print("(%d ", con_limit); + } else { + predString->print("(limit "); + } predString->print("- %d) ", stride); } // Check if (limit - stride) may overflow @@ -639,7 +643,11 @@ register_new_node(max_idx_expr, ctrl); } else { if (TraceLoopPredicate) { - predString->print(init->is_Con() ? "%d " : "init ", con_init); + if (init->is_Con()) { + predString->print("%d ", con_init); + } else { + predString->print("init "); + } } idx_type = _igvn.type(init)->isa_int(); max_idx_expr = init; @@ -675,7 +683,11 @@ if (offset && (!offset->is_Con() || con_offset != 0)){ if (TraceLoopPredicate) { - predString->print(offset->is_Con() ? "+ %d " : "+ offset", con_offset); + if (offset->is_Con()) { + predString->print("+ %d ", con_offset); + } else { + predString->print("+ offset"); + } } // Check if (max_idx_expr + offset) may overflow const TypeInt* offset_type = _igvn.type(offset)->isa_int();