1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc < %s -verify-machineinstrs -mtriple=aarch64-linux-gnu    | FileCheck --check-prefixes=CHECK,NOSPLIT %s
3; RUN: llc < %s -verify-machineinstrs -mtriple=aarch64_be-linux-gnu | FileCheck --check-prefixes=CHECK,NOSPLIT %s
4; RUN: llc < %s -verify-machineinstrs -mtriple=aarch64-linux-gnu    -mcpu=exynos-m3 | FileCheck --check-prefixes=CHECK,NOSPLIT %s
5; RUN: llc < %s -verify-machineinstrs -mtriple=aarch64_be-linux-gnu -mcpu=exynos-m3 | FileCheck --check-prefixes=CHECK,NOSPLIT %s
6
7define void @test_split_f(<4 x float> %val, <4 x float>* %addr) {
8; NOSPLIT-LABEL: test_split_f:
9; NOSPLIT:       // %bb.0:
10; NOSPLIT-NEXT:    str q0, [x0]
11; NOSPLIT-NEXT:    ret
12;
13; SPLIT-LABEL: test_split_f:
14; SPLIT:       // %bb.0:
15; SPLIT-NEXT:    rev64 v0.4s, v0.4s
16; SPLIT-NEXT:    ext v0.16b, v0.16b, v0.16b, #8
17; SPLIT-NEXT:    st1 { v0.2s }, [x0]
18; SPLIT-NEXT:    ext v0.16b, v0.16b, v0.16b, #8
19; SPLIT-NEXT:    add x8, x0, #8 // =8
20; SPLIT-NEXT:    st1 { v0.2s }, [x8]
21; SPLIT-NEXT:    ret
22  store <4 x float> %val, <4 x float>* %addr, align 8
23  ret void
24}
25
26define void @test_split_d(<2 x double> %val, <2 x double>* %addr) {
27; NOSPLIT-LABEL: test_split_d:
28; NOSPLIT:       // %bb.0:
29; NOSPLIT-NEXT:    str q0, [x0]
30; NOSPLIT-NEXT:    ret
31;
32; SPLIT-LABEL: test_split_d:
33; SPLIT:       // %bb.0:
34; SPLIT-NEXT:    ext v0.16b, v0.16b, v0.16b, #8
35; SPLIT-NEXT:    st1 { v0.2d }, [x0]
36; SPLIT-NEXT:    ret
37  store <2 x double> %val, <2 x double>* %addr, align 8
38  ret void
39}
40
41define void @test_split_128(fp128 %val, fp128* %addr) {
42; CHECK-LABEL: test_split_128:
43; CHECK:       // %bb.0:
44; CHECK-NEXT:    str q0, [x0]
45; CHECK-NEXT:    ret
46  store fp128 %val, fp128* %addr, align 8
47  ret void
48}
49