提交 e722c719 编写于 作者: S shade

8228405: Incorrect format strings in PhaseIdealLoop::rc_predicate

Reviewed-by: andrew, phh
上级 47ee174a
...@@ -611,7 +611,11 @@ BoolNode* PhaseIdealLoop::rc_predicate(IdealLoopTree *loop, Node* ctrl, ...@@ -611,7 +611,11 @@ BoolNode* PhaseIdealLoop::rc_predicate(IdealLoopTree *loop, Node* ctrl,
const TypeInt* idx_type = TypeInt::INT; const TypeInt* idx_type = TypeInt::INT;
if ((stride > 0) == (scale > 0) == upper) { if ((stride > 0) == (scale > 0) == upper) {
if (TraceLoopPredicate) { 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); predString->print("- %d) ", stride);
} }
// Check if (limit - stride) may overflow // Check if (limit - stride) may overflow
...@@ -639,7 +643,11 @@ BoolNode* PhaseIdealLoop::rc_predicate(IdealLoopTree *loop, Node* ctrl, ...@@ -639,7 +643,11 @@ BoolNode* PhaseIdealLoop::rc_predicate(IdealLoopTree *loop, Node* ctrl,
register_new_node(max_idx_expr, ctrl); register_new_node(max_idx_expr, ctrl);
} else { } else {
if (TraceLoopPredicate) { 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(); idx_type = _igvn.type(init)->isa_int();
max_idx_expr = init; max_idx_expr = init;
...@@ -675,7 +683,11 @@ BoolNode* PhaseIdealLoop::rc_predicate(IdealLoopTree *loop, Node* ctrl, ...@@ -675,7 +683,11 @@ BoolNode* PhaseIdealLoop::rc_predicate(IdealLoopTree *loop, Node* ctrl,
if (offset && (!offset->is_Con() || con_offset != 0)){ if (offset && (!offset->is_Con() || con_offset != 0)){
if (TraceLoopPredicate) { 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 // Check if (max_idx_expr + offset) may overflow
const TypeInt* offset_type = _igvn.type(offset)->isa_int(); const TypeInt* offset_type = _igvn.type(offset)->isa_int();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册