• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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; FLOGB
9;
10
11define <vscale x 8 x i16> @flogb_f16(<vscale x 8 x i16> %a, <vscale x 8 x i1> %pg, <vscale x 8 x half> %b) {
12; CHECK-LABEL: flogb_f16:
13; CHECK: flogb z0.h, p0/m, z1.h
14; CHECK-NEXT: ret
15  %out = call <vscale x 8 x i16> @llvm.aarch64.sve.flogb.nxv8f16(<vscale x 8 x i16> %a,
16                                                                 <vscale x 8 x i1> %pg,
17                                                                 <vscale x 8 x half> %b)
18  ret <vscale x 8 x i16> %out
19}
20
21define <vscale x 4 x i32> @flogb_f32(<vscale x 4 x i32> %a, <vscale x 4 x i1> %pg, <vscale x 4 x float> %b) {
22; CHECK-LABEL: flogb_f32:
23; CHECK: flogb z0.s, p0/m, z1.s
24; CHECK-NEXT: ret
25  %out = call <vscale x 4 x i32> @llvm.aarch64.sve.flogb.nxv4f32(<vscale x 4 x i32> %a,
26                                                                 <vscale x 4 x i1> %pg,
27                                                                 <vscale x 4 x float> %b)
28  ret <vscale x 4 x i32> %out
29}
30
31define <vscale x 2 x i64> @flogb_f64(<vscale x 2 x i64> %a, <vscale x 2 x i1> %pg, <vscale x 2 x double> %b) {
32; CHECK-LABEL: flogb_f64:
33; CHECK: flogb z0.d, p0/m, z1.d
34; CHECK-NEXT: ret
35  %out = call <vscale x 2 x i64> @llvm.aarch64.sve.flogb.nxv2f64(<vscale x 2 x i64> %a,
36                                                                 <vscale x 2 x i1> %pg,
37                                                                 <vscale x 2 x double> %b)
38  ret <vscale x 2 x i64> %out
39}
40
41declare <vscale x 8 x i16> @llvm.aarch64.sve.flogb.nxv8f16(<vscale x 8 x i16>, <vscale x 8 x i1>, <vscale x 8 x half>)
42declare <vscale x 4 x i32> @llvm.aarch64.sve.flogb.nxv4f32(<vscale x 4 x i32>, <vscale x 4 x i1>, <vscale x 4 x float>)
43declare <vscale x 2 x i64> @llvm.aarch64.sve.flogb.nxv2f64(<vscale x 2 x i64>, <vscale x 2 x i1>, <vscale x 2 x double>)
44