1 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
2 // REQUIRES: aarch64-registered-target
3 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve2p1 -S -O1 -Werror -emit-llvm -o - %s | FileCheck %s
4 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve2p1 -S -O1 -Werror -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefix=CPP-CHECK
8 // CHECK-LABEL: @test_svptrue_c8(
10 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.ptrue.c8()
11 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
13 // CPP-CHECK-LABEL: @_Z15test_svptrue_c8v(
14 // CPP-CHECK-NEXT: entry:
15 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.ptrue.c8()
16 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
18 svcount_t
test_svptrue_c8(void) {
22 // CHECK-LABEL: @test_svptrue_c16(
24 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.ptrue.c16()
25 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
27 // CPP-CHECK-LABEL: @_Z16test_svptrue_c16v(
28 // CPP-CHECK-NEXT: entry:
29 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.ptrue.c16()
30 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
32 svcount_t
test_svptrue_c16(void) {
36 // CHECK-LABEL: @test_svptrue_c32(
38 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.ptrue.c32()
39 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
41 // CPP-CHECK-LABEL: @_Z16test_svptrue_c32v(
42 // CPP-CHECK-NEXT: entry:
43 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.ptrue.c32()
44 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
46 svcount_t
test_svptrue_c32(void) {
50 // CHECK-LABEL: @test_svptrue_c64(
52 // CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.ptrue.c64()
53 // CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
55 // CPP-CHECK-LABEL: @_Z16test_svptrue_c64v(
56 // CPP-CHECK-NEXT: entry:
57 // CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.ptrue.c64()
58 // CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]]
60 svcount_t
test_svptrue_c64(void) {