| 1 |
// RUN: %clang --target=loongarch64 -msingle-float -fsyntax-only %s -### 2>&1 | \ |
| 2 |
// RUN: FileCheck %s --check-prefix=CC1 |
| 3 |
// RUN: %clang --target=loongarch64 -msingle-float -mfpu=32 -mabi=lp64f -fsyntax-only %s -### 2>&1 | \ |
| 4 |
// RUN: FileCheck %s --check-prefixes=CC1,NOWARN |
| 5 |
// RUN: %clang --target=loongarch64 -msingle-float -mfpu=64 -mabi=lp64s -fsyntax-only %s -### 2>&1 | \ |
| 6 |
// RUN: FileCheck %s --check-prefixes=CC1,WARN |
| 7 |
// RUN: %clang --target=loongarch64 -msingle-float -S -emit-llvm %s -o - | \ |
| 8 |
// RUN: FileCheck %s --check-prefix=IR |
| 9 |
|
| 10 |
// NOWARN-NOT: warning: |
| 11 |
// WARN: warning: ignoring '-mabi=lp64s' as it conflicts with that implied by '-msingle-float' (lp64f) |
| 12 |
// WARN: warning: ignoring '-mfpu=64' as it conflicts with that implied by '-msingle-float' (32) |
| 13 |
|
| 14 |
// CC1: "-target-feature" "+f"{{.*}} "-target-feature" "-d" "-target-feature" "-lsx" |
| 15 |
// CC1: "-target-abi" "lp64f" |
| 16 |
|
| 17 |
// IR: attributes #[[#]] ={{.*}}"target-features"="{{(.*,)?}}+f,{{(.*,)?}}-d,-lsx" |
| 18 |
|
| 19 |
int foo(void) { |
| 20 |
return 3; |
| 21 |
} |