[Mesa-dev] [PATCH] R600: Use MULADD_IEEE instruction for mad pattern
Michel Dänzer
michel at daenzer.net
Fri Feb 8 02:54:10 PST 2013
On Don, 2013-02-07 at 20:17 +0100, Vincent Lejeune wrote:
>
> diff --git a/lib/Target/R600/SIInstructions.td b/lib/Target/R600/SIInstructions.td
> index 85bb73a..65788f8 100644
> --- a/lib/Target/R600/SIInstructions.td
> +++ b/lib/Target/R600/SIInstructions.td
> @@ -1360,7 +1360,7 @@ def : Pat <
> /********** VOP3 Patterns **********/
> /********** ================== **********/
>
> -def : Pat <(f32 (IL_mad 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_LEGACY_F32 AllReg_32:$src0, VReg_32:$src1, VReg_32:$src2,
> 0, 0, 0, 0)>;
This breaks 36 piglit tests with radeonsi, just like my patch
http://lists.freedesktop.org/archives/mesa-dev/2013-January/033066.html
did. The only difference in the generated code is that your patch uses
V_MAD_LEGACY_F32 (which I don't think makes sense for (fadd (fmul)))
while mine used V_MAD_F32. Same problem using V_FMA_F32 as well. Still
not sure why it breaks. :(
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Debian, X and DRI developer
More information about the mesa-dev
mailing list