[llvm-commits] Please review: FMA3 instructions set

Demikhovsky, Elena elena.demikhovsky at intel.com
Mon May 28 05:18:20 PDT 2012


I don't know how to implement it. 
(Matching llvm.fma.f32/64 intrinsics to the new instructions)

 I tried to add to X86InstrFMA.td file, but it does not change anything
def : Pat<(f32 (int_fma_f32 FR32:$src1, FR32:$src2, FR32:$src3)),
            (VFMADDSSr213r FR32:$src1, FR32:$src2, FR32:$src3)>;

def : Pat<(f64 (int_fma_f64 FR64:$src1, FR64:$src2, FR64:$src3)),
            (VFMADDSDr213r FR64:$src1, FR64:$src2, FR64:$src3)>;

Can somebody help me?

Thanks

- Elena

-----Original Message-----
From: Peter Cooper [mailto:peter_cooper at apple.com] 
Sent: Wednesday, May 23, 2012 20:35
To: Demikhovsky, Elena
Cc: llvm-commits at cs.uiuc.edu; Ouriel, Boaz
Subject: Re: [llvm-commits] Please review: FMA3 instructions set

Ooops, sorry, i'm getting my scalar and vector intrinsics mixed up.

As we do all x86 FP arithmetic in the SIMD unit it would be a nice optimization to also match these llvm.fma.f32/64 intrinsics to the new instructions, but please disregard the comment about possibly removing the intrinsics you already support.

Thanks,
Pete
On May 23, 2012, at 7:30 AM, "Demikhovsky, Elena" <elena.demikhovsky at intel.com> wrote:

> I did not update llvm.fma.f32/64. Should it be directly mapped to a scalar instruction, like int_x86_fma4_vfmadd_ss int_x86_fma4_vfmadd_sd ?
> 
> 
> - Elena
> 
> -----Original Message-----
> From: Peter Cooper [mailto:peter_cooper at apple.com]
> Sent: Wednesday, May 23, 2012 01:00
> To: Demikhovsky, Elena
> Cc: llvm-commits at cs.uiuc.edu
> Subject: Re: [llvm-commits] Please review: FMA3 instructions set
> 
> Hi Elena
> 
> I notice you make use of the x86 fma intrinsic.  Can you also please make sure your code works with the llvm.fma.f32 and llvm.fma.f64 intrinsics.  An example for these is already in X86/fma.ll.
> 
> Note we may also want to remove some of the intrinsics you have if they are identical behaviorally to llvm.fma.f32/64.
> 
> Thanks,
> Pete
> On May 22, 2012, at 4:51 AM, "Demikhovsky, Elena" <elena.demikhovsky at intel.com> wrote:
> 
>> <fma.diff>
> 
> ---------------------------------------------------------------------
> Intel Israel (74) Limited
> 
> This e-mail and any attachments may contain confidential material for 
> the sole use of the intended recipient(s). Any review or distribution 
> by others is strictly prohibited. If you are not the intended 
> recipient, please contact the sender and delete all copies.
> 

---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.





More information about the llvm-commits mailing list