1 ; RUN: llc -mtriple=aarch64-linux-unknown -mattr=+sve -o - < %s | FileCheck %s
3 define <vscale x 16 x i8> @vselect_cmp_ne(<vscale x 16 x i8> %a, <vscale x 16 x i8> %b, <vscale x 16 x i8> %c) {
4 ; CHECK-LABEL: vselect_cmp_ne
6 ; CHECK-NEXT: ptrue p0.b
7 ; CHECK-NEXT: cmpne p0.b, p0/z, z0.b, z1.b
8 ; CHECK-NEXT: sel z0.b, p0, z1.b, z2.b
10 %cmp = icmp ne <vscale x 16 x i8> %a, %b
11 %d = select <vscale x 16 x i1> %cmp, <vscale x 16 x i8> %b, <vscale x 16 x i8> %c
12 ret <vscale x 16 x i8> %d
15 define <vscale x 16 x i8> @vselect_cmp_sgt(<vscale x 16 x i8> %a, <vscale x 16 x i8> %b, <vscale x 16 x i8> %c) {
16 ; CHECK-LABEL: vselect_cmp_sgt
18 ; CHECK-NEXT: ptrue p0.b
19 ; CHECK-NEXT: cmpgt p0.b, p0/z, z0.b, z1.b
20 ; CHECK-NEXT: sel z0.b, p0, z1.b, z2.b
22 %cmp = icmp sgt <vscale x 16 x i8> %a, %b
23 %d = select <vscale x 16 x i1> %cmp, <vscale x 16 x i8> %b, <vscale x 16 x i8> %c
24 ret <vscale x 16 x i8> %d
27 define <vscale x 16 x i8> @vselect_cmp_ugt(<vscale x 16 x i8> %a, <vscale x 16 x i8> %b, <vscale x 16 x i8> %c) {
28 ; CHECK-LABEL: vselect_cmp_ugt
30 ; CHECK-NEXT: ptrue p0.b
31 ; CHECK-NEXT: cmphi p0.b, p0/z, z0.b, z1.b
32 ; CHECK-NEXT: sel z0.b, p0, z1.b, z2.b
34 %cmp = icmp ugt <vscale x 16 x i8> %a, %b
35 %d = select <vscale x 16 x i1> %cmp, <vscale x 16 x i8> %b, <vscale x 16 x i8> %c
36 ret <vscale x 16 x i8> %d