File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -2045,12 +2045,11 @@ bool SuperWord::profitable(Node_List* p) {
2045
2045
for (uint k = 0 ; k < use->req (); k++) {
2046
2046
Node* n = use->in (k);
2047
2047
if (def == n) {
2048
- // reductions should only have a Phi use at the the loop
2049
- // head and out of loop uses
2048
+ // Reductions should only have a Phi use at the loop head or a non-phi use
2049
+ // outside of the loop if it is the last element of the pack (e.g. SafePoint).
2050
2050
if (def->is_reduction () &&
2051
2051
((use->is_Phi () && use->in (0 ) == _lpt->_head ) ||
2052
- !_lpt->is_member (_phase->get_loop (_phase->ctrl_or_self (use))))) {
2053
- assert (i == p->size ()-1 , " must be last element of the pack" );
2052
+ (!_lpt->is_member (_phase->get_loop (_phase->ctrl_or_self (use))) && i == p->size ()-1 ))) {
2054
2053
continue ;
2055
2054
}
2056
2055
if (!is_vector_use (use, k)) {
You can’t perform that action at this time.
0 commit comments