Matt Arsenault | a1fe17c | 2016-07-19 23:16:53 +0000 | [diff] [blame^] | 1 | ; RUN: llc -march=amdgcn -verify-machineinstrs < %s | FileCheck %s |
| 2 | |
| 3 | declare 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 |
| 11 | define void @test_fdiv_fast(float addrspace(1)* %out, float %a, float %b) #1 { |
| 12 | %fdiv = call float @llvm.amdgcn.fdiv.fast(float %a, float %b) |
| 13 | store float %fdiv, float addrspace(1)* %out |
| 14 | ret void |
| 15 | } |
| 16 | |
| 17 | attributes #0 = { nounwind readnone } |
| 18 | attributes #1 = { nounwind } |