GCC cannot vectorise because the loop terminates early in case of a non-sorted pair. It thereby contains control flow.
I guess that's kind of logical.
Even if the compiler recognised the early termination of the loop as the optimisation it is, it would still have to make the decision to give up on it in favour of vectorisation (?)
GCC cannot vectorise because the loop terminates early in case of a non-sorted pair. It thereby contains control flow.
I guess that's kind of logical. Even if the compiler recognised the early termination of the loop as the optimisation it is, it would still have to make the decision to give up on it in favour of vectorisation (?)