diff options
author | Tom Stellard <thomas.stellard@amd.com> | 2013-02-05 17:09:10 +0000 |
---|---|---|
committer | Tom Stellard <thomas.stellard@amd.com> | 2013-02-05 17:09:10 +0000 |
commit | 50a44a62b8dc8092b0c5cf5e4f2b62cd60085527 (patch) | |
tree | edcee0f3e8c094aa13248f70ba7a047ce5607bc9 /lib | |
parent | d07c2a5fa1fd3bee45104953714a128cf5e19158 (diff) |
R600/SI: Add patterns for fcos and fsin.
Fixes 37 piglit tests and allows e.g. FlightGear to run with radeonsi.
Patch by: Michel Dänzer
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174391 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/R600/SIInstructions.td | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Target/R600/SIInstructions.td b/lib/Target/R600/SIInstructions.td index 4164c55837..85bb73a531 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), |