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