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: [RFA/ARM 1/3] Add VFP support for VFMA and friends


On 5 July 2012 21:13, Matthew Gretton-Dann <matthew.gretton-dann@arm.com> wrote:
> On 26/06/12 14:44, Richard Earnshaw wrote:
>>
>> On 25/06/12 15:59, Matthew Gretton-Dann wrote:
>>>
>>> All,
>>>
>>> This patch adds support to the ARM backend for generating floating-point
>>> fused multiply-accumulate.
>>>
>>> OK?
>>>
>>> gcc/ChangeLog:
>>>
>>> 2012-06-25  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>
>>>
>>>         * config/arm/iterators.md (SDF): New mode iterator.
>>>         (V_if_elem): Add support for SF and DF modes.
>>>         (V_reg): Likewise.
>>>         (F_w_constraint): New mode iterator attribute.
>>>         (F_r_constraint): Likewise.
>>>         (F_fma_type): Likewise.
>>>         (F_target): Likewise.
>>>         config/arm/vfp.md (fma<mode>4): New pattern.
>>>         (*fmsub<mode>4): Likewise.
>>>         (*fmnsub<mode>4): Likewise.
>>>         (*fmnadd<mode>4): Likewise.
>>>
>>
>> F_target as an attribute name doesn't tell me anything useful.  I
>> suggest F_maybe_not_df.
>>
>>> +  "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_FMA <F_target>"
>>
>>
>> This should be written as
>>
>>     "TARGET_32BIT && TARGET_HARD_FLOAT && TARGET_FMA && <F_maybe_not_df>"
>>
>> Then the attribute should expand
>>
>>    (define_mode_attr F_maybe_not_df [(SF "1") (DF "TARGET_VFP_DOUBLE")])
>>
>> As I style nit, I would also suggest using the iterator name when it
>> appears in the pattern name, even though it is redundant.  This avoids
>> potential ambiguities when there are multiple iterators operating on
>> different expansions.  That is, instead of:
>>
>>   (define_insn "fma<mode>4"
>>
>> use:
>>
>>   (define_insn "fma<SDF:mode>4"
>>
>> OK with those changes.
>>
>> R.
>>
>
> Now checked in with some changes (see attached patch for what was committed)
> - changes approved off list.

Hi Matt.  Your new patterns require TARGET_HARD_FLOAT but the
testsuite doesn't giving failures when building for soft float[1] or
softfp[2].  Which should it be?

-- Michael

[1] http://builds.linaro.org/toolchain/gcc-4.8~svn189401/logs/armv7l-natty-cbuild344-tcpanda06-armv5r2/gcc-testsuite.txt
[2] http://builds.linaro.org/toolchain/gcc-4.8~svn189401/logs/armv7l-natty-cbuild344-tcpanda02-cortexa9r1/gcc-testsuite.txt


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