[Mesa-dev] [PATCH] R600/SI: Use MULADD_IEEE/V_MAD_F32 instruction for mad pattern

Michel Dänzer michel at daenzer.net
Mon Feb 11 07:18:09 PST 2013


On Mon, 2013-02-11 at 16:12 +0100, Tom Stellard wrote: 
> On Mon, Feb 11, 2013 at 03:35:44PM +0100, Michel Dänzer wrote:
> > On Son, 2013-02-10 at 19:38 +0100, Vincent Lejeune wrote:
> > > 
> > > diff --git a/lib/Target/R600/SIInstructions.td b/lib/Target/R600/SIInstructions.td
> > > index a09f243..7e50e86 100644
> > > --- a/lib/Target/R600/SIInstructions.td
> > > +++ b/lib/Target/R600/SIInstructions.td
> > > @@ -1423,8 +1423,8 @@ def : Pat <
> > >  /**********   VOP3 Patterns    **********/
> > >  /********** ================== **********/
> > >  
> > > -def : Pat <(f32 (IL_mad AllReg_32:$src0, VReg_32:$src1, VReg_32:$src2)),
> > > -           (V_MAD_LEGACY_F32 AllReg_32:$src0, VReg_32:$src1, VReg_32:$src2,
> > > +def : Pat <(f32 (fadd (fmul AllReg_32:$src0, VReg_32:$src1), VReg_32:$src2)),
> > > +           (V_MAD_F32 AllReg_32:$src0, VReg_32:$src1, VReg_32:$src2,
> > >              0, 0, 0, 0)>;
> > 
> > I still feel a bit uneasy about applying the SI changes without fully
> > understanding why they break those piglit tests. Though I guess it might
> > be okay if you're not targetting this for the Mesa stable branch...
> > Tom / Christian, what's your opinion on this? 
> > 
> 
> I think this should go to the stable branch, because V_MAD_LEGACY is the wrong
> instruction to use in the case, [...]

It might not be wrong for IL_mad.


-- 
Earthling Michel Dänzer           |                   http://www.amd.com
Libre software enthusiast         |          Debian, X and DRI developer




More information about the llvm-commits mailing list