Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Driver / loongarch-march.c
blob9214130cd034fd58164b4860c5199d198f21f577
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=loongarch64 -S -emit-llvm %s -o - | \
6 // RUN: FileCheck %s --check-prefix=IR-LOONGARCH64
7 // RUN: %clang --target=loongarch64 -march=la464 -S -emit-llvm %s -o - | \
8 // RUN: FileCheck %s --check-prefix=IR-LA464
10 // CC1-LOONGARCH64: "-target-cpu" "loongarch64"
11 // CC1-LOONGARCH64-NOT: "-target-feature"
12 // CC1-LOONGARCH64: "-target-feature" "+64bit" "-target-feature" "+f" "-target-feature" "+d" "-target-feature" "+ual"
13 // CC1-LOONGARCH64-NOT: "-target-feature"
14 // CC1-LOONGARCH64: "-target-abi" "lp64d"
16 // CC1-LA464: "-target-cpu" "la464"
17 // CC1-LA464-NOT: "-target-feature"
18 // CC1-LA464: "-target-feature" "+64bit" "-target-feature" "+f" "-target-feature" "+d" "-target-feature" "+lsx" "-target-feature" "+lasx" "-target-feature" "+ual"
19 // CC1-LA464-NOT: "-target-feature"
20 // CC1-LA464: "-target-abi" "lp64d"
22 // IR-LOONGARCH64: attributes #[[#]] ={{.*}}"target-cpu"="loongarch64" {{.*}}"target-features"="+64bit,+d,+f,+ual"
23 // IR-LA464: attributes #[[#]] ={{.*}}"target-cpu"="la464" {{.*}}"target-features"="+64bit,+d,+f,+lasx,+lsx,+ual"
25 int foo(void) {
26 return 3;