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

Tom Stellard tom at stellard.net
Mon Feb 11 07:12:13 PST 2013


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, but let's hold off on committing this until we
see if Christian's patches will fix the problems this patch uncovers.

-Tom

> 
> -- 
> Earthling Michel Dänzer           |                   http://www.amd.com
> Libre software enthusiast         |          Debian, X and DRI developer
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev




More information about the llvm-commits mailing list