https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90608
--- Comment #10 from Mikael Morin <mikael at gcc dot gnu.org> --- (In reply to Mikael Morin from comment #8) > (...) that is it was using too loops in a row in some cases. > ... *two* loops in a row ... (In reply to Tamar Christina from comment #9) > > Thanks Mikael! > > That's already plenty of help! I can try to debug further after I finish my > current patches. Would it be ok if I ask questions when I do? Yes, of course. I forgot to precise that the patch above supports only calls without any optional args. Allowing non-DIM arguments should work, as the code supporting them is already there for the scalar case. For the DIM argument, it's a bit more work. I'm not sure, but maybe the scalarizer support for reductions (SUM or PRODUCT with DIM arg) can be used to support it.