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 define <vscale x 8 x half> @vselect_fmul_f16(<vscale x 8 x i1> %p, <vscale x 8 x half> %a, <vscale x 8 x half> %b) {
5 ; CHECK-LABEL: vselect_fmul_f16:
7 ; CHECK-NEXT: fmul z0.h, p0/m, z0.h, z1.h
9 %mul = fmul <vscale x 8 x half> %a, %b
10 %sel = select <vscale x 8 x i1> %p, <vscale x 8 x half> %mul, <vscale x 8 x half> %a
11 ret <vscale x 8 x half> %sel
14 define <vscale x 4 x float> @vselect_fmul_f32(<vscale x 4 x i1> %p, <vscale x 4 x float> %a, <vscale x 4 x float> %b) {
15 ; CHECK-LABEL: vselect_fmul_f32:
17 ; CHECK-NEXT: fmul z0.s, p0/m, z0.s, z1.s
19 %mul = fmul <vscale x 4 x float> %a, %b
20 %sel = select <vscale x 4 x i1> %p, <vscale x 4 x float> %mul, <vscale x 4 x float> %a
21 ret <vscale x 4 x float> %sel
24 define <vscale x 2 x double> @vselect_fmul_f64(<vscale x 2 x i1> %p, <vscale x 2 x double> %a, <vscale x 2 x double> %b) {
25 ; CHECK-LABEL: vselect_fmul_f64:
27 ; CHECK-NEXT: fmul z0.d, p0/m, z0.d, z1.d
29 %mul = fmul <vscale x 2 x double> %a, %b
30 %sel = select <vscale x 2 x i1> %p, <vscale x 2 x double> %mul, <vscale x 2 x double> %a
31 ret <vscale x 2 x double> %sel
34 define <vscale x 8 x half> @vselect_fadd_f16(<vscale x 8 x i1> %p, <vscale x 8 x half> %a, <vscale x 8 x half> %b) {
35 ; CHECK-LABEL: vselect_fadd_f16:
37 ; CHECK-NEXT: fadd z0.h, p0/m, z0.h, z1.h
39 %add = fadd <vscale x 8 x half> %a, %b
40 %sel = select <vscale x 8 x i1> %p, <vscale x 8 x half> %add, <vscale x 8 x half> %a
41 ret <vscale x 8 x half> %sel
44 define <vscale x 4 x float> @vselect_fadd_f32(<vscale x 4 x i1> %p, <vscale x 4 x float> %a, <vscale x 4 x float> %b) {
45 ; CHECK-LABEL: vselect_fadd_f32:
47 ; CHECK-NEXT: fadd z0.s, p0/m, z0.s, z1.s
49 %add = fadd <vscale x 4 x float> %a, %b
50 %sel = select <vscale x 4 x i1> %p, <vscale x 4 x float> %add, <vscale x 4 x float> %a
51 ret <vscale x 4 x float> %sel
54 define <vscale x 2 x double> @vselect_fadd_f64(<vscale x 2 x i1> %p, <vscale x 2 x double> %a, <vscale x 2 x double> %b) {
55 ; CHECK-LABEL: vselect_fadd_f64:
57 ; CHECK-NEXT: fadd z0.d, p0/m, z0.d, z1.d
59 %add = fadd <vscale x 2 x double> %a, %b
60 %sel = select <vscale x 2 x i1> %p, <vscale x 2 x double> %add, <vscale x 2 x double> %a
61 ret <vscale x 2 x double> %sel
64 define <vscale x 8 x half> @vselect_fsub_f16(<vscale x 8 x i1> %p, <vscale x 8 x half> %a, <vscale x 8 x half> %b) {
65 ; CHECK-LABEL: vselect_fsub_f16:
67 ; CHECK-NEXT: fsub z0.h, p0/m, z0.h, z1.h
69 %sub = fsub <vscale x 8 x half> %a, %b
70 %sel = select <vscale x 8 x i1> %p, <vscale x 8 x half> %sub, <vscale x 8 x half> %a
71 ret <vscale x 8 x half> %sel
74 define <vscale x 4 x float> @vselect_fsub_f32(<vscale x 4 x i1> %p, <vscale x 4 x float> %a, <vscale x 4 x float> %b) {
75 ; CHECK-LABEL: vselect_fsub_f32:
77 ; CHECK-NEXT: fsub z0.s, p0/m, z0.s, z1.s
79 %sub = fsub <vscale x 4 x float> %a, %b
80 %sel = select <vscale x 4 x i1> %p, <vscale x 4 x float> %sub, <vscale x 4 x float> %a
81 ret <vscale x 4 x float> %sel
84 define <vscale x 2 x double> @vselect_fsub_f64(<vscale x 2 x i1> %p, <vscale x 2 x double> %a, <vscale x 2 x double> %b) {
85 ; CHECK-LABEL: vselect_fsub_f64:
87 ; CHECK-NEXT: fsub z0.d, p0/m, z0.d, z1.d
89 %sub = fsub <vscale x 2 x double> %a, %b
90 %sel = select <vscale x 2 x i1> %p, <vscale x 2 x double> %sub, <vscale x 2 x double> %a
91 ret <vscale x 2 x double> %sel