Debian Codegraph @

clang/test/Driver/loongarch-relax-features.c

raw
1 /// Test -m[no-]relax options.
2
3 // RUN: %clang --target=loongarch32 -S -emit-llvm %s -o - | FileCheck %s --check-prefix=LA32
4 // RUN: %clang --target=loongarch64 -S -emit-llvm %s -o - | FileCheck %s --check-prefix=LA64
5 // RUN: %clang --target=loongarch32 -mno-relax -S -emit-llvm %s -o - | FileCheck %s --check-prefix=LA32-NORELAX
6 // RUN: %clang --target=loongarch64 -mno-relax -S -emit-llvm %s -o - | FileCheck %s --check-prefix=LA64-NORELAX
7 // RUN: %clang --target=loongarch32 -mrelax -S -emit-llvm %s -o - | FileCheck %s --check-prefix=LA32-RELAX
8 // RUN: %clang --target=loongarch64 -mrelax -S -emit-llvm %s -o - | FileCheck %s --check-prefix=LA64-RELAX
9
10 // LA32: "target-features"="+32bit"
11 // LA64: "target-features"="+64bit,+d,+f,+lsx,+relax,+ual"
12
13 // LA32-NORELAX: "target-features"="+32bit,-relax"
14 // LA64-NORELAX: "target-features"="+64bit,+d,+f,+lsx,+ual,-relax"
15
16 // LA32-RELAX: "target-features"="+32bit,+relax"
17 // LA64-RELAX: "target-features"="+64bit,+d,+f,+lsx,+relax,+ual"
18
19 int foo(void) {
20 return 3;
21 }