| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,40 +1,40 @@ | ||
| // RUN: %clang --target=armv7 -### -fsyntax-only %s 2> %t \ | ||
| // RUN: -mno-global-merge | ||
| // RUN: FileCheck --check-prefix=CHECK-NGM-ARM < %t %s | ||
|
|
||
| // RUN: %clang --target=aarch64 -### -fsyntax-only %s 2> %t \ | ||
| // RUN: -mno-global-merge | ||
| // RUN: FileCheck --check-prefix=CHECK-NGM-AARCH64 < %t %s | ||
|
|
||
| // RUN: %clang --target=x86_64 -### -fsyntax-only %s 2> %t \ | ||
| // RUN: -mno-global-merge | ||
| // RUN: FileCheck --check-prefix=CHECK-NONE < %t %s | ||
|
|
||
| // CHECK-NGM-ARM: "-mllvm" "-arm-global-merge=false" | ||
| // CHECK-NGM-AARCH64: "-mllvm" "-aarch64-enable-global-merge=false" | ||
|
|
||
| // RUN: %clang --target=armv7 -### -fsyntax-only %s 2> %t \ | ||
| // RUN: -mglobal-merge | ||
| // RUN: FileCheck --check-prefix=CHECK-GM-ARM < %t %s | ||
|
|
||
| // RUN: %clang --target=aarch64 -### -fsyntax-only %s 2> %t \ | ||
| // RUN: -mglobal-merge | ||
| // RUN: FileCheck --check-prefix=CHECK-GM-AARCH64 < %t %s | ||
|
|
||
| // RUN: %clang --target=x86_64 -### -fsyntax-only %s 2> %t \ | ||
| // RUN: -mglobal-merge | ||
| // RUN: FileCheck --check-prefix=CHECK-NONE < %t %s | ||
|
|
||
| // CHECK-GM-ARM: "-mllvm" "-arm-global-merge=true" | ||
| // CHECK-GM-AARCH64: "-mllvm" "-aarch64-enable-global-merge=true" | ||
|
|
||
| // RUN: %clang --target=armv7 -### -fsyntax-only %s 2> %t | ||
| // RUN: FileCheck --check-prefix=CHECK-NONE < %t %s | ||
|
|
||
| // RUN: %clang --target=aarch64 -### -fsyntax-only %s 2> %t | ||
| // RUN: FileCheck --check-prefix=CHECK-NONE < %t %s | ||
|
|
||
| // RUN: %clang --target=x86_64 -### -fsyntax-only %s 2> %t | ||
| // RUN: FileCheck --check-prefix=CHECK-NONE < %t %s | ||
|
|
||
| // CHECK-NONE-NOT: -global-merge= |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,10 @@ | ||
| // Test how an implicit .exe extension is added. | ||
|
|
||
| // RUN: %clang --target=i686-windows-gnu -### --sysroot=%S/Inputs/mingw_clang_tree/mingw32 %s -o outputname 2>&1 | FileCheck %s --check-prefix=CHECK-OUTPUTNAME-EXE | ||
|
|
||
| // RUN: %clang --target=i686-windows-gnu -### --sysroot=%S/Inputs/mingw_clang_tree/mingw32 %s -o outputname.exe 2>&1 | FileCheck %s --check-prefix=CHECK-OUTPUTNAME-EXE | ||
|
|
||
| // RUN: %clang --target=i686-windows-gnu -### --sysroot=%S/Inputs/mingw_clang_tree/mingw32 %s -o outputname.q 2>&1 | FileCheck %s --check-prefix=CHECK-OUTPUTNAME-Q | ||
|
|
||
| // CHECK-OUTPUTNAME-EXE: "-o" "outputname.exe" | ||
| // CHECK-OUTPUTNAME-Q: "-o" "outputname.q" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,86 +1,86 @@ | ||
| // RUN: %clang --target=i686-windows-gnu -rtlib=platform -c -### --sysroot=%S/Inputs/mingw_clang_tree/mingw32 %s 2>&1 | FileCheck -check-prefix=CHECK_MINGW_CLANG_TREE %s | ||
| // CHECK_MINGW_CLANG_TREE: "[[BASE:[^"]+]]/Inputs/mingw_clang_tree/mingw32{{/|\\\\}}i686-w64-mingw32{{/|\\\\}}include" | ||
| // CHECK_MINGW_CLANG_TREE: "[[BASE:[^"]+]]/Inputs/mingw_clang_tree/mingw32{{/|\\\\}}i686-w64-mingw32{{/|\\\\}}usr{{/|\\\\}}include" | ||
| // CHECK_MINGW_CLANG_TREE: "[[BASE]]/Inputs/mingw_clang_tree/mingw32{{/|\\\\}}include" | ||
|
|
||
|
|
||
| // RUN: %clang --target=i686-windows-gnu -rtlib=platform -stdlib=libc++ -c -### --sysroot=%S/Inputs/mingw_clang_tree/mingw32 %s 2>&1 | FileCheck -check-prefix=CHECK_MINGW_CLANG_TREE_LIBCXX %s | ||
| // CHECK_MINGW_CLANG_TREE_LIBCXX: "[[BASE:[^"]+]]/Inputs/mingw_clang_tree/mingw32{{/|\\\\}}include{{/|\\\\}}i686-unknown-windows-gnu{{/|\\\\}}c++{{/|\\\\}}v1" | ||
| // CHECK_MINGW_CLANG_TREE_LIBCXX: "[[BASE:[^"]+]]/Inputs/mingw_clang_tree/mingw32{{/|\\\\}}i686-w64-mingw32{{/|\\\\}}include{{/|\\\\}}c++{{/|\\\\}}v1" | ||
|
|
||
|
|
||
| // RUN: %clang --target=i686-pc-windows-gnu -rtlib=platform -stdlib=libstdc++ -c -### --sysroot=%S/Inputs/mingw_mingw_org_tree/mingw %s 2>&1 | FileCheck -check-prefix=CHECK_MINGW_ORG_TREE %s | ||
| // CHECK_MINGW_ORG_TREE: "[[BASE:[^"]+]]/Inputs/mingw_mingw_org_tree/mingw{{/|\\\\}}lib{{/|\\\\}}gcc{{/|\\\\}}mingw32{{/|\\\\}}4.8.1{{/|\\\\}}include{{/|\\\\}}c++" | ||
| // CHECK_MINGW_ORG_TREE: "[[BASE]]/Inputs/mingw_mingw_org_tree/mingw{{/|\\\\}}lib{{/|\\\\}}gcc{{/|\\\\}}mingw32{{/|\\\\}}4.8.1{{/|\\\\}}include{{/|\\\\}}c++{{/|\\\\}}mingw32" | ||
| // CHECK_MINGW_ORG_TREE: "[[BASE]]/Inputs/mingw_mingw_org_tree/mingw{{/|\\\\}}lib{{/|\\\\}}gcc{{/|\\\\}}mingw32{{/|\\\\}}4.8.1{{/|\\\\}}include{{/|\\\\}}c++{{/|\\\\}}backward" | ||
| // CHECK_MINGW_ORG_TREE: "[[BASE]]/Inputs/mingw_mingw_org_tree/mingw{{/|\\\\}}mingw32{{/|\\\\}}include" | ||
| // CHECK_MINGW_ORG_TREE: "[[BASE]]/Inputs/mingw_mingw_org_tree/mingw{{/|\\\\}}include" | ||
|
|
||
|
|
||
| // RUN: %clang --target=i686-pc-windows-gnu -rtlib=platform -stdlib=libstdc++ -c -### --sysroot=%S/Inputs/mingw_mingw_builds_tree/mingw32 %s 2>&1 | FileCheck -check-prefix=CHECK_MINGW_BUILDS_TREE %s | ||
| // CHECK_MINGW_BUILDS_TREE: "[[BASE:[^"]+]]/Inputs/mingw_mingw_builds_tree/mingw32{{/|\\\\}}i686-w64-mingw32{{/|\\\\}}include{{/|\\\\}}c++" | ||
| // CHECK_MINGW_BUILDS_TREE: "[[BASE]]/Inputs/mingw_mingw_builds_tree/mingw32{{/|\\\\}}i686-w64-mingw32{{/|\\\\}}include{{/|\\\\}}c++{{/|\\\\}}i686-w64-mingw32" | ||
| // CHECK_MINGW_BUILDS_TREE: "[[BASE]]/Inputs/mingw_mingw_builds_tree/mingw32{{/|\\\\}}i686-w64-mingw32{{/|\\\\}}include{{/|\\\\}}c++{{/|\\\\}}backward" | ||
| // CHECK_MINGW_BUILDS_TREE: "[[BASE]]/Inputs/mingw_mingw_builds_tree/mingw32{{/|\\\\}}i686-w64-mingw32{{/|\\\\}}include" | ||
|
|
||
|
|
||
| // RUN: %clang --target=i686-pc-windows-gnu -rtlib=platform -stdlib=libstdc++ -c -### --sysroot=%S/Inputs/mingw_msys2_tree/msys64/mingw32 %s 2>&1 | FileCheck -check-prefix=CHECK_MINGW_MSYS_TREE %s | ||
| // CHECK_MINGW_MSYS_TREE: "[[BASE:[^"]+]]/Inputs/mingw_msys2_tree/msys64{{/|\\\\}}mingw32{{/|\\\\}}include{{/|\\\\}}c++{{/|\\\\}}4.9.2" | ||
| // CHECK_MINGW_MSYS_TREE: "[[BASE]]/Inputs/mingw_msys2_tree/msys64/mingw32{{/|\\\\}}include{{/|\\\\}}c++{{/|\\\\}}4.9.2{{/|\\\\}}i686-w64-mingw32" | ||
| // CHECK_MINGW_MSYS_TREE: "[[BASE]]/Inputs/mingw_msys2_tree/msys64/mingw32{{/|\\\\}}include{{/|\\\\}}c++{{/|\\\\}}4.9.2{{/|\\\\}}backward" | ||
| // CHECK_MINGW_MSYS_TREE: "[[BASE]]/Inputs/mingw_msys2_tree/msys64/mingw32{{/|\\\\}}i686-w64-mingw32{{/|\\\\}}include" | ||
| // CHECK_MINGW_MSYS_TREE: "[[BASE]]/Inputs/mingw_msys2_tree/msys64/mingw32{{/|\\\\}}include" | ||
|
|
||
|
|
||
| // RUN: %clang --target=x86_64-pc-windows-gnu -rtlib=platform -stdlib=libstdc++ -c -### --sysroot=%S/Inputs/mingw_opensuse_tree/usr %s 2>&1 | FileCheck -check-prefix=CHECK_MINGW_OPENSUSE_TREE %s | ||
| // CHECK_MINGW_OPENSUSE_TREE: "[[BASE:[^"]+]]/Inputs/mingw_opensuse_tree/usr{{/|\\\\}}lib64{{/|\\\\}}gcc{{/|\\\\}}x86_64-w64-mingw32{{/|\\\\}}5.1.0{{/|\\\\}}include{{/|\\\\}}c++" | ||
| // CHECK_MINGW_OPENSUSE_TREE: "[[BASE]]/Inputs/mingw_opensuse_tree/usr{{/|\\\\}}lib64{{/|\\\\}}gcc{{/|\\\\}}x86_64-w64-mingw32{{/|\\\\}}5.1.0{{/|\\\\}}include{{/|\\\\}}c++{{/|\\\\}}x86_64-w64-mingw32" | ||
| // CHECK_MINGW_OPENSUSE_TREE: "[[BASE]]/Inputs/mingw_opensuse_tree/usr{{/|\\\\}}lib64{{/|\\\\}}gcc{{/|\\\\}}x86_64-w64-mingw32{{/|\\\\}}5.1.0{{/|\\\\}}include{{/|\\\\}}c++{{/|\\\\}}backward" | ||
| // CHECK_MINGW_OPENSUSE_TREE: "[[BASE]]/Inputs/mingw_opensuse_tree/usr{{/|\\\\}}x86_64-w64-mingw32/sys-root/mingw{{/|\\\\}}include" | ||
|
|
||
|
|
||
| // RUN: %clang --target=x86_64-pc-windows-gnu -rtlib=platform -stdlib=libstdc++ -c -### --sysroot=%S/Inputs/mingw_fedora_tree/usr %s 2>&1 | FileCheck -check-prefix=CHECK_MINGW_FEDORA_TREE %s | ||
| // CHECK_MINGW_FEDORA_TREE: "[[BASE:[^"]+]]/Inputs/mingw_fedora_tree/usr{{/|\\\\}}x86_64-w64-mingw32ucrt/sys-root/mingw{{/|\\\\}}include{{/|\\\\}}c++" | ||
| // CHECK_MINGW_FEDORA_TREE: "[[BASE]]/Inputs/mingw_fedora_tree/usr{{/|\\\\}}x86_64-w64-mingw32ucrt/sys-root/mingw{{/|\\\\}}include{{/|\\\\}}c++{{/|\\\\}}x86_64-w64-mingw32ucrt" | ||
| // CHECK_MINGW_FEDORA_TREE: "[[BASE]]/Inputs/mingw_fedora_tree/usr{{/|\\\\}}x86_64-w64-mingw32ucrt/sys-root/mingw{{/|\\\\}}include{{/|\\\\}}c++{{/|\\\\}}backward" | ||
| // CHECK_MINGW_FEDORA_TREE: "[[BASE]]/Inputs/mingw_fedora_tree/usr{{/|\\\\}}x86_64-w64-mingw32ucrt/sys-root/mingw{{/|\\\\}}include" | ||
|
|
||
|
|
||
| // RUN: %clang --target=i686-pc-windows-gnu -rtlib=platform -stdlib=libstdc++ -c -### --sysroot=%S/Inputs/mingw_arch_tree/usr %s 2>&1 | FileCheck -check-prefix=CHECK_MINGW_ARCH_TREE %s | ||
| // CHECK_MINGW_ARCH_TREE: "[[BASE:[^"]+]]/Inputs/mingw_arch_tree/usr{{/|\\\\}}i686-w64-mingw32{{/|\\\\}}include{{/|\\\\}}c++{{/|\\\\}}5.1.0" | ||
| // CHECK_MINGW_ARCH_TREE: "[[BASE]]/Inputs/mingw_arch_tree/usr{{/|\\\\}}i686-w64-mingw32{{/|\\\\}}include{{/|\\\\}}c++{{/|\\\\}}5.1.0{{/|\\\\}}i686-w64-mingw32" | ||
| // CHECK_MINGW_ARCH_TREE: "[[BASE]]/Inputs/mingw_arch_tree/usr{{/|\\\\}}i686-w64-mingw32{{/|\\\\}}include{{/|\\\\}}c++{{/|\\\\}}5.1.0{{/|\\\\}}backward" | ||
| // CHECK_MINGW_ARCH_TREE: "[[BASE]]/Inputs/mingw_arch_tree/usr{{/|\\\\}}i686-w64-mingw32{{/|\\\\}}include" | ||
|
|
||
|
|
||
| // RUN: %clang --target=x86_64-pc-windows-gnu -rtlib=platform -stdlib=libstdc++ -c -### --sysroot=%S/Inputs/mingw_ubuntu_tree/usr %s 2>&1 | FileCheck -check-prefix=CHECK_MINGW_UBUNTU_TREE %s | ||
| // CHECK_MINGW_UBUNTU_TREE: "[[BASE:[^"]+]]/Inputs/mingw_ubuntu_tree/usr{{/|\\\\}}include{{/|\\\\}}c++{{/|\\\\}}4.8" | ||
| // CHECK_MINGW_UBUNTU_TREE: "[[BASE]]/Inputs/mingw_ubuntu_tree/usr{{/|\\\\}}include{{/|\\\\}}c++{{/|\\\\}}4.8{{/|\\\\}}x86_64-w64-mingw32" | ||
| // CHECK_MINGW_UBUNTU_TREE: "[[BASE]]/Inputs/mingw_ubuntu_tree/usr{{/|\\\\}}include{{/|\\\\}}c++{{/|\\\\}}4.8{{/|\\\\}}backward" | ||
| // CHECK_MINGW_UBUNTU_TREE: "[[BASE]]/Inputs/mingw_ubuntu_tree/usr{{/|\\\\}}x86_64-w64-mingw32{{/|\\\\}}include" | ||
|
|
||
|
|
||
| // RUN: %clang --target=x86_64-pc-windows-gnu -rtlib=platform -stdlib=libstdc++ -c -### --sysroot=%S/Inputs/mingw_ubuntu_posix_tree/usr %s 2>&1 | FileCheck -check-prefix=CHECK_MINGW_UBUNTU_POSIX_TREE %s | ||
| // CHECK_MINGW_UBUNTU_POSIX_TREE: "[[BASE:[^"]+]]/Inputs/mingw_ubuntu_posix_tree/usr{{/|\\\\}}lib{{/|\\\\}}gcc{{/|\\\\}}x86_64-w64-mingw32{{/|\\\\}}10.2-posix{{/|\\\\}}include{{/|\\\\}}c++" | ||
| // CHECK_MINGW_UBUNTU_POSIX_TREE: "[[BASE]]/Inputs/mingw_ubuntu_posix_tree/usr{{/|\\\\}}lib{{/|\\\\}}gcc{{/|\\\\}}x86_64-w64-mingw32{{/|\\\\}}10.2-posix{{/|\\\\}}include{{/|\\\\}}c++{{/|\\\\}}x86_64-w64-mingw32" | ||
| // CHECK_MINGW_UBUNTU_POSIX_TREE: "[[BASE]]/Inputs/mingw_ubuntu_posix_tree/usr{{/|\\\\}}lib{{/|\\\\}}gcc{{/|\\\\}}x86_64-w64-mingw32{{/|\\\\}}10.2-posix{{/|\\\\}}include{{/|\\\\}}c++{{/|\\\\}}backward" | ||
| // CHECK_MINGW_UBUNTU_POSIX_TREE: "[[BASE]]/Inputs/mingw_ubuntu_posix_tree/usr{{/|\\\\}}x86_64-w64-mingw32{{/|\\\\}}include" | ||
|
|
||
| // RUN: %clang --target=i686-windows-gnu -E -### %s 2>&1 | FileCheck -check-prefix=CHECK_MINGW_NO_UNICODE %s | ||
| // RUN: %clang --target=i686-windows-gnu -E -### %s -municode 2>&1 | FileCheck -check-prefix=CHECK_MINGW_UNICODE %s | ||
| // CHECK_MINGW_NO_UNICODE-NOT: "-DUNICODE" | ||
| // CHECK_MINGW_UNICODE: "-DUNICODE" | ||
|
|
||
| // RUN: %clang --target=i686-windows-gnu -### %s 2>&1 | FileCheck -check-prefix=CHECK_NO_SUBSYS %s | ||
| // RUN: %clang --target=i686-windows-gnu -### %s -mwindows -mconsole 2>&1 | FileCheck -check-prefix=CHECK_SUBSYS_CONSOLE %s | ||
| // RUN: %clang --target=i686-windows-gnu -### %s -mconsole -mwindows 2>&1 | FileCheck -check-prefix=CHECK_SUBSYS_WINDOWS %s | ||
| // CHECK_NO_SUBSYS-NOT: "--subsystem" | ||
| // CHECK_SUBSYS_CONSOLE: "--subsystem" "console" | ||
| // CHECK_SUBSYS_WINDOWS: "--subsystem" "windows" | ||
|
|
||
| // RUN: %clang --target=i686-windows-gnu -### %s 2>&1 | FileCheck -check-prefix=CHECK_NO_INIT_ARRAY %s | ||
| // CHECK_NO_INIT_ARRAY: "-fno-use-init-array" | ||
|
|
||
| // RUN: %clang --target=arm64ec-windows-gnu -### -o /dev/null %s 2>&1 \ | ||
| // RUN: | FileCheck %s --check-prefix CHECK_MINGW_EC_LINK | ||
| // CHECK_MINGW_EC_LINK: "-m" "arm64ecpe" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| // RUN: not %clang -c --target=mips64-linux-gnu -fPIC -mno-abicalls %s 2>&1 | FileCheck %s | ||
| // CHECK: error: position-independent code requires '-mabicalls' |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,30 +1,30 @@ | ||
| // REQUIRES: mips-registered-target | ||
| // RUN: %clang -### -c --target=mips64-mti-elf -fno-pic %s 2>&1 | FileCheck -check-prefix=CHECK-PIC1-IMPLICIT %s | ||
| // CHECK-PIC1-IMPLICIT: warning: ignoring '-fno-pic' option as it cannot be used with implicit usage of -mabicalls and the N64 ABI | ||
|
|
||
| // RUN: %clang -### -c --target=mips64-mti-elf -fno-pic -mabicalls %s 2>&1 | FileCheck -check-prefix=CHECK-PIC1-EXPLICIT %s | ||
| // CHECK-PIC1-EXPLICIT: warning: ignoring '-fno-pic' option as it cannot be used with -mabicalls and the N64 ABI | ||
|
|
||
| // RUN: %clang -### -c --target=mips64-mti-elf -fno-PIC %s 2>&1 | FileCheck -check-prefix=CHECK-PIC2-IMPLICIT %s | ||
| // CHECK-PIC2-IMPLICIT: warning: ignoring '-fno-PIC' option as it cannot be used with implicit usage of -mabicalls and the N64 ABI | ||
|
|
||
| // RUN: %clang -### -c --target=mips64-mti-elf -fno-PIC -mabicalls %s 2>&1 | FileCheck -check-prefix=CHECK-PIC2-EXPLICIT %s | ||
| // CHECK-PIC2-EXPLICIT: warning: ignoring '-fno-PIC' option as it cannot be used with -mabicalls and the N64 ABI | ||
|
|
||
| // RUN: %clang -### -c --target=mips64-mti-elf -fno-pie %s 2>&1 | FileCheck -check-prefix=CHECK-PIE1-IMPLICIT %s | ||
| // CHECK-PIE1-IMPLICIT: warning: ignoring '-fno-pie' option as it cannot be used with implicit usage of -mabicalls and the N64 ABI | ||
|
|
||
| // RUN: %clang -### -c --target=mips64-mti-elf -fno-pie -mabicalls %s 2>&1 | FileCheck -check-prefix=CHECK-PIE1-EXPLICIT %s | ||
| // CHECK-PIE1-EXPLICIT: warning: ignoring '-fno-pie' option as it cannot be used with -mabicalls and the N64 ABI | ||
|
|
||
| // RUN: %clang -### -c --target=mips64-mti-elf -fno-PIE %s 2>&1 | FileCheck -check-prefix=CHECK-PIE2-IMPLICIT %s | ||
| // CHECK-PIE2-IMPLICIT: warning: ignoring '-fno-PIE' option as it cannot be used with implicit usage of -mabicalls and the N64 ABI | ||
|
|
||
| // RUN: %clang -### -c --target=mips64-mti-elf -fno-PIE -mabicalls %s 2>&1 | FileCheck -check-prefix=CHECK-PIE2-EXPLICIT %s | ||
| // CHECK-PIE2-EXPLICIT: warning: ignoring '-fno-PIE' option as it cannot be used with -mabicalls and the N64 ABI | ||
|
|
||
| // RUN: %clang -### -c --target=mips-mti-elf -mlong-calls %s 2>&1 | FileCheck -check-prefix=LONGCALL-IMP %s | ||
| // LONGCALL-IMP: warning: ignoring '-mlong-calls' option as it is not currently supported with the implicit usage of -mabicalls | ||
|
|
||
| // RUN: %clang -### -c --target=mips-mti-elf -mlong-calls -mabicalls %s 2>&1 | FileCheck -check-prefix=LONGCALL-EXP %s | ||
| // LONGCALL-EXP: warning: ignoring '-mlong-calls' option as it is not currently supported with -mabicalls |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| // REQUIRES: mips-registered-target | ||
| // RUN: %clang -### -c --target=mips-mti-elf %s -mgpopt 2>&1 | FileCheck -check-prefix=IMPLICIT %s | ||
| // IMPLICIT: warning: ignoring '-mgpopt' option as it cannot be used with the implicit usage of -mabicalls | ||
|
|
||
| // RUN: %clang -### -c --target=mips-mti-elf %s -mgpopt -mabicalls 2>&1 | FileCheck -check-prefix=EXPLICIT %s | ||
| // EXPLICIT: warning: ignoring '-mgpopt' option as it cannot be used with -mabicalls |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| // REQUIRES: mips-registered-target | ||
| // RUN: %clang -c --target=mips-unknown-gnu -mcpu=mips32 -mabs=2008 %s 2>&1 | FileCheck -check-prefix=NO2008 %s | ||
| // NO2008: warning: ignoring '-mabs=2008' option because the 'mips32' architecture does not support it [-Wunsupported-abs] | ||
|
|
||
| // RUN: %clang -c --target=mips-unknown-gnu -mcpu=mips32r6 -mabs=legacy %s 2>&1 | FileCheck -check-prefix=NOLEGACY %s | ||
| // NOLEGACY: warning: ignoring '-mabs=legacy' option because the 'mips32r6' architecture does not support it [-Wunsupported-abs] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,15 @@ | ||
| // RUN: %clang --target=powerpc-linux-musl -c -### %s -mlong-double-128 2>&1 | FileCheck %s | ||
| // RUN: %clang --target=powerpc64-pc-freebsd12 -c -### %s -mlong-double-128 2>&1 | FileCheck %s | ||
| // RUN: %clang --target=powerpc64le-linux-musl -c -### %s -mlong-double-128 2>&1 | FileCheck %s | ||
| // RUN: %clang --target=i686-linux-gnu -c -### %s -mlong-double-128 2>&1 | FileCheck %s | ||
|
|
||
| // RUN: %clang --target=x86_64-linux-musl -c -### %s -mlong-double-128 -mlong-double-80 2>&1 | FileCheck --implicit-check-not=-mlong-double-128 /dev/null | ||
| // RUN: %clang --target=x86_64-linux-musl -c -### %s -mlong-double-80 -mlong-double-128 2>&1 | FileCheck %s | ||
|
|
||
| // CHECK: "-mlong-double-128" | ||
|
|
||
| // RUN: not %clang --target=aarch64 -c -### %s -mlong-double-128 2>&1 | FileCheck --check-prefix=ERR %s | ||
| // RUN: not %clang --target=powerpc -c -### %s -mlong-double-80 2>&1 | FileCheck --check-prefix=ERR2 %s | ||
|
|
||
| // ERR: error: unsupported option '-mlong-double-128' for target 'aarch64' | ||
| // ERR2: error: unsupported option '-mlong-double-80' for target 'powerpc' |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,42 +1,42 @@ | ||
| // Test that different values of -mhwmult pick correct | ||
| // MSP430 hwmult target-feature(s). | ||
|
|
||
| // RUN: %clang -### --target=msp430 %s 2>&1 | FileCheck %s | ||
| // RUN: %clang -### --target=msp430 %s -mhwmult=auto 2>&1 | FileCheck %s | ||
| // CHECK-NOT: "-target-feature" "+hwmult16" | ||
| // CHECK-NOT: "-target-feature" "+hwmult32" | ||
| // CHECK-NOT: "-target-feature" "+hwmultf5" | ||
|
|
||
| // RUN: %clang -### --target=msp430 %s -mhwmult=none 2>&1 | FileCheck --check-prefix=CHECK-NONE %s | ||
| // RUN: %clang -### --target=msp430 %s -mhwmult=none -mmcu=msp430f147 2>&1 | FileCheck --check-prefix=CHECK-NONE %s | ||
| // RUN: %clang -### --target=msp430 %s -mhwmult=none -mmcu=msp430f4783 2>&1 | FileCheck --check-prefix=CHECK-NONE %s | ||
| // CHECK-NONE: "-target-feature" "-hwmult16" | ||
| // CHECK-NONE: "-target-feature" "-hwmult32" | ||
| // CHECK-NONE: "-target-feature" "-hwmultf5" | ||
|
|
||
| // RUN: %clang -### --target=msp430 %s -mhwmult=16bit 2>&1 | FileCheck --check-prefix=CHECK-16 %s | ||
| // CHECK-16: "-target-feature" "+hwmult16" | ||
|
|
||
| // RUN: %clang -### --target=msp430 %s -mhwmult=32bit 2>&1 | FileCheck --check-prefix=CHECK-32 %s | ||
| // CHECK-32: "-target-feature" "+hwmult32" | ||
|
|
||
| // RUN: %clang -### --target=msp430 %s -mhwmult=f5series 2>&1 | FileCheck --check-prefix=CHECK-F5 %s | ||
| // CHECK-F5: "-target-feature" "+hwmultf5" | ||
|
|
||
| // RUN: not %clang -### --target=msp430 %s -mhwmult=rrr 2>&1 | FileCheck --check-prefix=INVL-ARG %s | ||
| // INVL-ARG: error: unsupported argument 'rrr' to option '-mhwmult=' | ||
|
|
||
| // RUN: %clang -### --target=msp430 %s -mhwmult=auto 2>&1 | FileCheck --check-prefix=WRN-NODEV %s | ||
| // WRN-NODEV: warning: no MCU device specified, but '-mhwmult' is set to 'auto', | ||
| // assuming no hardware multiply; use '-mmcu' to specify a MSP430 device, | ||
| // or '-mhwmult' to set hardware multiply type explicitly. | ||
|
|
||
| // RUN: %clang -### --target=msp430 %s -mhwmult=16bit -mmcu=msp430c111 2>&1 | FileCheck --check-prefix=WRN-UNSUP %s | ||
| // RUN: %clang -### --target=msp430 %s -mhwmult=32bit -mmcu=msp430c111 2>&1 | FileCheck --check-prefix=WRN-UNSUP %s | ||
| // RUN: %clang -### --target=msp430 %s -mhwmult=f5series -mmcu=msp430c111 2>&1 | FileCheck --check-prefix=WRN-UNSUP %s | ||
| // WRN-UNSUP: warning: the given MCU does not support hardware multiply, but '-mhwmult' is set to | ||
|
|
||
| // RUN: %clang -### --target=msp430 %s -mhwmult=16bit -mmcu=msp430f4783 2>&1 | FileCheck --check-prefix=WRN-MISMCH %s | ||
| // RUN: %clang -### --target=msp430 %s -mhwmult=32bit -mmcu=msp430f147 2>&1 | FileCheck --check-prefix=WRN-MISMCH %s | ||
| // RUN: %clang -### --target=msp430 %s -mhwmult=f5series -mmcu=msp430f4783 2>&1 | FileCheck --check-prefix=WRN-MISMCH %s | ||
| // WRN-MISMCH: warning: the given MCU supports {{.*}} hardware multiply, but '-mhwmult' is set to {{.*}} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| // RUN: %clang --target=x86_64-pc-windows-msvc -fno-rtti -### %s 2>&1 | FileCheck %s --check-prefix=NO-RTTI | ||
| // RUN: %clang --target=x86_64-pc-windows-msvc -frtti -### %s 2>&1 | FileCheck %s --check-prefix=RTTI | ||
|
|
||
| // RTTI-NOT: -D_HAS_STATIC_RTTI=0 | ||
| // NO-RTTI: -D_HAS_STATIC_RTTI=0 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| // RUN: %clang -target arm64-apple-ios11 -### %s -o - 2>&1 | FileCheck -check-prefix=DISABLE-ENC %s | ||
| // RUN: %clang -target arm64-apple-ios11 -fobjc-encode-cxx-class-template-spec -### %s -o - 2>&1 | FileCheck -check-prefix=ENABLE-ENC %s | ||
| // RUN: %clang --target=x86_64-linux-gnu -fobjc-runtime=gnustep -### %s -o - 2>&1 | FileCheck -check-prefix=ENABLE-ENC %s | ||
| // RUN: %clang --target=x86_64-linux-gnu -fobjc-runtime=gnustep -fno-objc-encode-cxx-class-template-spec -### %s -o - 2>&1 | FileCheck -check-prefix=DISABLE-ENC %s | ||
|
|
||
| // DISABLE-ENC-NOT: -fobjc-encode-cxx-class-template-spec | ||
| // ENABLE-ENC: -fobjc-encode-cxx-class-template-spec |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,119 @@ | ||
| ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 5 | ||
| ; RUN: opt -passes='print<scalar-evolution>' %s -disable-output 2>&1 | FileCheck %s | ||
|
|
||
| target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" | ||
|
|
||
| ; %i and %i + 1 can overflow. | ||
| define void @test1(i64 %x, ptr %a, ptr %b) { | ||
| ; CHECK-LABEL: 'test1' | ||
| ; CHECK-NEXT: Classifying expressions for: @test1 | ||
| ; CHECK-NEXT: %conv11 = phi i64 [ 0, %entry ], [ %conv, %latch ] | ||
| ; CHECK-NEXT: --> (zext i32 {0,+,1}<%header> to i64) U: [0,4294967296) S: [0,4294967296) Exits: <<Unknown>> LoopDispositions: { %header: Computable } | ||
| ; CHECK-NEXT: %i.010 = phi i32 [ 0, %entry ], [ %add, %latch ] | ||
| ; CHECK-NEXT: --> {0,+,1}<%header> U: full-set S: full-set Exits: <<Unknown>> LoopDispositions: { %header: Computable } | ||
| ; CHECK-NEXT: %add = add i32 %i.010, 1 | ||
| ; CHECK-NEXT: --> {1,+,1}<%header> U: full-set S: full-set Exits: <<Unknown>> LoopDispositions: { %header: Computable } | ||
| ; CHECK-NEXT: %idxprom = zext i32 %add to i64 | ||
| ; CHECK-NEXT: --> (zext i32 {1,+,1}<%header> to i64) U: [0,4294967296) S: [0,4294967296) Exits: <<Unknown>> LoopDispositions: { %header: Computable } | ||
| ; CHECK-NEXT: %arrayidx = getelementptr inbounds i32, ptr %a, i64 %idxprom | ||
| ; CHECK-NEXT: --> ((4 * (zext i32 {1,+,1}<%header> to i64))<nuw><nsw> + %a)<nuw> U: full-set S: full-set Exits: <<Unknown>> LoopDispositions: { %header: Computable } | ||
| ; CHECK-NEXT: %ld = load i32, ptr %arrayidx, align 4 | ||
| ; CHECK-NEXT: --> %ld U: full-set S: full-set Exits: <<Unknown>> LoopDispositions: { %header: Variant } | ||
| ; CHECK-NEXT: %add2 = add nsw i32 %ld, 1 | ||
| ; CHECK-NEXT: --> (1 + %ld) U: full-set S: full-set Exits: <<Unknown>> LoopDispositions: { %header: Variant } | ||
| ; CHECK-NEXT: %arrayidx4 = getelementptr inbounds i32, ptr %b, i64 %conv11 | ||
| ; CHECK-NEXT: --> ((4 * (zext i32 {0,+,1}<%header> to i64))<nuw><nsw> + %b) U: full-set S: full-set Exits: <<Unknown>> LoopDispositions: { %header: Computable } | ||
| ; CHECK-NEXT: %conv = zext i32 %add to i64 | ||
| ; CHECK-NEXT: --> (zext i32 {1,+,1}<%header> to i64) U: [0,4294967296) S: [0,4294967296) Exits: <<Unknown>> LoopDispositions: { %header: Computable } | ||
| ; CHECK-NEXT: Determining loop execution counts for: @test1 | ||
| ; CHECK-NEXT: Loop %header: <multiple exits> Unpredictable backedge-taken count. | ||
| ; CHECK-NEXT: exit count for header: ***COULDNOTCOMPUTE*** | ||
| ; CHECK-NEXT: exit count for latch: ***COULDNOTCOMPUTE*** | ||
| ; CHECK-NEXT: Loop %header: Unpredictable constant max backedge-taken count. | ||
| ; CHECK-NEXT: Loop %header: Unpredictable symbolic max backedge-taken count. | ||
| ; CHECK-NEXT: symbolic max exit count for header: ***COULDNOTCOMPUTE*** | ||
| ; CHECK-NEXT: symbolic max exit count for latch: ***COULDNOTCOMPUTE*** | ||
| ; CHECK-NEXT: Loop %header: Predicated symbolic max backedge-taken count is (-1 + (1 umax %x)) | ||
| ; CHECK-NEXT: Predicates: | ||
| ; CHECK-NEXT: {1,+,1}<%header> Added Flags: <nusw> | ||
| ; | ||
| entry: | ||
| br label %header | ||
|
|
||
| header: | ||
| %conv11 = phi i64 [ 0, %entry ], [ %conv, %latch ] | ||
| %i.010 = phi i32 [ 0, %entry ], [ %add, %latch ] | ||
| %add = add i32 %i.010, 1 | ||
| %idxprom = zext i32 %add to i64 | ||
| %arrayidx = getelementptr inbounds i32, ptr %a, i64 %idxprom | ||
| %ld = load i32, ptr %arrayidx, align 4 | ||
| %uncountable.c = icmp eq i32 %ld, 10 | ||
| br i1 %uncountable.c, label %exit, label %latch | ||
|
|
||
| latch: | ||
| %add2 = add nsw i32 %ld, 1 | ||
| %arrayidx4 = getelementptr inbounds i32, ptr %b, i64 %conv11 | ||
| store i32 %add2, ptr %arrayidx4, align 4 | ||
| %conv = zext i32 %add to i64 | ||
| %cmp = icmp ult i64 %conv, %x | ||
| br i1 %cmp, label %header, label %exit | ||
|
|
||
| exit: | ||
| ret void | ||
| } | ||
|
|
||
| ; %i can overflow. | ||
| ; | ||
| ; We need to check that i doesn't wrap, but we don't need a run-time alias | ||
| ; check. We also need an extra no-wrap check to get the backedge taken count. | ||
| define void @test2(i64 %x, ptr %a) { | ||
| ; CHECK-LABEL: 'test2' | ||
| ; CHECK-NEXT: Classifying expressions for: @test2 | ||
| ; CHECK-NEXT: %conv11 = phi i64 [ 0, %entry ], [ %conv, %latch ] | ||
| ; CHECK-NEXT: --> (zext i32 {0,+,1}<%header> to i64) U: [0,4294967296) S: [0,4294967296) Exits: <<Unknown>> LoopDispositions: { %header: Computable } | ||
| ; CHECK-NEXT: %i.010 = phi i32 [ 0, %entry ], [ %inc, %latch ] | ||
| ; CHECK-NEXT: --> {0,+,1}<%header> U: full-set S: full-set Exits: <<Unknown>> LoopDispositions: { %header: Computable } | ||
| ; CHECK-NEXT: %arrayidx = getelementptr inbounds i32, ptr %a, i64 %conv11 | ||
| ; CHECK-NEXT: --> ((4 * (zext i32 {0,+,1}<%header> to i64))<nuw><nsw> + %a)<nuw> U: full-set S: full-set Exits: <<Unknown>> LoopDispositions: { %header: Computable } | ||
| ; CHECK-NEXT: %ld = load i32, ptr %arrayidx, align 4 | ||
| ; CHECK-NEXT: --> %ld U: full-set S: full-set Exits: <<Unknown>> LoopDispositions: { %header: Variant } | ||
| ; CHECK-NEXT: %add = add nsw i32 %ld, 1 | ||
| ; CHECK-NEXT: --> (1 + %ld) U: full-set S: full-set Exits: <<Unknown>> LoopDispositions: { %header: Variant } | ||
| ; CHECK-NEXT: %inc = add i32 %i.010, 1 | ||
| ; CHECK-NEXT: --> {1,+,1}<%header> U: full-set S: full-set Exits: <<Unknown>> LoopDispositions: { %header: Computable } | ||
| ; CHECK-NEXT: %conv = zext i32 %inc to i64 | ||
| ; CHECK-NEXT: --> (zext i32 {1,+,1}<%header> to i64) U: [0,4294967296) S: [0,4294967296) Exits: <<Unknown>> LoopDispositions: { %header: Computable } | ||
| ; CHECK-NEXT: Determining loop execution counts for: @test2 | ||
| ; CHECK-NEXT: Loop %header: <multiple exits> Unpredictable backedge-taken count. | ||
| ; CHECK-NEXT: exit count for header: ***COULDNOTCOMPUTE*** | ||
| ; CHECK-NEXT: exit count for latch: ***COULDNOTCOMPUTE*** | ||
| ; CHECK-NEXT: Loop %header: Unpredictable constant max backedge-taken count. | ||
| ; CHECK-NEXT: Loop %header: Unpredictable symbolic max backedge-taken count. | ||
| ; CHECK-NEXT: symbolic max exit count for header: ***COULDNOTCOMPUTE*** | ||
| ; CHECK-NEXT: symbolic max exit count for latch: ***COULDNOTCOMPUTE*** | ||
| ; CHECK-NEXT: Loop %header: Predicated symbolic max backedge-taken count is (-1 + (1 umax %x)) | ||
| ; CHECK-NEXT: Predicates: | ||
| ; CHECK-NEXT: {1,+,1}<%header> Added Flags: <nusw> | ||
| ; | ||
| entry: | ||
| br label %header | ||
|
|
||
| header: | ||
| %conv11 = phi i64 [ 0, %entry ], [ %conv, %latch ] | ||
| %i.010 = phi i32 [ 0, %entry ], [ %inc, %latch ] | ||
| %arrayidx = getelementptr inbounds i32, ptr %a, i64 %conv11 | ||
| %ld = load i32, ptr %arrayidx, align 4 | ||
| %uncountable.c = icmp eq i32 %ld, 10 | ||
| br i1 %uncountable.c, label %exit, label %latch | ||
|
|
||
| latch: | ||
| %add = add nsw i32 %ld, 1 | ||
| store i32 %add, ptr %arrayidx, align 4 | ||
| %inc = add i32 %i.010, 1 | ||
| %conv = zext i32 %inc to i64 | ||
| %cmp = icmp ult i64 %conv, %x | ||
| br i1 %cmp, label %header, label %exit | ||
|
|
||
| exit: | ||
| ret void | ||
| } |