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