llvm.org GIT mirror llvm / a431507
Merging r323816: ------------------------------------------------------------------------ r323816 | evandro | 2018-01-30 13:14:11 -0800 (Tue, 30 Jan 2018) | 5 lines [AArch64] Expand testing of zero cycle zeroing Make sure that r321824 doesn't change zeroing. Differential revision: https://reviews.llvm.org/D42089 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@332651 91177308-0d34-0410-b5e6-96231b3b80d8 Tom Stellard 1 year, 5 months ago
1 changed file(s) with 29 addition(s) and 34 deletion(s). Raw diff Collapse all Expand all
None ; RUN: llc -mtriple=arm64-apple-ios -mcpu=cyclone < %s | FileCheck %s -check-prefix=CYCLONE --check-prefix=ALL
1 ; RUN: llc -mtriple=aarch64-gnu-linux -mcpu=kryo < %s | FileCheck %s -check-prefix=KRYO --check-prefix=ALL
2 ; RUN: llc -mtriple=aarch64-gnu-linux -mcpu=falkor < %s | FileCheck %s -check-prefix=FALKOR --check-prefix=ALL
0 ; RUN: llc -mtriple=arm64-apple-ios -mcpu=cyclone < %s | FileCheck %s -check-prefixes=ALL,CYCLONE
1 ; RUN: llc -mtriple=aarch64-gnu-linux -mcpu=exynos-m1 < %s | FileCheck %s -check-prefixes=ALL,OTHERS
2 ; RUN: llc -mtriple=aarch64-gnu-linux -mcpu=exynos-m3 < %s | FileCheck %s -check-prefixes=ALL,OTHERS
3 ; RUN: llc -mtriple=aarch64-gnu-linux -mcpu=kryo < %s | FileCheck %s -check-prefixes=ALL,OTHERS
4 ; RUN: llc -mtriple=aarch64-gnu-linux -mcpu=falkor < %s | FileCheck %s -check-prefixes=ALL,OTHERS
35
46 ; rdar://11481771
57 ; rdar://13713797
8
9 declare void @bar(half, float, double, <2 x double>)
10 declare void @bari(i32, i32)
11 declare void @barl(i64, i64)
12 declare void @barf(float, float)
613
714 define void @t1() nounwind ssp {
815 entry:
916 ; ALL-LABEL: t1:
1017 ; ALL-NOT: fmov
11 ; CYCLONE: fmov d0, xzr
12 ; CYCLONE: fmov d1, xzr
18 ; CYCLONE: fmov h0, wzr
19 ; CYCLONE: fmov s1, wzr
1320 ; CYCLONE: fmov d2, xzr
14 ; CYCLONE: fmov d3, xzr
15 ; KRYO: movi v0.2d, #0000000000000000
16 ; KRYO: movi v1.2d, #0000000000000000
17 ; KRYO: movi v2.2d, #0000000000000000
18 ; KRYO: movi v3.2d, #0000000000000000
19 ; FALKOR: movi v0.2d, #0000000000000000
20 ; FALKOR: movi v1.2d, #0000000000000000
21 ; FALKOR: movi v2.2d, #0000000000000000
22 ; FALKOR: movi v3.2d, #0000000000000000
23 tail call void @bar(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00) nounwind
21 ; CYCLONE: movi.16b v3, #0
22 ; OTHERS: movi v{{[0-3]+}}.2d, #0000000000000000
23 ; OTHERS: movi v{{[0-3]+}}.2d, #0000000000000000
24 ; OTHERS: movi v{{[0-3]+}}.2d, #0000000000000000
25 ; OTHERS: movi v{{[0-3]+}}.2d, #0000000000000000
26 tail call void @bar(half 0.000000e+00, float 0.000000e+00, double 0.000000e+00, <2 x double> ) nounwind
2427 ret void
2528 }
2629
2831 entry:
2932 ; ALL-LABEL: t2:
3033 ; ALL-NOT: mov w0, wzr
31 ; ALL: mov w0, #0
32 ; ALL: mov w1, #0
34 ; ALL: mov w{{[0-3]+}}, #0
35 ; ALL: mov w{{[0-3]+}}, #0
3336 tail call void @bari(i32 0, i32 0) nounwind
3437 ret void
3538 }
3841 entry:
3942 ; ALL-LABEL: t3:
4043 ; ALL-NOT: mov x0, xzr
41 ; ALL: mov x0, #0
42 ; ALL: mov x1, #0
44 ; ALL: mov x{{[0-3]+}}, #0
45 ; ALL: mov x{{[0-3]+}}, #0
4346 tail call void @barl(i64 0, i64 0) nounwind
4447 ret void
4548 }
4750 define void @t4() nounwind ssp {
4851 ; ALL-LABEL: t4:
4952 ; ALL-NOT: fmov
50 ; CYCLONE: fmov s0, wzr
51 ; CYCLONE: fmov s1, wzr
52 ; KRYO: movi v0.2d, #0000000000000000
53 ; KRYO: movi v1.2d, #0000000000000000
54 ; FALKOR: movi v0.2d, #0000000000000000
55 ; FALKOR: movi v1.2d, #0000000000000000
53 ; CYCLONE: fmov s{{[0-3]+}}, wzr
54 ; CYCLONE: fmov s{{[0-3]+}}, wzr
55 ; OTHERS: movi v{{[0-3]+}}.2d, #0000000000000000
56 ; OTHERS: movi v{{[0-3]+}}.2d, #0000000000000000
5657 tail call void @barf(float 0.000000e+00, float 0.000000e+00) nounwind
5758 ret void
5859 }
5960
60 declare void @bar(double, double, double, double)
61 declare void @bari(i32, i32)
62 declare void @barl(i64, i64)
63 declare void @barf(float, float)
64
6561 ; We used to produce spills+reloads for a Q register with zero cycle zeroing
6662 ; enabled.
6763 ; ALL-LABEL: foo:
68 ; ALL-NOT: str {{q[0-9]+}}
69 ; ALL-NOT: ldr {{q[0-9]+}}
64 ; ALL-NOT: str q{{[0-9]+}}
65 ; ALL-NOT: ldr q{{[0-9]+}}
7066 define double @foo(i32 %n) {
7167 entry:
7268 br label %for.body
8985 define <2 x i64> @t6() {
9086 ; ALL-LABEL: t6:
9187 ; CYCLONE: movi.16b v0, #0
92 ; KRYO: movi v0.2d, #0000000000000000
93 ; FALKOR: movi v0.2d, #0000000000000000
88 ; OTHERS: movi v0.2d, #0000000000000000
9489 ret <2 x i64> zeroinitializer
9590 }
9691