1; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve2 -asm-verbose=0 < %s 2>%t | FileCheck %s 2; RUN: FileCheck --check-prefix=WARN --allow-empty %s <%t 3 4; If this check fails please read test/CodeGen/AArch64/README for instructions on how to resolve it. 5; WARN-NOT: warning 6 7; 8; HISTCNT 9; 10 11define <vscale x 4 x i32> @histcnt_i32(<vscale x 4 x i1> %pg, <vscale x 4 x i32> %a, <vscale x 4 x i32> %b) { 12; CHECK-LABEL: histcnt_i32: 13; CHECK: histcnt z0.s, p0/z, z0.s, z1.s 14; CHECK-NEXT: ret 15 %out = call <vscale x 4 x i32> @llvm.aarch64.sve.histcnt.nxv4i32(<vscale x 4 x i1> %pg, 16 <vscale x 4 x i32> %a, 17 <vscale x 4 x i32> %b) 18 ret <vscale x 4 x i32> %out 19} 20 21define <vscale x 2 x i64> @histcnt_i64(<vscale x 2 x i1> %pg, <vscale x 2 x i64> %a, <vscale x 2 x i64> %b) { 22; CHECK-LABEL: histcnt_i64: 23; CHECK: histcnt z0.d, p0/z, z0.d, z1.d 24; CHECK-NEXT: ret 25 %out = call <vscale x 2 x i64> @llvm.aarch64.sve.histcnt.nxv2i64(<vscale x 2 x i1> %pg, 26 <vscale x 2 x i64> %a, 27 <vscale x 2 x i64> %b) 28 ret <vscale x 2 x i64> %out 29} 30 31; 32; HISTSEG 33; 34 35define <vscale x 16 x i8> @histseg(<vscale x 16 x i8> %a, <vscale x 16 x i8> %b) { 36; CHECK-LABEL: histseg: 37; CHECK: histseg z0.b, z0.b, z1.b 38; CHECK-NEXT: ret 39 %out = call <vscale x 16 x i8> @llvm.aarch64.sve.histseg.nxv16i8(<vscale x 16 x i8> %a, 40 <vscale x 16 x i8> %b) 41 ret <vscale x 16 x i8> %out 42} 43 44declare <vscale x 4 x i32> @llvm.aarch64.sve.histcnt.nxv4i32(<vscale x 4 x i1>, <vscale x 4 x i32>, <vscale x 4 x i32>) 45declare <vscale x 2 x i64> @llvm.aarch64.sve.histcnt.nxv2i64(<vscale x 2 x i1>, <vscale x 2 x i64>, <vscale x 2 x i64>) 46declare <vscale x 16 x i8> @llvm.aarch64.sve.histseg.nxv16i8(<vscale x 16 x i8>, <vscale x 16 x i8>) 47