1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=aarch64--linux-gnu -mattr=+sve < %s | FileCheck %s
4 ; fpext <vscale x 2 x half> -> <vscale x 2 x double>
5 define <vscale x 2 x double> @ext2_f16_f64(<vscale x 2 x half> *%ptr, i64 %index) {
6 ; CHECK-LABEL: ext2_f16_f64:
8 ; CHECK-NEXT: ptrue p0.d
9 ; CHECK-NEXT: ld1h { z0.d }, p0/z, [x0]
10 ; CHECK-NEXT: fcvt z0.d, p0/m, z0.h
12 %load = load <vscale x 2 x half>, <vscale x 2 x half>* %ptr, align 4
13 %load.ext = fpext <vscale x 2 x half> %load to <vscale x 2 x double>
14 ret <vscale x 2 x double> %load.ext
17 ; fpext <vscale x 4 x half> -> <vscale x 4 x double>
18 define <vscale x 4 x double> @ext4_f16_f64(<vscale x 4 x half> *%ptr, i64 %index) {
19 ; CHECK-LABEL: ext4_f16_f64:
21 ; CHECK-NEXT: ptrue p0.s
22 ; CHECK-NEXT: ld1h { z0.s }, p0/z, [x0]
23 ; CHECK-NEXT: ptrue p0.d
24 ; CHECK-NEXT: uunpklo z1.d, z0.s
25 ; CHECK-NEXT: uunpkhi z2.d, z0.s
26 ; CHECK-NEXT: fcvt z0.d, p0/m, z1.h
27 ; CHECK-NEXT: fcvt z1.d, p0/m, z2.h
29 %load = load <vscale x 4 x half>, <vscale x 4 x half>* %ptr, align 4
30 %load.ext = fpext <vscale x 4 x half> %load to <vscale x 4 x double>
31 ret <vscale x 4 x double> %load.ext
34 ; fpext <vscale x 8 x half> -> <vscale x 8 x double>
35 define <vscale x 8 x double> @ext8_f16_f64(<vscale x 8 x half> *%ptr, i64 %index) {
36 ; CHECK-LABEL: ext8_f16_f64:
38 ; CHECK-NEXT: ptrue p0.h
39 ; CHECK-NEXT: ld1h { z0.h }, p0/z, [x0]
40 ; CHECK-NEXT: ptrue p0.d
41 ; CHECK-NEXT: uunpklo z1.s, z0.h
42 ; CHECK-NEXT: uunpkhi z0.s, z0.h
43 ; CHECK-NEXT: uunpklo z2.d, z1.s
44 ; CHECK-NEXT: uunpkhi z1.d, z1.s
45 ; CHECK-NEXT: uunpklo z3.d, z0.s
46 ; CHECK-NEXT: uunpkhi z4.d, z0.s
47 ; CHECK-NEXT: fcvt z0.d, p0/m, z2.h
48 ; CHECK-NEXT: fcvt z1.d, p0/m, z1.h
49 ; CHECK-NEXT: fcvt z2.d, p0/m, z3.h
50 ; CHECK-NEXT: fcvt z3.d, p0/m, z4.h
52 %load = load <vscale x 8 x half>, <vscale x 8 x half>* %ptr, align 4
53 %load.ext = fpext <vscale x 8 x half> %load to <vscale x 8 x double>
54 ret <vscale x 8 x double> %load.ext
57 ; fpext <vscale x 2 x float> -> <vscale x 2 x double>
58 define <vscale x 2 x double> @ext2_f32_f64(<vscale x 2 x float> *%ptr, i64 %index) {
59 ; CHECK-LABEL: ext2_f32_f64:
61 ; CHECK-NEXT: ptrue p0.d
62 ; CHECK-NEXT: ld1w { z0.d }, p0/z, [x0]
63 ; CHECK-NEXT: fcvt z0.d, p0/m, z0.s
65 %load = load <vscale x 2 x float>, <vscale x 2 x float>* %ptr, align 4
66 %load.ext = fpext <vscale x 2 x float> %load to <vscale x 2 x double>
67 ret <vscale x 2 x double> %load.ext
70 ; fpext <vscale x 4 x float> -> <vscale x 4 x double>
71 define <vscale x 4 x double> @ext4_f32_f64(<vscale x 4 x float> *%ptr, i64 %index) {
72 ; CHECK-LABEL: ext4_f32_f64:
74 ; CHECK-NEXT: ptrue p0.s
75 ; CHECK-NEXT: ld1w { z0.s }, p0/z, [x0]
76 ; CHECK-NEXT: ptrue p0.d
77 ; CHECK-NEXT: uunpklo z1.d, z0.s
78 ; CHECK-NEXT: uunpkhi z2.d, z0.s
79 ; CHECK-NEXT: fcvt z0.d, p0/m, z1.s
80 ; CHECK-NEXT: fcvt z1.d, p0/m, z2.s
82 %load = load <vscale x 4 x float>, <vscale x 4 x float>* %ptr, align 4
83 %load.ext = fpext <vscale x 4 x float> %load to <vscale x 4 x double>
84 ret <vscale x 4 x double> %load.ext