[Mesa-dev] [PATCH] AMDGPU: Match AMDGPU.cube intrinsic for SI.
Tom Stellard
tom at stellard.net
Tue Dec 4 18:11:01 PST 2012
On Tue, Dec 04, 2012 at 07:03:35PM +0100, Michel Dänzer wrote:
> From: Michel Dänzer <michel.daenzer at amd.com>
>
>
Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
> ---
> lib/Target/AMDGPU/SIInstructions.td | 21 +++++++++++++++++++++
> 1 file changed, 21 insertions(+)
>
> diff --git a/lib/Target/AMDGPU/SIInstructions.td b/lib/Target/AMDGPU/SIInstructions.td
> index d6f71f6..ecb874a 100644
> --- a/lib/Target/AMDGPU/SIInstructions.td
> +++ b/lib/Target/AMDGPU/SIInstructions.td
> @@ -1269,6 +1269,27 @@ def : Pat <
> (SI_KIL (V_MOV_IMM_I32 0xbf800000))
> >;
>
> +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),
> + (EXTRACT_SUBREG VReg_128:$src, sel_y),
> + (EXTRACT_SUBREG VReg_128:$src, sel_z),
> + 0, 0, 0, 0), sel_x),
> + (V_CUBESC_F32 (EXTRACT_SUBREG VReg_128:$src, sel_x),
> + (EXTRACT_SUBREG VReg_128:$src, sel_y),
> + (EXTRACT_SUBREG VReg_128:$src, sel_z),
> + 0, 0, 0, 0), sel_y),
> + (V_CUBEMA_F32 (EXTRACT_SUBREG VReg_128:$src, sel_x),
> + (EXTRACT_SUBREG VReg_128:$src, sel_y),
> + (EXTRACT_SUBREG VReg_128:$src, sel_z),
> + 0, 0, 0, 0), sel_z),
> + (V_CUBEID_F32 (EXTRACT_SUBREG VReg_128:$src, sel_x),
> + (EXTRACT_SUBREG VReg_128:$src, sel_y),
> + (EXTRACT_SUBREG VReg_128:$src, sel_z),
> + 0, 0, 0, 0), sel_w)
> +>;
> +
> /********** ================== **********/
> /********** VOP3 Patterns **********/
> /********** ================== **********/
> --
> 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