1 // RUN: %clang --target=loongarch64 -march=loongarch64 -fsyntax-only %s -### 2>&1 | \
2 // RUN: FileCheck %s --check-prefix=CC1-LOONGARCH64
3 // RUN: %clang --target=loongarch64 -march=la464 -fsyntax-only %s -### 2>&1 | \
4 // RUN: FileCheck %s --check-prefix=CC1-LA464
5 // RUN: %clang --target=loongarch64 -march=la64v1.0 -fsyntax-only %s -### 2>&1 | \
6 // RUN: FileCheck %s --check-prefix=CC1-LA64V1P0
7 // RUN: %clang --target=loongarch64 -march=la64v1.1 -fsyntax-only %s -### 2>&1 | \
8 // RUN: FileCheck %s --check-prefix=CC1-LA64V1P1
9 // RUN: %clang --target=loongarch64 -march=la664 -fsyntax-only %s -### 2>&1 | \
10 // RUN: FileCheck %s --check-prefix=CC1-LA664
11 // RUN: %clang --target=loongarch64 -march=loongarch64 -S -emit-llvm %s -o - | \
12 // RUN: FileCheck %s --check-prefix=IR-LOONGARCH64
13 // RUN: %clang --target=loongarch64 -march=la464 -S -emit-llvm %s -o - | \
14 // RUN: FileCheck %s --check-prefix=IR-LA464
15 // RUN: %clang --target=loongarch64 -march=la64v1.0 -S -emit-llvm %s -o - | \
16 // RUN: FileCheck %s --check-prefix=IR-LA64V1P0
17 // RUN: %clang --target=loongarch64 -march=la64v1.1 -S -emit-llvm %s -o - | \
18 // RUN: FileCheck %s --check-prefix=IR-LA64V1P1
19 // RUN: %clang --target=loongarch64 -march=la664 -S -emit-llvm %s -o - | \
20 // RUN: FileCheck %s --check-prefix=IR-LA664
22 // CC1-LOONGARCH64: "-target-cpu" "loongarch64"
23 // CC1-LOONGARCH64-NOT: "-target-feature"
24 // CC1-LOONGARCH64: "-target-feature" "+64bit" "-target-feature" "+f" "-target-feature" "+d" "-target-feature" "+ual"
25 // CC1-LOONGARCH64-NOT: "-target-feature"
26 // CC1-LOONGARCH64: "-target-abi" "lp64d"
28 // CC1-LA464: "-target-cpu" "la464"
29 // CC1-LA464-NOT: "-target-feature"
30 // CC1-LA464: "-target-feature" "+64bit" "-target-feature" "+f" "-target-feature" "+d" "-target-feature" "+lsx" "-target-feature" "+lasx" "-target-feature" "+ual"
31 // CC1-LA464-NOT: "-target-feature"
32 // CC1-LA464: "-target-abi" "lp64d"
34 // CC1-LA64V1P0: "-target-cpu" "loongarch64"
35 // CC1-LA64V1P0-NOT: "-target-feature"
36 // CC1-LA64V1P0: "-target-feature" "+64bit" "-target-feature" "+d" "-target-feature" "+lsx" "-target-feature" "+ual"
37 // CC1-LA64V1P0-NOT: "-target-feature"
38 // CC1-LA64V1P0: "-target-abi" "lp64d"
40 // CC1-LA64V1P1: "-target-cpu" "loongarch64"
41 // CC1-LA64V1P1-NOT: "-target-feature"
42 // CC1-LA64V1P1: "-target-feature" "+64bit" "-target-feature" "+d" "-target-feature" "+lsx" "-target-feature" "+ual" "-target-feature" "+frecipe" "-target-feature" "+lam-bh"
43 // CC1-LA64V1P1-NOT: "-target-feature"
44 // CC1-LA64V1P1: "-target-abi" "lp64d"
46 // CC1-LA664: "-target-cpu" "la664"
47 // CC1-LA664-NOT: "-target-feature"
48 // CC1-LA664: "-target-feature" "+64bit" "-target-feature" "+f" "-target-feature" "+d" "-target-feature" "+lsx" "-target-feature" "+lasx" "-target-feature" "+ual" "-target-feature" "+frecipe" "-target-feature" "+lam-bh"
49 // CC1-LA664-NOT: "-target-feature"
50 // CC1-LA664: "-target-abi" "lp64d"
52 // IR-LOONGARCH64: attributes #[[#]] ={{.*}}"target-cpu"="loongarch64" {{.*}}"target-features"="+64bit,+d,+f,+ual"
53 // IR-LA464: attributes #[[#]] ={{.*}}"target-cpu"="la464" {{.*}}"target-features"="+64bit,+d,+f,+lasx,+lsx,+ual"
54 // IR-LA64V1P0: attributes #[[#]] ={{.*}}"target-cpu"="loongarch64" {{.*}}"target-features"="+64bit,+d,+lsx,+ual"
55 // IR-LA64V1P1: attributes #[[#]] ={{.*}}"target-cpu"="loongarch64" {{.*}}"target-features"="+64bit,+d,+frecipe,+lam-bh,+lsx,+ual"
56 // IR-LA664: attributes #[[#]] ={{.*}}"target-cpu"="la664" {{.*}}"target-features"="+64bit,+d,+f,+frecipe,+lam-bh,+lasx,+lsx,+ual"