[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / clang / test / Driver / loongarch-mlasx.c
blob0b934f125c9e462b5d7176367deb7ee90acd8b87
1 /// Test -m[no-]lasx options.
3 // RUN: %clang --target=loongarch64 -mlasx -fsyntax-only %s -### 2>&1 | \
4 // RUN: FileCheck %s --check-prefix=CC1-LASX
5 // RUN: %clang --target=loongarch64 -mno-lasx -fsyntax-only %s -### 2>&1 | \
6 // RUN: FileCheck %s --check-prefix=CC1-NOLASX
7 // RUN: %clang --target=loongarch64 -mlasx -mno-lasx -fsyntax-only %s -### 2>&1 | \
8 // RUN: FileCheck %s --check-prefix=CC1-NOLASX
9 // RUN: %clang --target=loongarch64 -mno-lasx -mlasx -fsyntax-only %s -### 2>&1 | \
10 // RUN: FileCheck %s --check-prefix=CC1-LASX
11 // RUN: %clang --target=loongarch64 -mlsx -mlasx -fsyntax-only %s -### 2>&1 | \
12 // RUN: FileCheck %s --check-prefix=CC1-LASX
13 // RUN: %clang --target=loongarch64 -mlasx -mlsx -fsyntax-only %s -### 2>&1 | \
14 // RUN: FileCheck %s --check-prefix=CC1-LASX
16 // RUN: %clang --target=loongarch64 -mlasx -S -emit-llvm %s -o - | \
17 // RUN: FileCheck %s --check-prefix=IR-LASX
18 // RUN: %clang --target=loongarch64 -mno-lasx -S -emit-llvm %s -o - | \
19 // RUN: FileCheck %s --check-prefix=IR-NOLASX
20 // RUN: %clang --target=loongarch64 -mlasx -mno-lasx -S -emit-llvm %s -o - | \
21 // RUN: FileCheck %s --check-prefix=IR-NOLASX
22 // RUN: %clang --target=loongarch64 -mno-lasx -mlasx -S -emit-llvm %s -o - | \
23 // RUN: FileCheck %s --check-prefix=IR-LASX
24 // RUN: %clang --target=loongarch64 -mlsx -mlasx -S -emit-llvm %s -o - | \
25 // RUN: FileCheck %s --check-prefix=IR-LASX
26 // RUN: %clang --target=loongarch64 -mlasx -mlsx -S -emit-llvm %s -o - | \
27 // RUN: FileCheck %s --check-prefix=IR-LASX
29 // CC1-LASX: "-target-feature" "+lsx" "-target-feature" "+lasx"
30 // CC1-NOLASX: "-target-feature" "-lasx"
32 // IR-LASX: attributes #[[#]] ={{.*}}"target-features"="{{(.*,)?}}+lasx{{(,.*)?}}"
33 // IR-NOLASX: attributes #[[#]] ={{.*}}"target-features"="{{(.*,)?}}-lasx{{(,.*)?}}"
35 int foo(void){
36 return 3;