diff options
| author | Stanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com> | 2017-09-06 22:27:29 +0000 |
|---|---|---|
| committer | Stanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com> | 2017-09-06 22:27:29 +0000 |
| commit | 442e28dd42261344190a0e1940617e2fa7f10a88 (patch) | |
| tree | ac61a5b451427ce8c7061dc53021fd3829e975be /llvm/lib/Target | |
| parent | 17e93d28f233dd7edb7d544d4e32c9f8e8899918 (diff) | |
| download | bcm5719-llvm-442e28dd42261344190a0e1940617e2fa7f10a88.tar.gz bcm5719-llvm-442e28dd42261344190a0e1940617e2fa7f10a88.zip | |
[AMDGPU] Use v_pk_max_f16 for fcanonicalize
Differential Revision: https://reviews.llvm.org/D37325
llvm-svn: 312676
Diffstat (limited to 'llvm/lib/Target')
| -rw-r--r-- | llvm/lib/Target/AMDGPU/SIInstructions.td | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/llvm/lib/Target/AMDGPU/SIInstructions.td b/llvm/lib/Target/AMDGPU/SIInstructions.td index 7744f7ae6fd..1ed5e8e0937 100644 --- a/llvm/lib/Target/AMDGPU/SIInstructions.td +++ b/llvm/lib/Target/AMDGPU/SIInstructions.td @@ -1283,6 +1283,11 @@ def : Pat< (fcanonicalize (f16 (VOP3Mods f16:$src, i32:$src_mods))), (V_MUL_F16_e64 0, (i32 CONST.FP16_ONE), $src_mods, $src, 0, 0) >; + +def : Pat< + (fcanonicalize (v2f16 (VOP3PMods v2f16:$src, i32:$src_mods))), + (V_PK_MUL_F16 0, (i32 CONST.V2FP16_ONE), $src_mods, $src, DSTCLAMP.NONE) +>; } let Predicates = [FP16Denormals] in { @@ -1290,6 +1295,11 @@ def : Pat< (fcanonicalize (f16 (VOP3Mods f16:$src, i32:$src_mods))), (V_MAX_F16_e64 $src_mods, $src, $src_mods, $src, 0, 0) >; + +def : Pat< + (fcanonicalize (v2f16 (VOP3PMods v2f16:$src, i32:$src_mods))), + (V_PK_MAX_F16 $src_mods, $src, $src_mods, $src, DSTCLAMP.NONE) +>; } let Predicates = [NoFP32Denormals] in { @@ -1320,11 +1330,6 @@ def : Pat< >; } -def : Pat< - (fcanonicalize (v2f16 (VOP3PMods v2f16:$src, i32:$src_mods))), - (V_PK_MUL_F16 0, (i32 CONST.V2FP16_ONE), $src_mods, $src, DSTCLAMP.NONE) ->; - // Allow integer inputs class ExpPattern<SDPatternOperator node, ValueType vt, Instruction Inst> : Pat< |

