OpenJDK / jdk / jdk
changeset 56437:0df9370fee29
8230062: assert(i == p->size()-1) failed: must be last element of the pack
Summary: Avoids vectorization of reduction chain in which an intermediate result is used.
Reviewed-by: roland, thartmann
author | chagedorn |
---|---|
date | Mon, 30 Sep 2019 09:29:10 +0200 |
parents | 4107e5a422b6 |
children | b1c3d24553e0 |
files | src/hotspot/share/opto/superword.cpp |
diffstat | 1 files changed, 3 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/hotspot/share/opto/superword.cpp Sat Sep 28 17:52:07 2019 -0400 +++ b/src/hotspot/share/opto/superword.cpp Mon Sep 30 09:29:10 2019 +0200 @@ -2045,12 +2045,11 @@ for (uint k = 0; k < use->req(); k++) { Node* n = use->in(k); if (def == n) { - // reductions should only have a Phi use at the the loop - // head and out of loop uses + // Reductions should only have a Phi use at the loop head or a non-phi use + // outside of the loop if it is the last element of the pack (e.g. SafePoint). if (def->is_reduction() && ((use->is_Phi() && use->in(0) == _lpt->_head) || - !_lpt->is_member(_phase->get_loop(_phase->ctrl_or_self(use))))) { - assert(i == p->size()-1, "must be last element of the pack"); + (!_lpt->is_member(_phase->get_loop(_phase->ctrl_or_self(use))) && i == p->size()-1))) { continue; } if (!is_vector_use(use, k)) {