[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / CodeGen / loop-vectorize.c
blobebebbbdfcbdcf9174fda572e098ae6d00ee166ae
1 // RUN: %clang_cc1 -triple x86_64 -target-cpu x86-64 -S -O1 -vectorize-loops -emit-llvm -o - %s | FileCheck %s -check-prefix=CHECK-ENABLE-VECT
2 // RUN: %clang_cc1 -triple x86_64 -target-cpu x86-64 -S -O1 -emit-llvm -o - %s | FileCheck %s -check-prefix=CHECK-DISABLE-VECT
3 // REQUIRES: x86-registered-target
5 // CHECK-ENABLE-VECT-LABEL: @for_test()
6 // CHECK-ENABLE-VECT: fmul <{{[0-9]+}} x double>
8 // CHECK-DISABLE-VECT-LABEL: @for_test()
9 // CHECK-DISABLE-VECT: fmul double
10 // CHECK-DISABLE-VECT-NOT: fmul <{{[0-9]+}} x double>
12 int printf(const char * restrict format, ...);
14 void for_test(void) {
15 double A[1000], B[1000];
16 int L = 500;
17 for (int i = 0; i < L; i++) {
18 A[i] = i;
20 for (int i = 0; i < L; i++) {
21 B[i] = A[i]*5;
23 printf("%lf %lf\n", A[0], B[0]);