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