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