[PATCH] D42920: [CUDA] Fix test cuda-external-tools.cu
This revision was automatically updated to reflect the committed changes. Closed by commit rL324877: [CUDA] Fix test cuda-external-tools.cu (authored by Hahnfeld, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D42920?vs=133816=133819#toc Repository: rL LLVM https://reviews.llvm.org/D42920 Files: cfe/trunk/test/Driver/cuda-external-tools.cu Index: cfe/trunk/test/Driver/cuda-external-tools.cu === --- cfe/trunk/test/Driver/cuda-external-tools.cu +++ cfe/trunk/test/Driver/cuda-external-tools.cu @@ -7,112 +7,115 @@ // Regular compiles with -O{0,1,2,3,4,fast}. -O4 and -Ofast map to ptxas O3. // RUN: %clang -### -target x86_64-linux-gnu -O0 -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM20 -check-prefix OPT0 %s +// RUN: | FileCheck -check-prefixes=CHECK,ARCH64,SM20,OPT0 %s // RUN: %clang -### -target x86_64-linux-gnu -O1 -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM20 -check-prefix OPT1 %s +// RUN: | FileCheck -check-prefixes=CHECK,ARCH64,SM20,OPT1 %s // RUN: %clang -### -target x86_64-linux-gnu -O2 -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM20 -check-prefix OPT2 %s +// RUN: | FileCheck -check-prefixes=CHECK,ARCH64,SM20,OPT2 %s // RUN: %clang -### -target x86_64-linux-gnu -O3 -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM20 -check-prefix OPT3 %s +// RUN: | FileCheck -check-prefixes=CHECK,ARCH64,SM20,OPT3 %s // RUN: %clang -### -target x86_64-linux-gnu -O4 -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM20 -check-prefix OPT3 %s +// RUN: | FileCheck -check-prefixes=CHECK,ARCH64,SM20,OPT3 %s // RUN: %clang -### -target x86_64-linux-gnu -Ofast -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM20 -check-prefix OPT3 %s +// RUN: | FileCheck -check-prefixes=CHECK,ARCH64,SM20,OPT3 %s // With debugging enabled, ptxas should be run with with no ptxas optimizations. // RUN: %clang -### -target x86_64-linux-gnu --cuda-noopt-device-debug -O2 -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM20 -check-prefix DBG %s +// RUN: | FileCheck -check-prefixes=CHECK,ARCH64,SM20,DBG %s // --no-cuda-noopt-device-debug overrides --cuda-noopt-device-debug. // RUN: %clang -### -target x86_64-linux-gnu --cuda-noopt-device-debug \ // RUN: --no-cuda-noopt-device-debug -O2 -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM20 -check-prefix OPT2 %s +// RUN: | FileCheck -check-prefixes=CHECK,ARCH64,SM20,OPT2 %s // Regular compile without -O. This should result in us passing -O0 to ptxas. // RUN: %clang -### -target x86_64-linux-gnu -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM20 -check-prefix OPT0 %s +// RUN: | FileCheck -check-prefixes=CHECK,ARCH64,SM20,OPT0 %s // Regular compiles with -Os and -Oz. For lack of a better option, we map // these to ptxas -O3. // RUN: %clang -### -target x86_64-linux-gnu -Os -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM20 -check-prefix OPT2 %s +// RUN: | FileCheck -check-prefixes=CHECK,ARCH64,SM20,OPT2 %s // RUN: %clang -### -target x86_64-linux-gnu -Oz -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM20 -check-prefix OPT2 %s +// RUN: | FileCheck -check-prefixes=CHECK,ARCH64,SM20,OPT2 %s // Regular compile targeting sm_35. // RUN: %clang -### -target x86_64-linux-gnu --cuda-gpu-arch=sm_35 -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM35 %s +// RUN: | FileCheck -check-prefixes=CHECK,ARCH64,SM35 %s // 32-bit compile. -// RUN: %clang -### -target x86_32-linux-gnu -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix ARCH32 -check-prefix SM20 %s +// RUN: %clang -### -target i386-linux-gnu -c %s 2>&1 \ +// RUN: | FileCheck -check-prefixes=CHECK,ARCH32,SM20 %s // Compile with -fintegrated-as. This should still cause us to invoke ptxas. // RUN: %clang -### -target x86_64-linux-gnu -fintegrated-as -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM20 -check-prefix OPT0 %s +// RUN: | FileCheck -check-prefixes=CHECK,ARCH64,SM20,OPT0 %s // Check -Xcuda-ptxas and -Xcuda-fatbinary // RUN: %clang -### -target x86_64-linux-gnu -c -Xcuda-ptxas -foo1 \ // RUN: -Xcuda-fatbinary -bar1 -Xcuda-ptxas -foo2 -Xcuda-fatbinary -bar2 %s 2>&1 \ -// RUN: | FileCheck -check-prefix SM20 -check-prefix PTXAS-EXTRA \ -// RUN: -check-prefix FATBINARY-EXTRA %s +// RUN: | FileCheck -check-prefixes=CHECK,SM20,PTXAS-EXTRA,FATBINARY-EXTRA %s // MacOS spot-checks // RUN: %clang -### -target x86_64-apple-macosx -O0 -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM20 -check-prefix OPT0 %s +// RUN: | FileCheck -check-prefixes=CHECK,ARCH64,SM20,OPT0 %s // RUN: %clang -### -target x86_64-apple-macosx --cuda-gpu-arch=sm_35 -c %s 2>&1 \ -// RUN: |
[PATCH] D42920: [CUDA] Fix test cuda-external-tools.cu
Hahnfeld added inline comments. Comment at: test/Driver/cuda-external-tools.cu:11 +// RUN: | FileCheck -check-prefix CHECK -check-prefix ARCH64 \ +// RUN: -check-prefix SM20 -check-prefix OPT0 %s // RUN: %clang -### -target x86_64-linux-gnu -O1 -c %s 2>&1 \ tra wrote: > Nit: I'd use --check-prefixes=CHECK,ARCH64,SM20,OPT0 . Up to you. Did some search-and-replace magic, don't know why this change didn't occur to me... https://reviews.llvm.org/D42920 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D42920: [CUDA] Fix test cuda-external-tools.cu
Hahnfeld updated this revision to Diff 133816. Hahnfeld marked an inline comment as done. Hahnfeld added a comment. Use `--check-prefixes` instead of multiple `--check-prefix`. https://reviews.llvm.org/D42920 Files: test/Driver/cuda-external-tools.cu Index: test/Driver/cuda-external-tools.cu === --- test/Driver/cuda-external-tools.cu +++ test/Driver/cuda-external-tools.cu @@ -7,112 +7,115 @@ // Regular compiles with -O{0,1,2,3,4,fast}. -O4 and -Ofast map to ptxas O3. // RUN: %clang -### -target x86_64-linux-gnu -O0 -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM20 -check-prefix OPT0 %s +// RUN: | FileCheck -check-prefixes=CHECK,ARCH64,SM20,OPT0 %s // RUN: %clang -### -target x86_64-linux-gnu -O1 -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM20 -check-prefix OPT1 %s +// RUN: | FileCheck -check-prefixes=CHECK,ARCH64,SM20,OPT1 %s // RUN: %clang -### -target x86_64-linux-gnu -O2 -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM20 -check-prefix OPT2 %s +// RUN: | FileCheck -check-prefixes=CHECK,ARCH64,SM20,OPT2 %s // RUN: %clang -### -target x86_64-linux-gnu -O3 -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM20 -check-prefix OPT3 %s +// RUN: | FileCheck -check-prefixes=CHECK,ARCH64,SM20,OPT3 %s // RUN: %clang -### -target x86_64-linux-gnu -O4 -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM20 -check-prefix OPT3 %s +// RUN: | FileCheck -check-prefixes=CHECK,ARCH64,SM20,OPT3 %s // RUN: %clang -### -target x86_64-linux-gnu -Ofast -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM20 -check-prefix OPT3 %s +// RUN: | FileCheck -check-prefixes=CHECK,ARCH64,SM20,OPT3 %s // With debugging enabled, ptxas should be run with with no ptxas optimizations. // RUN: %clang -### -target x86_64-linux-gnu --cuda-noopt-device-debug -O2 -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM20 -check-prefix DBG %s +// RUN: | FileCheck -check-prefixes=CHECK,ARCH64,SM20,DBG %s // --no-cuda-noopt-device-debug overrides --cuda-noopt-device-debug. // RUN: %clang -### -target x86_64-linux-gnu --cuda-noopt-device-debug \ // RUN: --no-cuda-noopt-device-debug -O2 -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM20 -check-prefix OPT2 %s +// RUN: | FileCheck -check-prefixes=CHECK,ARCH64,SM20,OPT2 %s // Regular compile without -O. This should result in us passing -O0 to ptxas. // RUN: %clang -### -target x86_64-linux-gnu -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM20 -check-prefix OPT0 %s +// RUN: | FileCheck -check-prefixes=CHECK,ARCH64,SM20,OPT0 %s // Regular compiles with -Os and -Oz. For lack of a better option, we map // these to ptxas -O3. // RUN: %clang -### -target x86_64-linux-gnu -Os -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM20 -check-prefix OPT2 %s +// RUN: | FileCheck -check-prefixes=CHECK,ARCH64,SM20,OPT2 %s // RUN: %clang -### -target x86_64-linux-gnu -Oz -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM20 -check-prefix OPT2 %s +// RUN: | FileCheck -check-prefixes=CHECK,ARCH64,SM20,OPT2 %s // Regular compile targeting sm_35. // RUN: %clang -### -target x86_64-linux-gnu --cuda-gpu-arch=sm_35 -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM35 %s +// RUN: | FileCheck -check-prefixes=CHECK,ARCH64,SM35 %s // 32-bit compile. -// RUN: %clang -### -target x86_32-linux-gnu -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix ARCH32 -check-prefix SM20 %s +// RUN: %clang -### -target i386-linux-gnu -c %s 2>&1 \ +// RUN: | FileCheck -check-prefixes=CHECK,ARCH32,SM20 %s // Compile with -fintegrated-as. This should still cause us to invoke ptxas. // RUN: %clang -### -target x86_64-linux-gnu -fintegrated-as -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM20 -check-prefix OPT0 %s +// RUN: | FileCheck -check-prefixes=CHECK,ARCH64,SM20,OPT0 %s // Check -Xcuda-ptxas and -Xcuda-fatbinary // RUN: %clang -### -target x86_64-linux-gnu -c -Xcuda-ptxas -foo1 \ // RUN: -Xcuda-fatbinary -bar1 -Xcuda-ptxas -foo2 -Xcuda-fatbinary -bar2 %s 2>&1 \ -// RUN: | FileCheck -check-prefix SM20 -check-prefix PTXAS-EXTRA \ -// RUN: -check-prefix FATBINARY-EXTRA %s +// RUN: | FileCheck -check-prefixes=CHECK,SM20,PTXAS-EXTRA,FATBINARY-EXTRA %s // MacOS spot-checks // RUN: %clang -### -target x86_64-apple-macosx -O0 -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM20 -check-prefix OPT0 %s +// RUN: | FileCheck -check-prefixes=CHECK,ARCH64,SM20,OPT0 %s // RUN: %clang -### -target x86_64-apple-macosx --cuda-gpu-arch=sm_35 -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM35 %s -// RUN: %clang -### -target x86_32-apple-macosx -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix ARCH32 -check-prefix SM20 %s +// RUN: |
[PATCH] D42920: [CUDA] Fix test cuda-external-tools.cu
tra accepted this revision. tra added inline comments. This revision is now accepted and ready to land. Comment at: test/Driver/cuda-external-tools.cu:11 +// RUN: | FileCheck -check-prefix CHECK -check-prefix ARCH64 \ +// RUN: -check-prefix SM20 -check-prefix OPT0 %s // RUN: %clang -### -target x86_64-linux-gnu -O1 -c %s 2>&1 \ Nit: I'd use --check-prefixes=CHECK,ARCH64,SM20,OPT0 . Up to you. Repository: rC Clang https://reviews.llvm.org/D42920 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D42920: [CUDA] Fix test cuda-external-tools.cu
Hahnfeld created this revision. Hahnfeld added reviewers: jlebar, tra. Herald added a subscriber: cfe-commits. Hahnfeld added a dependent revision: D42921: [CUDA] Add option to generate relocatable device code. This didn't verify the CHECK prefix before! Repository: rC Clang https://reviews.llvm.org/D42920 Files: test/Driver/cuda-external-tools.cu Index: test/Driver/cuda-external-tools.cu === --- test/Driver/cuda-external-tools.cu +++ test/Driver/cuda-external-tools.cu @@ -7,112 +7,129 @@ // Regular compiles with -O{0,1,2,3,4,fast}. -O4 and -Ofast map to ptxas O3. // RUN: %clang -### -target x86_64-linux-gnu -O0 -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM20 -check-prefix OPT0 %s +// RUN: | FileCheck -check-prefix CHECK -check-prefix ARCH64 \ +// RUN: -check-prefix SM20 -check-prefix OPT0 %s // RUN: %clang -### -target x86_64-linux-gnu -O1 -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM20 -check-prefix OPT1 %s +// RUN: | FileCheck -check-prefix CHECK -check-prefix ARCH64 \ +// RUN: -check-prefix SM20 -check-prefix OPT1 %s // RUN: %clang -### -target x86_64-linux-gnu -O2 -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM20 -check-prefix OPT2 %s +// RUN: | FileCheck -check-prefix CHECK -check-prefix ARCH64 \ +// RUN: -check-prefix SM20 -check-prefix OPT2 %s // RUN: %clang -### -target x86_64-linux-gnu -O3 -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM20 -check-prefix OPT3 %s +// RUN: | FileCheck -check-prefix CHECK -check-prefix ARCH64 \ +// RUN: -check-prefix SM20 -check-prefix OPT3 %s // RUN: %clang -### -target x86_64-linux-gnu -O4 -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM20 -check-prefix OPT3 %s +// RUN: | FileCheck -check-prefix CHECK -check-prefix ARCH64 \ +// RUN: -check-prefix SM20 -check-prefix OPT3 %s // RUN: %clang -### -target x86_64-linux-gnu -Ofast -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM20 -check-prefix OPT3 %s +// RUN: | FileCheck -check-prefix CHECK -check-prefix ARCH64 \ +// RUN: -check-prefix SM20 -check-prefix OPT3 %s // With debugging enabled, ptxas should be run with with no ptxas optimizations. // RUN: %clang -### -target x86_64-linux-gnu --cuda-noopt-device-debug -O2 -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM20 -check-prefix DBG %s +// RUN: | FileCheck -check-prefix CHECK -check-prefix ARCH64 \ +// RUN: -check-prefix SM20 -check-prefix DBG %s // --no-cuda-noopt-device-debug overrides --cuda-noopt-device-debug. // RUN: %clang -### -target x86_64-linux-gnu --cuda-noopt-device-debug \ // RUN: --no-cuda-noopt-device-debug -O2 -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM20 -check-prefix OPT2 %s +// RUN: | FileCheck -check-prefix CHECK -check-prefix ARCH64 \ +// RUN: -check-prefix SM20 -check-prefix OPT2 %s // Regular compile without -O. This should result in us passing -O0 to ptxas. // RUN: %clang -### -target x86_64-linux-gnu -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM20 -check-prefix OPT0 %s +// RUN: | FileCheck -check-prefix CHECK -check-prefix ARCH64 \ +// RUN: -check-prefix SM20 -check-prefix OPT0 %s // Regular compiles with -Os and -Oz. For lack of a better option, we map // these to ptxas -O3. // RUN: %clang -### -target x86_64-linux-gnu -Os -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM20 -check-prefix OPT2 %s +// RUN: | FileCheck -check-prefix CHECK -check-prefix ARCH64 \ +// RUN: -check-prefix SM20 -check-prefix OPT2 %s // RUN: %clang -### -target x86_64-linux-gnu -Oz -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM20 -check-prefix OPT2 %s +// RUN: | FileCheck -check-prefix CHECK -check-prefix ARCH64 \ +// RUN: -check-prefix SM20 -check-prefix OPT2 %s // Regular compile targeting sm_35. // RUN: %clang -### -target x86_64-linux-gnu --cuda-gpu-arch=sm_35 -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM35 %s +// RUN: | FileCheck -check-prefix CHECK -check-prefix ARCH64 -check-prefix SM35 %s // 32-bit compile. -// RUN: %clang -### -target x86_32-linux-gnu -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix ARCH32 -check-prefix SM20 %s +// RUN: %clang -### -target i386-linux-gnu -c %s 2>&1 \ +// RUN: | FileCheck -check-prefix CHECK -check-prefix ARCH32 -check-prefix SM20 %s // Compile with -fintegrated-as. This should still cause us to invoke ptxas. // RUN: %clang -### -target x86_64-linux-gnu -fintegrated-as -c %s 2>&1 \ -// RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM20 -check-prefix OPT0 %s +// RUN: | FileCheck -check-prefix CHECK -check-prefix ARCH64 \ +// RUN: -check-prefix SM20 -check-prefix OPT0 %s //