[Mesa-dev] [PATCH] R600/SI: Add patterns for fcos and fsin.

Tom Stellard tom at stellard.net
Tue Jan 22 11:20:23 PST 2013


On Tue, Jan 22, 2013 at 08:14:42PM +0100, Michel Dänzer wrote:
> From: Michel Dänzer <michel.daenzer at amd.com>
> 
> Fixes 37 piglit tests and allows e.g. FlightGear to run with radeonsi.
>

Nice!
 
Reviewed-by: Tom Stellard <thomas.stellard at amd.com>

> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
> ---
>  lib/Target/R600/SIInstructions.td |   10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/lib/Target/R600/SIInstructions.td b/lib/Target/R600/SIInstructions.td
> index 4164c55..85bb73a 100644
> --- a/lib/Target/R600/SIInstructions.td
> +++ b/lib/Target/R600/SIInstructions.td
> @@ -1326,6 +1326,16 @@ def : Pat<
>  >;
>  
>  def : Pat <
> +  (fcos AllReg_32:$src0),
> +  (V_COS_F32_e32 (V_MUL_F32_e32 AllReg_32:$src0, (V_MOV_IMM_I32 CONST.TWO_PI_INV)))
> +>;
> +
> +def : Pat <
> +  (fsin AllReg_32:$src0),
> +  (V_SIN_F32_e32 (V_MUL_F32_e32 AllReg_32:$src0, (V_MOV_IMM_I32 CONST.TWO_PI_INV)))
> +>;
> +
> +def : Pat <
>    (int_AMDGPU_cube VReg_128:$src),
>    (INSERT_SUBREG (INSERT_SUBREG (INSERT_SUBREG (INSERT_SUBREG (v4f32 (IMPLICIT_DEF)),
>      (V_CUBETC_F32 (EXTRACT_SUBREG VReg_128:$src, sel_x),
> -- 
> 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