13b0846e8STim Northover; RUN: llc -verify-machineinstrs -o - %s -mtriple=aarch64-linux-gnu -mcpu=cyclone | FileCheck %s
2e0e3aefdSTim Northover
3e0e3aefdSTim Northover@varfloat = global float 0.0
4e0e3aefdSTim Northover@vardouble = global double 0.0
5e0e3aefdSTim Northover
6e0e3aefdSTim Northoverdefine void @testfloat() {
7f799e3f9SStephen Lin; CHECK-LABEL: testfloat:
8*a79ac14fSDavid Blaikie  %val1 = load float, float* @varfloat
9e0e3aefdSTim Northover
10e0e3aefdSTim Northover  %val2 = fadd float %val1, %val1
11e0e3aefdSTim Northover; CHECK: fadd {{s[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}
12e0e3aefdSTim Northover
13e0e3aefdSTim Northover  %val3 = fmul float %val2, %val1
14e0e3aefdSTim Northover; CHECK: fmul {{s[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}
15e0e3aefdSTim Northover
16e0e3aefdSTim Northover  %val4 = fdiv float %val3, %val1
17e0e3aefdSTim Northover; CHECK: fdiv {{s[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}
18e0e3aefdSTim Northover
19e0e3aefdSTim Northover  %val5 = fsub float %val4, %val2
20e0e3aefdSTim Northover; CHECK: fsub {{s[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}
21e0e3aefdSTim Northover
22e0e3aefdSTim Northover  store volatile float %val5, float* @varfloat
23e0e3aefdSTim Northover
24e0e3aefdSTim Northover; These will be enabled with the implementation of floating-point litpool entries.
25e0e3aefdSTim Northover  %val6 = fmul float %val1, %val2
26e0e3aefdSTim Northover  %val7 = fsub float -0.0, %val6
27e0e3aefdSTim Northover; CHECK: fnmul {{s[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}
28e0e3aefdSTim Northover
29e0e3aefdSTim Northover  store volatile float %val7, float* @varfloat
30e0e3aefdSTim Northover
31e0e3aefdSTim Northover  ret void
32e0e3aefdSTim Northover}
33e0e3aefdSTim Northover
34e0e3aefdSTim Northoverdefine void @testdouble() {
35f799e3f9SStephen Lin; CHECK-LABEL: testdouble:
36*a79ac14fSDavid Blaikie  %val1 = load double, double* @vardouble
37e0e3aefdSTim Northover
38e0e3aefdSTim Northover  %val2 = fadd double %val1, %val1
39e0e3aefdSTim Northover; CHECK: fadd {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
40e0e3aefdSTim Northover
41e0e3aefdSTim Northover  %val3 = fmul double %val2, %val1
42e0e3aefdSTim Northover; CHECK: fmul {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
43e0e3aefdSTim Northover
44e0e3aefdSTim Northover  %val4 = fdiv double %val3, %val1
45e0e3aefdSTim Northover; CHECK: fdiv {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
46e0e3aefdSTim Northover
47e0e3aefdSTim Northover  %val5 = fsub double %val4, %val2
48e0e3aefdSTim Northover; CHECK: fsub {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
49e0e3aefdSTim Northover
50e0e3aefdSTim Northover  store volatile double %val5, double* @vardouble
51e0e3aefdSTim Northover
52e0e3aefdSTim Northover; These will be enabled with the implementation of doubleing-point litpool entries.
53e0e3aefdSTim Northover   %val6 = fmul double %val1, %val2
54e0e3aefdSTim Northover   %val7 = fsub double -0.0, %val6
55e0e3aefdSTim Northover; CHECK: fnmul {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
56e0e3aefdSTim Northover
57e0e3aefdSTim Northover   store volatile double %val7, double* @vardouble
58e0e3aefdSTim Northover
59e0e3aefdSTim Northover  ret void
60e0e3aefdSTim Northover}
61