> Interesting - this is bleh | bswap (..), right, so having > bla1 | (bleh | bla2) fails to recognize bla1 | bla2 as bswap.
Yes, exactly. > I'd expect this kind of pattern to fail bswap detection easily > if you mangle it a bit. So possibly bswap detection should learn > to better pick the "pieces" from a chain of IORs ... Yeah, it also appeared brittle to me. But I could understand that we want a pass that sorts by rank before such an optimization to make life easier. > Consider bswap (..) | bswap (..) badly interwinded for example. > > > Or did I miss the point? > > No, but as we can see it's a "trade-off" ... As always :) So a way forward with this would be to not do the swap before vectorization and enhance bswap so we won't regress for those two cases? Luckily I didn't notice other things relying on rank-order. -- Regards Robin