[dragonegg PATCH] Implement support for FMA_EXPR
Peter Collingbourne
peter at pcc.me.uk
Fri Jul 12 17:54:57 PDT 2013
Duncan,
This seems like a bug (or more probably a missed optimisation
opportunity) in GCC. I believe the design is to create FMA_EXPR
nodes only if the target supports FMA instructions. And through the
-mfma4 flag we are telling the compiler that the target supports FMA4.
The FMA instructions seem to be supported in 32-bit mode so unless
I'm missing something GCC should be able to use FMA instructions here.
I'd probably XFAIL this in 32-bit mode.
Peter
On Fri, Jul 12, 2013 at 09:50:31AM +0200, Duncan Sands wrote:
> Hi Peter, the testcase fails on x86-32.
>
> /home/duncan/LLVM/llvm.top/dragonegg/test/validator/c/fma.c:5:11: error:
> expected string not found in input
> // CHECK: call float @llvm.fma.f32
> ^
> <stdin>:8:23: note: scanning from here
> define float @fmaftest(float %a, float %b, float %c) unnamed_addr #0 {
> ^
> <stdin>:25:7: note: possible intended match here
> %3 = call float @fmaf(float %0, float %1, float %2) #1
>
> Is this to be expected?
>
> Ciao, Duncan.
>
> On 27/06/13 18:24, Duncan Sands wrote:
>> Hi Peter, LGTM. Thanks for working on this, Duncan.
>>
>> On 26/06/13 01:34, Peter Collingbourne wrote:
>>> On Tue, Apr 16, 2013 at 01:56:37PM -0700, Peter Collingbourne wrote:
>>>> On Sat, Mar 16, 2013 at 04:18:44PM -0700, Peter Collingbourne wrote:
>>>>> Hi,
>>>>>
>>>>> This patch implements support for FMA_EXPR.
>>>>>
>>>>> OK to commit?
>>>>
>>>> Ping. (I've also updated the patch to work with gcc 4.6.)
>>>
>>> Ping^2.
>>>
>>> Thanks,
>>>
>>
>
>
--
Peter
More information about the llvm-commits
mailing list