Each of these elementary operations can be assembled to support higher order constructs (Overlapping access, Loop, Aligned Loop).
The patch does not compile yet as it depends on other ones (D100571, D100631) but it allows to get the conversation started.
A self-contained version of this code is available at https://godbolt.org/z/e1x6xdaxM
@avieira the generated code is not that bad but maybe you can come up with a better idea?
The challenge here is to keep the semantic of the 3-way comparison that fits in an int while working on types which diff is larger than int.
Generated code:
intel : https://godbolt.org/z/Khxv6b3r9
arm : https://godbolt.org/z/YTah338hY