https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77503
--- Comment #13 from amker at gcc dot gnu.org --- (In reply to amker from comment #12) > ICE is because prologue peeling changes code (to be specific, the initial > argument of reduction phi node in loop header), as a result, the statement > to be vectorized is not the statement that was previously analyzed. > One possible fix is be conservative and fall back to generic conditional > reduction if loop needs to be peeled for prologue. Another (better) fix is > we don't update/inherit reduction value from prologue loop for vectorized > loop, and after vectorized loop, we combine the result manually. Code would Actually, existing code handles peeling for prologue loop well, I only need to get the initial constant value from prologue loop.