1 // REQUIRES: aarch64-registered-target
2 // This test is making sure that no crash happens.
4 // RUN: %clang -o - -fno-fast-math -S -target aarch64-linux-gnu \
5 // RUN: -fopenmp -O3 -march=armv8-a -c %s | FileCheck %s
7 // RUN: %clang -o - -fno-fast-math -S -target aarch64-linux-gnu \
8 // RUN: -fopenmp-simd -O3 -march=armv8-a -c %s | FileCheck %s
10 // RUN: %clang -o - -fno-fast-math -S -target aarch64-linux-gnu \
11 // RUN: -fopenmp -O3 -march=armv8-a+sve -c %s | FileCheck %s
13 // RUN: %clang -o - -fno-fast-math -S -target aarch64-linux-gnu \
14 // RUN: -fopenmp-simd -O3 -march=armv8-a+sve -c %s | FileCheck %s
16 // loop in the user code, in user_code.c
17 #include "Inputs/declare-simd-fix.h"
19 // CHECK-LABEL: do_something:
20 void do_something(int *a
, double *b
, unsigned N
) {
21 for (unsigned i
= 0; i
< N
; ++i
) {
22 a
[i
] = foo(b
[0], b
[0], 1);
26 // CHECK-LABEL: do_something_else:
27 void do_something_else(int *a
, double *b
, unsigned N
) {
28 for (unsigned i
= 0; i
< N
; ++i
) {
29 a
[i
] = foo(1.1, 1.2, 1);
33 // CHECK-LABEL: do_something_more:
34 void do_something_more(int *a
, double *b
, unsigned N
) {
35 for (unsigned i
= 0; i
< N
; ++i
) {
36 a
[i
] = foo(b
[i
], b
[i
], a
[1]);