Debian Codegraph @

clang/test/Driver/loongarch-mfrecipe.c

raw
1 /// Test -m[no]frecipe options.
2
3 // RUN: %clang --target=loongarch64 -mfrecipe -fsyntax-only %s -### 2>&1 | \
4 // RUN: FileCheck %s --check-prefix=CC1-FRECIPE
5 // RUN: %clang --target=loongarch64 -mno-frecipe -fsyntax-only %s -### 2>&1 | \
6 // RUN: FileCheck %s --check-prefix=CC1-NO-FRECIPE
7 // RUN: %clang --target=loongarch64 -mno-frecipe -mfrecipe -fsyntax-only %s -### 2>&1 | \
8 // RUN: FileCheck %s --check-prefix=CC1-FRECIPE
9 // RUN: %clang --target=loongarch64 -mfrecipe -mno-frecipe -fsyntax-only %s -### 2>&1 | \
10 // RUN: FileCheck %s --check-prefix=CC1-NO-FRECIPE
11
12 // RUN: %clang --target=loongarch64 -mfrecipe -S -emit-llvm %s -o - | \
13 // RUN: FileCheck %s --check-prefix=IR-FRECIPE
14 // RUN: %clang --target=loongarch64 -mno-frecipe -S -emit-llvm %s -o - | \
15 // RUN: FileCheck %s --check-prefix=IR-NO-FRECIPE
16 // RUN: %clang --target=loongarch64 -mno-frecipe -mfrecipe -S -emit-llvm %s -o - | \
17 // RUN: FileCheck %s --check-prefix=IR-FRECIPE
18 // RUN: %clang --target=loongarch64 -mfrecipe -mno-frecipe -S -emit-llvm %s -o - | \
19 // RUN: FileCheck %s --check-prefix=IR-NO-FRECIPE
20
21
22 // CC1-FRECIPE: "-target-feature" "+frecipe"
23 // CC1-NO-FRECIPE: "-target-feature" "-frecipe"
24
25 // IR-FRECIPE: attributes #[[#]] ={{.*}}"target-features"="{{(.*,)?}}+frecipe{{(,.*)?}}"
26 // IR-NO-FRECIPE: attributes #[[#]] ={{.*}}"target-features"="{{(.*,)?}}-frecipe{{(,.*)?}}"
27
28 int foo(void) {
29 return 42;
30 }