1 ; RUN: llc -verify-machineinstrs -o - %s -mtriple=aarch64-linux-gnu -mcpu=cyclone | FileCheck %s
3 @varfloat = global float 0.0
4 @vardouble = global double 0.0
6 define void @testfloat() {
7 ; CHECK-LABEL: testfloat:
8 %val1 = load float, ptr @varfloat
10 %val2 = fadd float %val1, %val1
11 ; CHECK: fadd {{s[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}
13 %val3 = fmul float %val2, %val1
14 ; CHECK: fmul {{s[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}
16 %val4 = fdiv float %val3, %val1
17 ; CHECK: fdiv {{s[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}
19 %val5 = fsub float %val4, %val2
20 ; CHECK: fsub {{s[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}
22 store volatile float %val5, ptr @varfloat
24 ; These will be enabled with the implementation of floating-point litpool entries.
25 %val6 = fmul float %val1, %val2
26 %val7 = fsub float -0.0, %val6
27 ; CHECK: fnmul {{s[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}
29 store volatile float %val7, ptr @varfloat
34 define void @testdouble() {
35 ; CHECK-LABEL: testdouble:
36 %val1 = load double, ptr @vardouble
38 %val2 = fadd double %val1, %val1
39 ; CHECK: fadd {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
41 %val3 = fmul double %val2, %val1
42 ; CHECK: fmul {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
44 %val4 = fdiv double %val3, %val1
45 ; CHECK: fdiv {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
47 %val5 = fsub double %val4, %val2
48 ; CHECK: fsub {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
50 store volatile double %val5, ptr @vardouble
52 ; These will be enabled with the implementation of doubleing-point litpool entries.
53 %val6 = fmul double %val1, %val2
54 %val7 = fsub double -0.0, %val6
55 ; CHECK: fnmul {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
57 store volatile double %val7, ptr @vardouble