diff options
author | Farhana Aleen <farhana.aleen@gmail.com> | 2018-04-03 21:20:39 +0000 |
---|---|---|
committer | Farhana Aleen <farhana.aleen@gmail.com> | 2018-04-03 21:20:39 +0000 |
commit | 3ab409dc8613070daa7426a598e8b55d8d787dcb (patch) | |
tree | fb8019a6a3bdbf997c0bda7eb7944ffaadfe8ae1 /llvm/test/CodeGen/AMDGPU/fmax3.ll | |
parent | ce8766b2fd163f4d367fe043360ebbbc3078ccea (diff) | |
download | bcm5719-llvm-3ab409dc8613070daa7426a598e8b55d8d787dcb.tar.gz bcm5719-llvm-3ab409dc8613070daa7426a598e8b55d8d787dcb.zip |
MSG
llvm-svn: 329114
Diffstat (limited to 'llvm/test/CodeGen/AMDGPU/fmax3.ll')
-rw-r--r-- | llvm/test/CodeGen/AMDGPU/fmax3.ll | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/AMDGPU/fmax3.ll b/llvm/test/CodeGen/AMDGPU/fmax3.ll index 2e6d3f3c1e8..6f2007b12aa 100644 --- a/llvm/test/CodeGen/AMDGPU/fmax3.ll +++ b/llvm/test/CodeGen/AMDGPU/fmax3.ll @@ -84,9 +84,21 @@ define amdgpu_kernel void @test_fmax3_olt_1_f16(half addrspace(1)* %out, half ad ret void } +; Checks whether the test passes; performMinMaxCombine() should not optimize vector patterns of max3 +; since there are no pack instructions for fmax3. +; GCN-LABEL: {{^}}no_fmax3_v2f16: +define <2 x half> @no_fmax3_v2f16(<2 x half> %a, <2 x half> %b, <2 x half> %c, <2 x half> %d) { +entry: + %max = tail call fast <2 x half> @llvm.maxnum.v2f16(<2 x half> %a, <2 x half> %b) + %max1 = tail call fast <2 x half> @llvm.maxnum.v2f16(<2 x half> %c, <2 x half> %max) + %res = tail call fast <2 x half> @llvm.maxnum.v2f16(<2 x half> %max1, <2 x half> %d) + ret <2 x half> %res +} + declare i32 @llvm.amdgcn.workitem.id.x() #1 declare float @llvm.maxnum.f32(float, float) #1 declare half @llvm.maxnum.f16(half, half) #1 +declare <2 x half> @llvm.maxnum.v2f16(<2 x half>, <2 x half>) attributes #0 = { nounwind } attributes #1 = { nounwind readnone speculatable } |