1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=arm64-eabi | FileCheck %s
5 define <4 x i16> @fptosi_v4f64_to_v4i16(ptr %ptr) {
6 ; CHECK-LABEL: fptosi_v4f64_to_v4i16:
8 ; CHECK-NEXT: ldp q0, q1, [x0]
9 ; CHECK-NEXT: fcvtzs v1.2d, v1.2d
10 ; CHECK-NEXT: fcvtzs v0.2d, v0.2d
11 ; CHECK-NEXT: xtn v1.2s, v1.2d
12 ; CHECK-NEXT: xtn v0.2s, v0.2d
13 ; CHECK-NEXT: uzp1 v0.4h, v0.4h, v1.4h
15 %tmp1 = load <4 x double>, ptr %ptr
16 %tmp2 = fptosi <4 x double> %tmp1 to <4 x i16>
20 define <8 x i8> @fptosi_v4f64_to_v4i8(ptr %ptr) {
21 ; CHECK-LABEL: fptosi_v4f64_to_v4i8:
23 ; CHECK-NEXT: ldp q1, q0, [x0, #32]
24 ; CHECK-NEXT: ldp q2, q3, [x0]
25 ; CHECK-NEXT: fcvtzs v0.2d, v0.2d
26 ; CHECK-NEXT: fcvtzs v1.2d, v1.2d
27 ; CHECK-NEXT: fcvtzs v3.2d, v3.2d
28 ; CHECK-NEXT: fcvtzs v2.2d, v2.2d
29 ; CHECK-NEXT: xtn v0.2s, v0.2d
30 ; CHECK-NEXT: xtn v1.2s, v1.2d
31 ; CHECK-NEXT: xtn v3.2s, v3.2d
32 ; CHECK-NEXT: xtn v2.2s, v2.2d
33 ; CHECK-NEXT: uzp1 v0.4h, v1.4h, v0.4h
34 ; CHECK-NEXT: uzp1 v1.4h, v2.4h, v3.4h
35 ; CHECK-NEXT: uzp1 v0.8b, v1.8b, v0.8b
37 %tmp1 = load <8 x double>, ptr %ptr
38 %tmp2 = fptosi <8 x double> %tmp1 to <8 x i8>
42 define <4 x half> @uitofp_v4i64_to_v4f16(ptr %ptr) {
43 ; CHECK-LABEL: uitofp_v4i64_to_v4f16:
45 ; CHECK-NEXT: ldp q0, q1, [x0]
46 ; CHECK-NEXT: ucvtf v0.2d, v0.2d
47 ; CHECK-NEXT: ucvtf v1.2d, v1.2d
48 ; CHECK-NEXT: fcvtn v0.2s, v0.2d
49 ; CHECK-NEXT: fcvtn2 v0.4s, v1.2d
50 ; CHECK-NEXT: fcvtn v0.4h, v0.4s
52 %tmp1 = load <4 x i64>, ptr %ptr
53 %tmp2 = uitofp <4 x i64> %tmp1 to <4 x half>
57 define <4 x i16> @trunc_v4i64_to_v4i16(ptr %ptr) {
58 ; CHECK-LABEL: trunc_v4i64_to_v4i16:
60 ; CHECK-NEXT: ldp q1, q0, [x0]
61 ; CHECK-NEXT: uzp1 v0.4s, v1.4s, v0.4s
62 ; CHECK-NEXT: xtn v0.4h, v0.4s
64 %tmp1 = load <4 x i64>, ptr %ptr
65 %tmp2 = trunc <4 x i64> %tmp1 to <4 x i16>
69 define <4 x i16> @fptoui_v4f64_to_v4i16(ptr %ptr) {
70 ; CHECK-LABEL: fptoui_v4f64_to_v4i16:
72 ; CHECK-NEXT: ldp q0, q1, [x0]
73 ; CHECK-NEXT: fcvtzs v1.2d, v1.2d
74 ; CHECK-NEXT: fcvtzs v0.2d, v0.2d
75 ; CHECK-NEXT: xtn v1.2s, v1.2d
76 ; CHECK-NEXT: xtn v0.2s, v0.2d
77 ; CHECK-NEXT: uzp1 v0.4h, v0.4h, v1.4h
79 %tmp1 = load <4 x double>, ptr %ptr
80 %tmp2 = fptoui <4 x double> %tmp1 to <4 x i16>