[Mesa-dev] [PATCH] AMDGPU: Match fdiv for SI.

Tom Stellard tom at stellard.net
Thu Dec 6 06:49:34 PST 2012


On Thu, Dec 06, 2012 at 11:02:35AM +0100, Michel Dänzer wrote:
> From: Michel Dänzer <michel.daenzer at amd.com>
> 
> Fixes hundreds of radeonsi piglit regressions from commit
> 62c8e1ec4a93b28c55c1c7accb6cbd64952e59c2 ('AMDGPU: replace int_AMDGPU_rcp by
> fdiv (1.0, x) in RECIP pattern').
>

Sorry, I missed this.

Reviewed-by: Tom Stellard <thomas.stellard at ams.com>
 
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
> ---
>  lib/Target/AMDGPU/SIInstructions.td |    5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/lib/Target/AMDGPU/SIInstructions.td b/lib/Target/AMDGPU/SIInstructions.td
> index e9bbe23..3564ec3 100644
> --- a/lib/Target/AMDGPU/SIInstructions.td
> +++ b/lib/Target/AMDGPU/SIInstructions.td
> @@ -1264,6 +1264,11 @@ def : Pat <
>    (V_MUL_LEGACY_F32_e32 AllReg_32:$src0, (V_RCP_LEGACY_F32_e32 AllReg_32:$src1))
>  >;
>  
> +def : Pat<
> +  (fdiv AllReg_32:$src0, AllReg_32:$src1),
> +  (V_MUL_F32_e32 AllReg_32:$src0, (V_RCP_F32_e32 AllReg_32:$src1))
> +>;
> +
>  def : Pat <
>    (int_AMDGPU_kilp),
>    (SI_KIL (V_MOV_IMM_I32 0xbf800000))
> -- 
> 1.7.10.4
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list