[PATCH 1/1] R600: FMA is VecALU only instruction

Tom Stellard tom at stellard.net
Tue Oct 14 09:48:40 PDT 2014


On Fri, Oct 10, 2014 at 11:36:34AM -0400, Jan Vesely wrote:
> On Fri, 2014-10-10 at 10:50 -0400, Tom Stellard wrote:
> > On Thu, Oct 09, 2014 at 07:59:55PM -0400, Jan Vesely wrote:
> > > Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
> > 
> > This patch looks good to me.  However, according
> > to the docs, FMA only exists on double precision
> > parts.  As a follow on patch it would be nice to
> > make this instruction conditional on FeatureFP64
> > and also mark FMA to exapand for targets that
> > don't support FeatureFP64.
> 
> I only found a note of f32 FMA needing double precision parts in SI
> manual. Is it true for EG too?
> 
> the EG manual only says that double precision is not available on all
> r7xx hw.
> Are there EG+ (pre SI) GPUs that don't have F64 capabilities? since r600

Yes, if you look in Processors.td, all the GPUs that support fp64
are marked with FeatureFP64.

-Tom

> and r700 don't have FMA at all, it would make handling it a bit easier.
> 
> thanks,
> jan
> 
> > 
> > -Tom
> > 
> > > ---
> > > 
> > > Fixes hangs/failures of sin/cos/tan tests on my EG card
> > > 
> > >  lib/Target/R600/R600Instructions.td | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/lib/Target/R600/R600Instructions.td b/lib/Target/R600/R600Instructions.td
> > > index a883c83..114c6e4 100644
> > > --- a/lib/Target/R600/R600Instructions.td
> > > +++ b/lib/Target/R600/R600Instructions.td
> > > @@ -917,7 +917,7 @@ class MULADD_IEEE_Common <bits<5> inst> : R600_3OP <
> > >  
> > >  class FMA_Common <bits<5> inst> : R600_3OP <
> > >    inst, "FMA",
> > > -  [(set f32:$dst, (fma f32:$src0, f32:$src1, f32:$src2))]
> > > +  [(set f32:$dst, (fma f32:$src0, f32:$src1, f32:$src2))], VecALU
> > >  >;
> > >  
> > >  class CNDE_Common <bits<5> inst> : R600_3OP <
> > > -- 
> > > 1.9.3
> > > 
> 
> -- 
> Jan Vesely <jan.vesely at rutgers.edu>





More information about the llvm-commits mailing list