| 1 |
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py |
| 2 |
// REQUIRES: aarch64-registered-target |
| 3 |
// RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +sve2 -target-feature +sve2p1 -O1 -Werror -emit-llvm -o - %s | FileCheck %s |
| 4 |
// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -target-feature +sme2 -O1 -Werror -emit-llvm -o - %s | FileCheck %s |
| 5 |
// RUN: %clang_cc1 -triple aarch64 -target-feature +sve -target-feature +sve2 -target-feature +sve2p1 -O1 -Werror -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefix=CPP-CHECK |
| 6 |
// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -target-feature +sme2 -O1 -Werror -emit-llvm -o - -x c++ %s | FileCheck %s -check-prefix=CPP-CHECK |
| 7 |
|
| 8 |
#include <arm_sve.h> |
| 9 |
|
| 10 |
#ifdef __ARM_FEATURE_SME |
| 11 |
#define ATTR __arm_streaming |
| 12 |
#else |
| 13 |
#define ATTR |
| 14 |
#endif |
| 15 |
|
| 16 |
// CHECK-LABEL: @test_svptrue_c8( |
| 17 |
// CHECK-NEXT: entry: |
| 18 |
// CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.ptrue.c8() |
| 19 |
// CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]] |
| 20 |
// |
| 21 |
// CPP-CHECK-LABEL: @_Z15test_svptrue_c8v( |
| 22 |
// CPP-CHECK-NEXT: entry: |
| 23 |
// CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.ptrue.c8() |
| 24 |
// CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]] |
| 25 |
// |
| 26 |
svcount_t test_svptrue_c8(void) ATTR { |
| 27 |
return svptrue_c8(); |
| 28 |
} |
| 29 |
|
| 30 |
// CHECK-LABEL: @test_svptrue_c16( |
| 31 |
// CHECK-NEXT: entry: |
| 32 |
// CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.ptrue.c16() |
| 33 |
// CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]] |
| 34 |
// |
| 35 |
// CPP-CHECK-LABEL: @_Z16test_svptrue_c16v( |
| 36 |
// CPP-CHECK-NEXT: entry: |
| 37 |
// CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.ptrue.c16() |
| 38 |
// CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]] |
| 39 |
// |
| 40 |
svcount_t test_svptrue_c16(void) ATTR { |
| 41 |
return svptrue_c16(); |
| 42 |
} |
| 43 |
|
| 44 |
// CHECK-LABEL: @test_svptrue_c32( |
| 45 |
// CHECK-NEXT: entry: |
| 46 |
// CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.ptrue.c32() |
| 47 |
// CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]] |
| 48 |
// |
| 49 |
// CPP-CHECK-LABEL: @_Z16test_svptrue_c32v( |
| 50 |
// CPP-CHECK-NEXT: entry: |
| 51 |
// CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.ptrue.c32() |
| 52 |
// CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]] |
| 53 |
// |
| 54 |
svcount_t test_svptrue_c32(void) ATTR { |
| 55 |
return svptrue_c32(); |
| 56 |
} |
| 57 |
|
| 58 |
// CHECK-LABEL: @test_svptrue_c64( |
| 59 |
// CHECK-NEXT: entry: |
| 60 |
// CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.ptrue.c64() |
| 61 |
// CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]] |
| 62 |
// |
| 63 |
// CPP-CHECK-LABEL: @_Z16test_svptrue_c64v( |
| 64 |
// CPP-CHECK-NEXT: entry: |
| 65 |
// CPP-CHECK-NEXT: [[TMP0:%.*]] = tail call target("aarch64.svcount") @llvm.aarch64.sve.ptrue.c64() |
| 66 |
// CPP-CHECK-NEXT: ret target("aarch64.svcount") [[TMP0]] |
| 67 |
// |
| 68 |
svcount_t test_svptrue_c64(void) ATTR { |
| 69 |
return svptrue_c64(); |
| 70 |
} |