8298520: C2: assert(found_opaque == res) failed: wrong pattern
Reviewed-by: thartmann, chagedorn
This commit is contained in:
parent
51f0a1ce4b
commit
27d4971182
src/hotspot/share/opto
@ -2547,7 +2547,8 @@ SafePointNode* CountedLoopNode::outer_safepoint() const {
|
||||
|
||||
Node* CountedLoopNode::skip_predicates_from_entry(Node* ctrl) {
|
||||
while (ctrl != NULL && ctrl->is_Proj() && ctrl->in(0) != NULL && ctrl->in(0)->is_If() &&
|
||||
(ctrl->in(0)->as_If()->proj_out_or_null(1-ctrl->as_Proj()->_con) == NULL ||
|
||||
!is_zero_trip_guard_if(ctrl->in(0)->as_If()) &&
|
||||
(ctrl->in(0)->as_If()->proj_out_or_null(1-ctrl->as_Proj()->_con) == NULL ||
|
||||
(ctrl->in(0)->as_If()->proj_out(1-ctrl->as_Proj()->_con)->outcnt() == 1 &&
|
||||
ctrl->in(0)->as_If()->proj_out(1-ctrl->as_Proj()->_con)->unique_out()->Opcode() == Op_Halt))) {
|
||||
ctrl = ctrl->in(0)->in(0);
|
||||
@ -2556,6 +2557,22 @@ Node* CountedLoopNode::skip_predicates_from_entry(Node* ctrl) {
|
||||
return ctrl;
|
||||
}
|
||||
|
||||
bool CountedLoopNode::is_zero_trip_guard_if(const IfNode* iff) {
|
||||
if (iff->in(1) == NULL || !iff->in(1)->is_Bool()) {
|
||||
return false;
|
||||
}
|
||||
if (iff->in(1)->in(1) == NULL || iff->in(1)->in(1)->Opcode() != Op_CmpI) {
|
||||
return false;
|
||||
}
|
||||
if (iff->in(1)->in(1)->in(1) != NULL && iff->in(1)->in(1)->in(1)->Opcode() == Op_OpaqueZeroTripGuard) {
|
||||
return true;
|
||||
}
|
||||
if (iff->in(1)->in(1)->in(2) != NULL && iff->in(1)->in(1)->in(2)->Opcode() == Op_OpaqueZeroTripGuard) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Node* CountedLoopNode::skip_predicates() {
|
||||
Node* ctrl = in(LoopNode::EntryControl);
|
||||
if (is_main_loop()) {
|
||||
@ -5459,7 +5476,7 @@ Node* CountedLoopNode::is_canonical_loop_entry() {
|
||||
return NULL;
|
||||
}
|
||||
Node* iffm = ctrl->in(0);
|
||||
if (iffm == NULL || !iffm->is_If()) {
|
||||
if (iffm == NULL || iffm->Opcode() != Op_If) {
|
||||
return NULL;
|
||||
}
|
||||
Node* bolzm = iffm->in(1);
|
||||
|
@ -355,6 +355,8 @@ public:
|
||||
#ifndef PRODUCT
|
||||
virtual void dump_spec(outputStream *st) const;
|
||||
#endif
|
||||
|
||||
static bool is_zero_trip_guard_if(const IfNode* iff);
|
||||
};
|
||||
|
||||
class LongCountedLoopNode : public BaseCountedLoopNode {
|
||||
|
Loading…
x
Reference in New Issue
Block a user