From: Gheorghe-Teodor Bercea Date: Fri, 11 Aug 2017 21:17:50 +0000 (+0000) Subject: [OpenMP] Move failing flag tests to disabled GPU X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c5fedc7598bb539865ec7f1c8f2ea8ef7cc5c3eb;p=clang [OpenMP] Move failing flag tests to disabled GPU offloading test file. This should prevent further errors with the sanitizer. Diff: D29660 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@310765 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Driver/openmp-offload-gpu.c b/test/Driver/openmp-offload-gpu.c index ba1aa2a360..3aeeaed53a 100644 --- a/test/Driver/openmp-offload-gpu.c +++ b/test/Driver/openmp-offload-gpu.c @@ -12,6 +12,38 @@ /// ########################################################################### +/// Check -Xopenmp-target=powerpc64le-ibm-linux-gnu -march=pwr7 is passed when compiling for the device. +// RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=powerpc64le-ibm-linux-gnu -Xopenmp-target=powerpc64le-ibm-linux-gnu -mcpu=pwr7 %s 2>&1 \ +// RUN: | FileCheck -check-prefix=CHK-FOPENMP-EQ-TARGET %s + +// CHK-FOPENMP-EQ-TARGET: clang{{.*}} "-target-cpu" "pwr7" + +/// ########################################################################### + +/// Check -Xopenmp-target -march=pwr7 is passed when compiling for the device. +// RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=powerpc64le-ibm-linux-gnu -Xopenmp-target -mcpu=pwr7 %s 2>&1 \ +// RUN: | FileCheck -check-prefix=CHK-FOPENMP-TARGET %s + +// CHK-FOPENMP-TARGET: clang{{.*}} "-target-cpu" "pwr7" + +/// ########################################################################### + +/// Check -Xopenmp-target triggers error when multiple triples are used. +// RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=powerpc64le-ibm-linux-gnu,powerpc64le-unknown-linux-gnu -Xopenmp-target -mcpu=pwr8 %s 2>&1 \ +// RUN: | FileCheck -check-prefix=CHK-FOPENMP-TARGET-AMBIGUOUS-ERROR %s + +// CHK-FOPENMP-TARGET-AMBIGUOUS-ERROR: clang{{.*}} error: cannot deduce implicit triple value for -Xopenmp-target, specify triple using -Xopenmp-target= + +/// ########################################################################### + +/// Check -Xopenmp-target triggers error when an option requiring arguments is passed to it. +// RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=powerpc64le-ibm-linux-gnu -Xopenmp-target -Xopenmp-target -mcpu=pwr8 %s 2>&1 \ +// RUN: | FileCheck -check-prefix=CHK-FOPENMP-TARGET-NESTED-ERROR %s + +// CHK-FOPENMP-TARGET-NESTED-ERROR: clang{{.*}} error: invalid -Xopenmp-target argument: '-Xopenmp-target -Xopenmp-target', options requiring arguments are unsupported + +/// ########################################################################### + /// Check -Xopenmp-target uses one of the archs provided when several archs are used. // RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_35 -Xopenmp-target -march=sm_60 %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHK-FOPENMP-TARGET-ARCHS %s diff --git a/test/Driver/openmp-offload.c b/test/Driver/openmp-offload.c index 92f6014d93..d43aa331c9 100644 --- a/test/Driver/openmp-offload.c +++ b/test/Driver/openmp-offload.c @@ -597,35 +597,3 @@ // RUN: | FileCheck -check-prefix=CHK-FOPENMP-IS-DEVICE %s // CHK-FOPENMP-IS-DEVICE: clang{{.*}} "-aux-triple" "powerpc64le--linux" {{.*}}.c" "-fopenmp-is-device" "-fopenmp-host-ir-file-path" - -/// ########################################################################### - -/// Check -Xopenmp-target=powerpc64le-ibm-linux-gnu -march=pwr7 is passed when compiling for the device. -// RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=powerpc64le-ibm-linux-gnu -Xopenmp-target=powerpc64le-ibm-linux-gnu -mcpu=pwr7 %s 2>&1 \ -// RUN: | FileCheck -check-prefix=CHK-FOPENMP-EQ-TARGET %s - -// CHK-FOPENMP-EQ-TARGET: clang{{.*}} "-target-cpu" "pwr7" - -/// ########################################################################### - -/// Check -Xopenmp-target -march=pwr7 is passed when compiling for the device. -// RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=powerpc64le-ibm-linux-gnu -Xopenmp-target -mcpu=pwr7 %s 2>&1 \ -// RUN: | FileCheck -check-prefix=CHK-FOPENMP-TARGET %s - -// CHK-FOPENMP-TARGET: clang{{.*}} "-target-cpu" "pwr7" - -/// ########################################################################### - -/// Check -Xopenmp-target triggers error when multiple triples are used. -// RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=powerpc64le-ibm-linux-gnu,powerpc64le-unknown-linux-gnu -Xopenmp-target -mcpu=pwr8 %s 2>&1 \ -// RUN: | FileCheck -check-prefix=CHK-FOPENMP-TARGET-AMBIGUOUS-ERROR %s - -// CHK-FOPENMP-TARGET-AMBIGUOUS-ERROR: clang{{.*}} error: cannot deduce implicit triple value for -Xopenmp-target, specify triple using -Xopenmp-target= - -/// ########################################################################### - -/// Check -Xopenmp-target triggers error when an option requiring arguments is passed to it. -// RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=powerpc64le-ibm-linux-gnu -Xopenmp-target -Xopenmp-target -mcpu=pwr8 %s 2>&1 \ -// RUN: | FileCheck -check-prefix=CHK-FOPENMP-TARGET-NESTED-ERROR %s - -// CHK-FOPENMP-TARGET-NESTED-ERROR: clang{{.*}} error: invalid -Xopenmp-target argument: '-Xopenmp-target -Xopenmp-target', options requiring arguments are unsupported