Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / CodeGen / AArch64 / sve-vector-bits-codegen.c
blob692d11d97f48611a41b582a0c2b07508fd1fe895
1 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -O2 -S \
2 // RUN: -mllvm -prefer-predicate-over-epilogue=scalar-epilogue -o - %s -mvscale-min=2 -mvscale-max=2 | FileCheck %s --check-prefixes=CHECK,CHECK256
3 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -O2 -S \
4 // RUN: -mllvm -prefer-predicate-over-epilogue=scalar-epilogue -o - %s -mvscale-min=4 -mvscale-max=4 | FileCheck %s --check-prefixes=CHECK,CHECK512
5 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -O2 -S \
6 // RUN: -mllvm -prefer-predicate-over-epilogue=scalar-epilogue -o - %s -mvscale-min=8 -mvscale-max=8 | FileCheck %s --check-prefixes=CHECK,CHECK1024
7 // RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -O2 -S \
8 // RUN: -mllvm -prefer-predicate-over-epilogue=scalar-epilogue -o - %s -mvscale-min=16 -mvscale-max=16 | FileCheck %s --check-prefixes=CHECK,CHECK2048
10 // REQUIRES: aarch64-registered-target
12 #include <arm_sve.h>
14 void func(int *restrict a, int *restrict b) {
15 // CHECK-LABEL: func
16 // CHECK256-COUNT-8: st1w
17 // CHECK512-COUNT-4: st1w
18 // CHECK1024-COUNT-2: st1w
19 // CHECK2048-COUNT-1: st1w
20 #pragma clang loop vectorize(enable)
21 for (int i = 0; i < 64; ++i)
22 a[i] += b[i];