This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH,i386] fma,fma4 and xop flags
On Thu, Aug 16, 2012 at 1:43 PM, Gopalasubramanian, Ganesh
<Ganesh.Gopalasubramanian@amd.com> wrote:
>> This won't work, since we have to prefer FMA3 also in case when only "-mfma -mfma4" without -mtune=XX is used.
>> We can add TARGET_FMA_BOTH though, but I doubt there will ever be target that implements both insn sets without preferences.
>
> Preferring FMA3 over FMA4 might not do good always. For instance, with increased register pressure FMA3 can be used.
> But, when we have more registers at our disposal, fma4 if used might do good by avoiding extra reload.
> IMO, when preference of FMA instructions is adjudged by register pressure, we may need some functionality to support that.
>
> So, ideally for bdver2, we like to have both fma and fma4 getting generated with options "-mfma -mfma4".
Yes, now it can also work that way. Current insn generation can be
trivially changed now, just change "fma4" condition for "enabled"
attribute in i386.md.
I will wait for your recommendation.
Uros.
- References:
- [PATCH,i386] fma,fma4 and xop flags
- From: Ganesh.Gopalasubramanian
- Re: [PATCH,i386] fma,fma4 and xop flags
- RE: [PATCH,i386] fma,fma4 and xop flags
- From: Gopalasubramanian, Ganesh
- Re: [PATCH,i386] fma,fma4 and xop flags
- Re: [PATCH,i386] fma,fma4 and xop flags
- Re: [PATCH,i386] fma,fma4 and xop flags
- Re: [PATCH,i386] fma,fma4 and xop flags
- Re: [PATCH,i386] fma,fma4 and xop flags
- Re: [PATCH,i386] fma,fma4 and xop flags
- Re: [PATCH,i386] fma,fma4 and xop flags
- RE: [PATCH,i386] fma,fma4 and xop flags
- From: Gopalasubramanian, Ganesh