This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Move some comparison simplifications to match.pd


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]