; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve < %s 2>%t | FileCheck %s ; RUN: FileCheck --check-prefix=WARN --allow-empty %s <%t ; If this check fails please read test/CodeGen/AArch64/README for instructions on how to resolve it. ; WARN-NOT: warning ; ; Converting to svbool_t () ; define @reinterpret_bool_from_b( %pg) { ; CHECK-LABEL: reinterpret_bool_from_b: ; CHECK: ret %out = call @llvm.aarch64.sve.convert.to.svbool.nxv16i1( %pg) ret %out } define @reinterpret_bool_from_h( %pg) { ; CHECK-LABEL: reinterpret_bool_from_h: ; CHECK: ptrue p1.h ; CHECK-NEXT: ptrue p2.b ; CHECK-NEXT: and p0.b, p2/z, p0.b, p1.b ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.convert.to.svbool.nxv8i1( %pg) ret %out } define @reinterpret_bool_from_s( %pg) { ; CHECK-LABEL: reinterpret_bool_from_s: ; CHECK: ptrue p1.s ; CHECK-NEXT: ptrue p2.b ; CHECK-NEXT: and p0.b, p2/z, p0.b, p1.b ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.convert.to.svbool.nxv4i1( %pg) ret %out } define @reinterpret_bool_from_d( %pg) { ; CHECK-LABEL: reinterpret_bool_from_d: ; CHECK: ptrue p1.d ; CHECK-NEXT: ptrue p2.b ; CHECK-NEXT: and p0.b, p2/z, p0.b, p1.b ; CHECK-NEXT: ret %out = call @llvm.aarch64.sve.convert.to.svbool.nxv2i1( %pg) ret %out } ; ; Converting from svbool_t ; define @reinterpret_bool_to_b( %pg) { ; CHECK-LABEL: reinterpret_bool_to_b: ; CHECK: ret %out = call @llvm.aarch64.sve.convert.from.svbool.nxv16i1( %pg) ret %out } define @reinterpret_bool_to_h( %pg) { ; CHECK-LABEL: reinterpret_bool_to_h: ; CHECK: ret %out = call @llvm.aarch64.sve.convert.from.svbool.nxv8i1( %pg) ret %out } define @reinterpret_bool_to_s( %pg) { ; CHECK-LABEL: reinterpret_bool_to_s: ; CHECK: ret %out = call @llvm.aarch64.sve.convert.from.svbool.nxv4i1( %pg) ret %out } define @reinterpret_bool_to_d( %pg) { ; CHECK-LABEL: reinterpret_bool_to_d: ; CHECK: ret %out = call @llvm.aarch64.sve.convert.from.svbool.nxv2i1( %pg) ret %out } declare @llvm.aarch64.sve.convert.to.svbool.nxv16i1() declare @llvm.aarch64.sve.convert.to.svbool.nxv8i1() declare @llvm.aarch64.sve.convert.to.svbool.nxv4i1() declare @llvm.aarch64.sve.convert.to.svbool.nxv2i1() declare @llvm.aarch64.sve.convert.from.svbool.nxv16i1() declare @llvm.aarch64.sve.convert.from.svbool.nxv8i1() declare @llvm.aarch64.sve.convert.from.svbool.nxv4i1() declare @llvm.aarch64.sve.convert.from.svbool.nxv2i1()