39 lines · c
1// REQUIRES: aarch64-registered-target2// This test is making sure that no crash happens.3 4// RUN: %clang -o - -fno-fast-math -S -target aarch64-linux-gnu \5// RUN: -fopenmp -O3 -march=armv8-a -c %s | FileCheck %s6 7// RUN: %clang -o - -fno-fast-math -S -target aarch64-linux-gnu \8// RUN: -fopenmp-simd -O3 -march=armv8-a -c %s | FileCheck %s9 10// RUN: %clang -o - -fno-fast-math -S -target aarch64-linux-gnu \11// RUN: -fopenmp -O3 -march=armv8-a+sve -c %s | FileCheck %s12 13// RUN: %clang -o - -fno-fast-math -S -target aarch64-linux-gnu \14// RUN: -fopenmp-simd -O3 -march=armv8-a+sve -c %s | FileCheck %s15 16// loop in the user code, in user_code.c17#include "Inputs/declare-simd-fix.h"18 19// CHECK-LABEL: do_something:20void 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);23 }24}25 26// CHECK-LABEL: do_something_else:27void 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);30 }31}32 33// CHECK-LABEL: do_something_more:34void 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]);37 }38}39