This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] vectorizing conditional expressions (PR tree-optimization/65947)
- From: Ramana Radhakrishnan <ramana dot radhakrishnan at foss dot arm dot com>
- To: Bill Schmidt <wschmidt at linux dot vnet dot ibm dot com>, Richard Sandiford <richard dot sandiford at arm dot com>
- Cc: Ramana Radhakrishnan <ramana dot gcc at googlemail dot com>, Alan Hayward <Alan dot Hayward at arm dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 11 Sep 2015 17:29:29 +0100
- Subject: Re: [PATCH] vectorizing conditional expressions (PR tree-optimization/65947)
- Authentication-results: sourceware.org; auth=none
- References: <D217578B dot 7FE4%alan dot hayward at arm dot com> <1441923254 dot 4772 dot 37 dot camel at oc8801110288 dot ibm dot com> <D2184E16 dot 8003%alan dot hayward at arm dot com> <1441977591 dot 2795 dot 11 dot camel at gnopaine> <CAJA7tRbTHE7Wo2CBKPNC1FG5RigHT5MmBeB1HX_ur-5pKdMqWA at mail dot gmail dot com> <87d1xp2fng dot fsf at e105548-lin dot cambridge dot arm dot com> <1441982930 dot 2795 dot 24 dot camel at gnopaine> <878u8d2cwk dot fsf at e105548-lin dot cambridge dot arm dot com> <1441986448 dot 2795 dot 38 dot camel at gnopaine>
>>> Saying that all reductions have equivalent performance is unlikely to be
>>> true for many platforms. On PowerPC, for example, a PLUS reduction has
>>> very different cost from a MAX reduction. If the model isn't
>>> fine-grained enough, let's please be aggressive about fixing it. I'm
>>> fine if it's a separate patch, but in my mind this shouldn't be allowed
>>> to languish.
>>
>> ...I agree that the general vectoriser cost model could probably be
>> improved, but it seems fairer for that improvement to be done by whoever
>> adds the patterns that need it.
>
> All right. But in response to Ramana's comment, are all relevant
> reductions of similar cost on each ARM platform? Obviously they don't
> have the same cost on different platforms, but the question is whether a
> reduc_plus, reduc_max, etc., has identical cost on each individual
> platform. If not, ARM may have a concern as well. I don't know the
> situation for x86 either.
>From cauldron I have a note that we need to look at the vectorizer cost model
for both the ARM and AArch64 backends and move away from
the set of magic constants that it currently returns.
On AArch32, all the reduc_ patterns are emulated with pair-wise operations
while on AArch64 they aren't. Thus they aren't likely to be the same cost as a
standard vector arithmetic instruction. What difference this makes in practice
remains to be seen, however the first step is moving towards the newer vectorizer
cost model interface.
I'll put this on a list of things for us to look at but I'm not sure who/when
will get around to looking at this.
regards
Ramana