1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -enable-no-signed-zeros-fp-math=true < %s | FileCheck %s --check-prefix=GFX9
3 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -enable-no-signed-zeros-fp-math=false < %s | FileCheck %s --check-prefix=GFX9
4 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1010 -enable-no-signed-zeros-fp-math=true < %s | FileCheck %s --check-prefix=GFX10
5 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1010 -enable-no-signed-zeros-fp-math=false < %s | FileCheck %s --check-prefix=GFX10
6 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1100 -amdgpu-enable-delay-alu=0 -enable-no-signed-zeros-fp-math=true < %s | FileCheck %s --check-prefix=GFX10
7 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1100 -amdgpu-enable-delay-alu=0 -enable-no-signed-zeros-fp-math=false < %s | FileCheck %s --check-prefix=GFX10
9 ; no-signed-zeros-fp-math should not increase the number of
10 ; instructions emitted.
12 define { double, double } @testfn(double %arg, double %arg1, double %arg2) {
14 ; GFX9: ; %bb.0: ; %bb
15 ; GFX9-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
16 ; GFX9-NEXT: v_add_f64 v[4:5], v[4:5], -v[0:1]
17 ; GFX9-NEXT: v_add_f64 v[0:1], v[4:5], -v[2:3]
18 ; GFX9-NEXT: v_add_f64 v[2:3], -v[2:3], -v[4:5]
19 ; GFX9-NEXT: s_setpc_b64 s[30:31]
21 ; GFX10-LABEL: testfn:
22 ; GFX10: ; %bb.0: ; %bb
23 ; GFX10-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
24 ; GFX10-NEXT: v_add_f64 v[4:5], v[4:5], -v[0:1]
25 ; GFX10-NEXT: v_add_f64 v[0:1], v[4:5], -v[2:3]
26 ; GFX10-NEXT: v_add_f64 v[2:3], -v[2:3], -v[4:5]
27 ; GFX10-NEXT: s_setpc_b64 s[30:31]
29 %tmp = fsub fast double 0.000000e+00, %arg1
30 %tmp3 = fsub fast double %arg2, %arg
31 %tmp4 = fadd fast double %tmp3, %tmp
32 %tmp5 = fsub fast double %tmp, %tmp3
33 %tmp6 = insertvalue { double, double } undef, double %tmp4, 0
34 %tmp7 = insertvalue { double, double } %tmp6, double %tmp5, 1
35 ret { double, double } %tmp7