1*67e74705SXin Li // Tests that "sm_XX" gets correctly converted to "compute_YY" when we invoke 2*67e74705SXin Li // fatbinary. 3*67e74705SXin Li // 4*67e74705SXin Li // REQUIRES: clang-driver 5*67e74705SXin Li // REQUIRES: x86-registered-target 6*67e74705SXin Li // REQUIRES: nvptx-registered-target 7*67e74705SXin Li 8*67e74705SXin Li // CHECK:fatbinary 9*67e74705SXin Li 10*67e74705SXin Li // RUN: %clang -### -target x86_64-linux-gnu -c --cuda-gpu-arch=sm_20 %s 2>&1 \ 11*67e74705SXin Li // RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM20 %s 12*67e74705SXin Li // RUN: %clang -### -target x86_64-linux-gnu -c --cuda-gpu-arch=sm_21 %s 2>&1 \ 13*67e74705SXin Li // RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM21 %s 14*67e74705SXin Li // RUN: %clang -### -target x86_64-linux-gnu -c --cuda-gpu-arch=sm_30 %s 2>&1 \ 15*67e74705SXin Li // RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM30 %s 16*67e74705SXin Li // RUN: %clang -### -target x86_64-linux-gnu -c --cuda-gpu-arch=sm_32 %s 2>&1 \ 17*67e74705SXin Li // RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM32 %s 18*67e74705SXin Li // RUN: %clang -### -target x86_64-linux-gnu -c --cuda-gpu-arch=sm_35 %s 2>&1 \ 19*67e74705SXin Li // RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM35 %s 20*67e74705SXin Li // RUN: %clang -### -target x86_64-linux-gnu -c --cuda-gpu-arch=sm_37 %s 2>&1 \ 21*67e74705SXin Li // RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM37 %s 22*67e74705SXin Li // RUN: %clang -### -target x86_64-linux-gnu -c --cuda-gpu-arch=sm_50 %s 2>&1 \ 23*67e74705SXin Li // RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM50 %s 24*67e74705SXin Li // RUN: %clang -### -target x86_64-linux-gnu -c --cuda-gpu-arch=sm_52 %s 2>&1 \ 25*67e74705SXin Li // RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM52 %s 26*67e74705SXin Li // RUN: %clang -### -target x86_64-linux-gnu -c --cuda-gpu-arch=sm_53 %s 2>&1 \ 27*67e74705SXin Li // RUN: | FileCheck -check-prefix ARCH64 -check-prefix SM53 %s 28*67e74705SXin Li 29*67e74705SXin Li // SM20:--image=profile=sm_20{{.*}}--image=profile=compute_20 30*67e74705SXin Li // SM21:--image=profile=sm_21{{.*}}--image=profile=compute_20 31*67e74705SXin Li // SM30:--image=profile=sm_30{{.*}}--image=profile=compute_30 32*67e74705SXin Li // SM32:--image=profile=sm_32{{.*}}--image=profile=compute_32 33*67e74705SXin Li // SM35:--image=profile=sm_35{{.*}}--image=profile=compute_35 34*67e74705SXin Li // SM37:--image=profile=sm_37{{.*}}--image=profile=compute_37 35*67e74705SXin Li // SM50:--image=profile=sm_50{{.*}}--image=profile=compute_50 36*67e74705SXin Li // SM52:--image=profile=sm_52{{.*}}--image=profile=compute_52 37*67e74705SXin Li // SM53:--image=profile=sm_53{{.*}}--image=profile=compute_53 38