Move some comparison simplifications to match.pd
Marc Glisse
marc.glisse@inria.fr
Tue Oct 27 16:47:00 GMT 2015
On Tue, 27 Oct 2015, Kyrill Tkachov wrote:
> So here the types are shorts and unsigned shorts. On aarch64 these are
> HImode values and there's no direct arithmetic operations on them, so
> they have to be extended to SImode and truncated back.
Ah ok, that makes sense. I expect it is in the case where @0 is shorter
than a word and @2 is longer than @0. I wouldn't expect the signedness to
matter that much, but maybe one of sign/zero-extension simplifies better
than the other.
This problem would happen because we are still missing a pass that handles
type promotion.
It means we could consider gating the transformation by the existence of
lt in the mode of @0, but I don't see any query of optabs in match.pd
yet...
Still, a testcase would be necessary to go with whatever patch, and I may
be completely on the wrong track.
--
Marc Glisse
More information about the Gcc-patches
mailing list