blob: 248ee9904da030215ae99c42254de164f34aa960 [file] [log] [blame]
Matt Arsenaulta1fe17c2016-07-19 23:16:53 +00001; RUN: llc -march=amdgcn -verify-machineinstrs < %s | FileCheck %s
2
3declare float @llvm.amdgcn.fdiv.fast(float, float) #0
4
5; CHECK-LABEL: {{^}}test_fdiv_fast:
6; CHECK: v_cndmask_b32_e32 v{{[0-9]+}}, 1.0, v{{[0-9]+}}, vcc
7; CHECK: v_mul_f32_e32
8; CHECK: v_rcp_f32_e32
9; CHECK: v_mul_f32_e32
10; CHECK: v_mul_f32_e32
Matt Arsenault3dbeefa2017-03-21 21:39:51 +000011define amdgpu_kernel void @test_fdiv_fast(float addrspace(1)* %out, float %a, float %b) #1 {
Matt Arsenaulta1fe17c2016-07-19 23:16:53 +000012 %fdiv = call float @llvm.amdgcn.fdiv.fast(float %a, float %b)
13 store float %fdiv, float addrspace(1)* %out
14 ret void
15}
16
17attributes #0 = { nounwind readnone }
18attributes #1 = { nounwind }