https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90913
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> --- The ICE is because .MASK_LOAD/.MASK_STORE calls are supported just for vectors. The way it is done is that during ifcvt those internal calls are added to the .LOOP_VECTORIZED guarded loops, and either we successfully vectorize those, then the .MASK_LOAD/.MASK_STORE ifn calls are replaced with their vectorized versions and all the checking is performed, or we should DCE that loop. The r272239 change which I haven't really understood breaks this on this testcase, we end up with _116 = .LOOP_VECTORIZED (1, 4); if (_116 != 0) goto <bb 25>; [100.00%] else goto <bb 26>; [100.00%] that guards these scalar .MASK_STORE calls being replaced with _116 = 0; if (_190 != 0) goto <bb 25>; [100.00%] else goto <bb 26>; [100.00%] that is just wrong, we can't and shouldn't reuse the for vectorization only loop if we don't vectorize it. Both because of these .MASK* calls, but also because e.g. there are COND_EXPRs all around in that which often isn't beneficial in scalar loops, etc.