This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Move some comparison simplifications to match.pd
- From: Marc Glisse <marc dot glisse at inria dot fr>
- To: Kyrill Tkachov <kyrylo dot tkachov at arm dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 27 Oct 2015 17:29:58 +0100 (CET)
- Subject: Re: Move some comparison simplifications to match.pd
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot DEB dot 2 dot 02 dot 1508300944340 dot 4656 at laptop-mg dot saclay dot inria dot fr> <562F9955 dot 1030104 at arm dot com> <alpine dot DEB dot 2 dot 20 dot 1510271640371 dot 2174 at laptop-mg dot saclay dot inria dot fr> <562FA1E3 dot 7070000 at arm dot com>
- Reply-to: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
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