1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=thumbv8.1m.main-none-eabi -mattr=+mve --verify-machineinstrs %s -o - | FileCheck %s
4 define void @vctp8(i32 %arg, <16 x i8> *%in, <16 x i8>* %out) {
7 ; CHECK-NEXT: vctp.8 r0
8 ; CHECK-NEXT: vldrw.u32 q1, [r1]
9 ; CHECK-NEXT: vmov.i32 q0, #0x0
10 ; CHECK-NEXT: vpsel q0, q1, q0
11 ; CHECK-NEXT: vstrw.32 q0, [r2]
13 %pred = call <16 x i1> @llvm.arm.vctp8(i32 %arg)
14 %ld = load <16 x i8>, <16 x i8>* %in
15 %res = select <16 x i1> %pred, <16 x i8> %ld, <16 x i8> zeroinitializer
16 store <16 x i8> %res, <16 x i8>* %out
20 define void @vctp16(i32 %arg, <8 x i16> *%in, <8 x i16>* %out) {
21 ; CHECK-LABEL: vctp16:
23 ; CHECK-NEXT: vctp.16 r0
24 ; CHECK-NEXT: vldrw.u32 q1, [r1]
25 ; CHECK-NEXT: vmov.i32 q0, #0x0
26 ; CHECK-NEXT: vpsel q0, q1, q0
27 ; CHECK-NEXT: vstrw.32 q0, [r2]
29 %pred = call <8 x i1> @llvm.arm.vctp16(i32 %arg)
30 %ld = load <8 x i16>, <8 x i16>* %in
31 %res = select <8 x i1> %pred, <8 x i16> %ld, <8 x i16> zeroinitializer
32 store <8 x i16> %res, <8 x i16>* %out
36 define void @vctp32(i32 %arg, <4 x i32> *%in, <4 x i32>* %out) {
37 ; CHECK-LABEL: vctp32:
39 ; CHECK-NEXT: vctp.32 r0
40 ; CHECK-NEXT: vldrw.u32 q1, [r1]
41 ; CHECK-NEXT: vmov.i32 q0, #0x0
42 ; CHECK-NEXT: vpsel q0, q1, q0
43 ; CHECK-NEXT: vstrw.32 q0, [r2]
45 %pred = call <4 x i1> @llvm.arm.vctp32(i32 %arg)
46 %ld = load <4 x i32>, <4 x i32>* %in
47 %res = select <4 x i1> %pred, <4 x i32> %ld, <4 x i32> zeroinitializer
48 store <4 x i32> %res, <4 x i32>* %out
52 declare <16 x i1> @llvm.arm.vctp8(i32)
53 declare <8 x i1> @llvm.arm.vctp16(i32)
54 declare <4 x i1> @llvm.arm.vctp32(i32)