30 lines · c
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-SCQ5// RUN: %clang --target=loongarch64 -mno-scq -fsyntax-only %s -### 2>&1 | \6// RUN: FileCheck %s --check-prefix=CC1-NO-SCQ7// RUN: %clang --target=loongarch64 -mno-scq -mscq -fsyntax-only %s -### 2>&1 | \8// RUN: FileCheck %s --check-prefix=CC1-SCQ9// RUN: %clang --target=loongarch64 -mscq -mno-scq -fsyntax-only %s -### 2>&1 | \10// RUN: FileCheck %s --check-prefix=CC1-NO-SCQ11 12// RUN: %clang --target=loongarch64 -mscq -S -emit-llvm %s -o - | \13// RUN: FileCheck %s --check-prefix=IR-SCQ14// RUN: %clang --target=loongarch64 -mno-scq -S -emit-llvm %s -o - | \15// RUN: FileCheck %s --check-prefix=IR-NO-SCQ16// RUN: %clang --target=loongarch64 -mno-scq -mscq -S -emit-llvm %s -o - | \17// RUN: FileCheck %s --check-prefix=IR-SCQ18// RUN: %clang --target=loongarch64 -mscq -mno-scq -S -emit-llvm %s -o - | \19// RUN: FileCheck %s --check-prefix=IR-NO-SCQ20 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 28int foo(void) {29 return 42;30}