diff --git a/src/hotspot/share/opto/phaseX.cpp b/src/hotspot/share/opto/phaseX.cpp index 3d67c80f1bb..dc28ff562a2 100644 --- a/src/hotspot/share/opto/phaseX.cpp +++ b/src/hotspot/share/opto/phaseX.cpp @@ -2878,7 +2878,6 @@ void PhaseCCP::push_more_uses(Unique_Node_List& worklist, Node* parent, const No push_and(worklist, parent, use); push_cast_ii(worklist, parent, use); push_opaque_zero_trip_guard(worklist, use); - push_bool_with_cmpu_and_mask(worklist, use); } @@ -2925,57 +2924,6 @@ void PhaseCCP::push_cmpu(Unique_Node_List& worklist, const Node* use) const { } } -// Look for the following shape, which can be optimized by BoolNode::Value_cmpu_and_mask() (i.e. corresponds to case -// (1b): "(m & x) Opcode(); - if (use_op != Op_AndI && (use_op != Op_AddI || use->in(2)->find_int_con(0) != 1)) { - // Not "m & x" or "m + 1" - return; - } - for (DUIterator_Fast imax, i = use->fast_outs(imax); i < imax; i++) { - Node* cmpu = use->fast_out(i); - if (cmpu->Opcode() == Op_CmpU) { - push_bool_matching_case1b(worklist, cmpu); - } - } -} - -// Push any Bool below 'cmpu' that matches case (1b) of BoolNode::Value_cmpu_and_mask(). -void PhaseCCP::push_bool_matching_case1b(Unique_Node_List& worklist, const Node* cmpu) const { - assert(cmpu->Opcode() == Op_CmpU, "must be"); - for (DUIterator_Fast imax, i = cmpu->fast_outs(imax); i < imax; i++) { - Node* bol = cmpu->fast_out(i); - if (!bol->is_Bool() || bol->as_Bool()->_test._test != BoolTest::lt) { - // Not a Bool with "in(1); - Node* addI = cmpu->in(2); - if (andI->Opcode() != Op_AndI || addI->Opcode() != Op_AddI || addI->in(2)->find_int_con(0) != 1) { - // Not "m & x" and "m + 1" - continue; - } - - Node* m = addI->in(1); - if (m == andI->in(1) || m == andI->in(2)) { - // Is "m" shared? Matched (1b) and thus we revisit Bool. - push_if_not_bottom_type(worklist, bol); - } - } -} - // If n is used in a counted loop exit condition, then the type of the counted loop's Phi depends on the type of 'n'. // Seem PhiNode::Value(). void PhaseCCP::push_counted_loop_phi(Unique_Node_List& worklist, Node* parent, const Node* use) { diff --git a/src/hotspot/share/opto/phaseX.hpp b/src/hotspot/share/opto/phaseX.hpp index aeba5e8662d..648e911e783 100644 --- a/src/hotspot/share/opto/phaseX.hpp +++ b/src/hotspot/share/opto/phaseX.hpp @@ -638,8 +638,6 @@ class PhaseCCP : public PhaseIterGVN { void push_and(Unique_Node_List& worklist, const Node* parent, const Node* use) const; void push_cast_ii(Unique_Node_List& worklist, const Node* parent, const Node* use) const; void push_opaque_zero_trip_guard(Unique_Node_List& worklist, const Node* use) const; - void push_bool_with_cmpu_and_mask(Unique_Node_List& worklist, const Node* use) const; - void push_bool_matching_case1b(Unique_Node_List& worklist, const Node* cmpu) const; public: PhaseCCP( PhaseIterGVN *igvn ); // Compute conditional constants diff --git a/src/hotspot/share/opto/subnode.cpp b/src/hotspot/share/opto/subnode.cpp index 5f1af09463f..c18bbaebcbe 100644 --- a/src/hotspot/share/opto/subnode.cpp +++ b/src/hotspot/share/opto/subnode.cpp @@ -1898,16 +1898,12 @@ const Type* BoolNode::Value_cmpu_and_mask(PhaseValues* phase) const { // Simplify a Bool (convert condition codes to boolean (1 or 0)) node, // based on local information. If the input is constant, do it. const Type* BoolNode::Value(PhaseGVN* phase) const { - const Type* input_type = phase->type(in(1)); - if (input_type == Type::TOP) { - return Type::TOP; - } const Type* t = Value_cmpu_and_mask(phase); if (t != nullptr) { return t; } - return _test.cc2logical(input_type); + return _test.cc2logical( phase->type( in(1) ) ); } #ifndef PRODUCT