xref: /llvm-project/clang/test/CodeGen/AArch64/sve-intrinsics/acle_sve_dupq_const.c (revision 207e5ccceec8d3cc3f32723e78f2a142bc61b07d)
1*207e5cccSFangrui Song // REQUIRES: aarch64-registered-target
2*207e5cccSFangrui Song // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -S -O1 -Werror -Wall -o - %s | FileCheck %s
3*207e5cccSFangrui Song 
4*207e5cccSFangrui Song #include <arm_sve.h>
5*207e5cccSFangrui Song 
6*207e5cccSFangrui Song svbool_t test_svdupq_n_b8_const()
7*207e5cccSFangrui Song {
8*207e5cccSFangrui Song   // CHECK-LABEL: test_svdupq_n_b8_const
9*207e5cccSFangrui Song   // CHECK: ptrue p0.h
10*207e5cccSFangrui Song   // CHECK-NEXT: ret
11*207e5cccSFangrui Song   return svdupq_n_b8(1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0);
12*207e5cccSFangrui Song }
13*207e5cccSFangrui Song 
14*207e5cccSFangrui Song svbool_t test_svdupq_n_b16_const()
15*207e5cccSFangrui Song {
16*207e5cccSFangrui Song   // CHECK-LABEL: test_svdupq_n_b16_const
17*207e5cccSFangrui Song   // CHECK: ptrue p0.h
18*207e5cccSFangrui Song   // CHECK-NEXT: ret
19*207e5cccSFangrui Song   return svdupq_n_b16(1, 1, 1, 1, 1, 1, 1, 1);
20*207e5cccSFangrui Song }
21*207e5cccSFangrui Song 
22*207e5cccSFangrui Song svbool_t test_svdupq_n_b32_const()
23*207e5cccSFangrui Song {
24*207e5cccSFangrui Song   // CHECK-LABEL: test_svdupq_n_b32_const
25*207e5cccSFangrui Song   // CHECK: ptrue p0.s
26*207e5cccSFangrui Song   // CHECK-NEXT: ret
27*207e5cccSFangrui Song   return svdupq_n_b32(1, 1, 1, 1);
28*207e5cccSFangrui Song }
29*207e5cccSFangrui Song 
30*207e5cccSFangrui Song svbool_t test_svdupq_n_b64_const()
31*207e5cccSFangrui Song {
32*207e5cccSFangrui Song   // CHECK-LABEL: test_svdupq_n_b64_const
33*207e5cccSFangrui Song   // CHECK: ptrue p0.d
34*207e5cccSFangrui Song   // CHECK-NEXT: ret
35*207e5cccSFangrui Song   return svdupq_n_b64(1, 1);
36*207e5cccSFangrui Song }
37