summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2012-12-04 19:03:35 +0100
committerTom Stellard <thomas.stellard@amd.com>2012-12-05 18:36:28 +0000
commit5401b5296ab0350009252190be07bb0ceb1051a7 (patch)
tree15c6dc2aab440b7fca9fa3d8e9e36ccebf0feb69
parent6f3979233eafd5aed680de0f32b677b997ab2017 (diff)
AMDGPU: Match AMDGPU.cube intrinsic for SI.
Reviewed-by: Tom Stellard <thomas.stellard@amd.com> Reviewed by: Christian König <christian.koenig@amd.com> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
-rw-r--r--lib/Target/AMDGPU/SIInstructions.td21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/Target/AMDGPU/SIInstructions.td b/lib/Target/AMDGPU/SIInstructions.td
index a2123a79f3..5d20f82f19 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 **********/
/********** ================== **********/