[Mesa-dev] [PATCH] AMDGPU: Match AMDGPU.cube intrinsic for SI.
Michel Dänzer
michel at daenzer.net
Tue Dec 4 10:03:35 PST 2012
From: Michel Dänzer <michel.daenzer 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
More information about the mesa-dev
mailing list