35 lines · c
1// RUN: %clang --target=loongarch64 -mfpu=64 -fsyntax-only %s -### 2>&1 | \2// RUN: FileCheck %s --check-prefix=CC1-FPU643// RUN: %clang --target=loongarch64 -mfpu=32 -fsyntax-only %s -### 2>&1 | \4// RUN: FileCheck %s --check-prefix=CC1-FPU325// RUN: %clang --target=loongarch64 -mfpu=0 -fsyntax-only %s -### 2>&1 | \6// RUN: FileCheck %s --check-prefix=CC1-FPU07// RUN: %clang --target=loongarch64 -mfpu=none -fsyntax-only %s -### 2>&1 | \8// RUN: FileCheck %s --check-prefix=CC1-FPU09 10// RUN: %clang --target=loongarch64 -mfpu=64 -S -emit-llvm %s -o - | \11// RUN: FileCheck %s --check-prefix=IR-FPU6412// RUN: %clang --target=loongarch64 -mfpu=32 -S -emit-llvm %s -o - | \13// RUN: FileCheck %s --check-prefix=IR-FPU3214// RUN: %clang --target=loongarch64 -mfpu=0 -S -emit-llvm %s -o - | \15// RUN: FileCheck %s --check-prefix=IR-FPU016// RUN: %clang --target=loongarch64 -mfpu=none -S -emit-llvm %s -o - | \17// RUN: FileCheck %s --check-prefix=IR-FPU018 19// CC1-FPU64: "-target-feature" "+f"{{.*}} "-target-feature" "+d"20// CC1-FPU64: "-target-abi" "lp64d"21 22// CC1-FPU32: "-target-feature" "+f"{{.*}} "-target-feature" "-d"23// CC1-FPU32: "-target-abi" "lp64f"24 25// CC1-FPU0: "-target-feature" "-f"{{.*}} "-target-feature" "-d"26// CC1-FPU0: "-target-abi" "lp64s"27 28// IR-FPU64: attributes #[[#]] ={{.*}}"target-features"="{{(.*,)?}}+d,{{(.*,)?}}+f{{(,.*)?}}"29// IR-FPU32: attributes #[[#]] ={{.*}}"target-features"="{{(.*,)?}}+f,{{(.*,)?}}-d{{(,.*)?}}"30// IR-FPU0: attributes #[[#]] ={{.*}}"target-features"="{{(.*,)?}}-d,{{(.*,)?}}-f{{(,.*)?}}"31 32int foo(void) {33 return 3;34}35