blob: 65ab3e04237b44c0f38b73ed268fc0c6d22d167b [file] [log] [blame]
Matt Arsenault0084adc2018-04-30 19:08:16 +00001; RUN: llc -march=amdgcn -mcpu=gfx906 -verify-machineinstrs < %s | FileCheck %s --check-prefix=GFX906
2
3declare float @llvm.amdgcn.fdot2(<2 x half> %a, <2 x half> %b, float %c)
4
5; GFX906-LABEL: {{^}}test_llvm_amdgcn_fdot2
6; GFX906: v_dot2_f32_f16
7define amdgpu_kernel void @test_llvm_amdgcn_fdot2(
8 float addrspace(1)* %r,
9 <2 x half> addrspace(1)* %a,
10 <2 x half> addrspace(1)* %b,
11 float addrspace(1)* %c) {
12entry:
13 %a.val = load <2 x half>, <2 x half> addrspace(1)* %a
14 %b.val = load <2 x half>, <2 x half> addrspace(1)* %b
15 %c.val = load float, float addrspace(1)* %c
16 %r.val = call float @llvm.amdgcn.fdot2(<2 x half> %a.val, <2 x half> %b.val, float %c.val)
17 store float %r.val, float addrspace(1)* %r
18 ret void
19}