[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 06:35:44 PST 2013


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? 


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




More information about the llvm-commits mailing list