Skip to content

Commit 516261c

Browse files
committed
update test with comments and more checks
1 parent b2301c3 commit 516261c

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed
Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,27 @@
1+
// Check that when we see the expected data layouts for NVPTX when we pass the
2+
// -nvptx-short-ptr option.
3+
4+
// RUN: %clang_cc1 -fsycl-is-device -disable-llvm-passes \
5+
// RUN: -triple nvptx-nvidia-cuda -emit-llvm %s -o - \
6+
// RUN: | FileCheck %s --check-prefix CHECK32
7+
18
// RUN: %clang_cc1 -fsycl-is-device -disable-llvm-passes \
29
// RUN: -triple nvptx-nvidia-cuda -emit-llvm -fcuda-short-ptr -mllvm -nvptx-short-ptr %s -o - \
310
// RUN: | FileCheck %s --check-prefix CHECK32
411

12+
// RUN: %clang_cc1 -fsycl-is-device -disable-llvm-passes \
13+
// RUN: -triple nvptx64-nvidia-cuda -emit-llvm %s -o - \
14+
// RUN: | FileCheck %s --check-prefix CHECK64-DEFAULT
15+
516
// RUN: %clang_cc1 -fsycl-is-device -disable-llvm-passes \
617
// RUN: -triple nvptx64-nvidia-cuda -emit-llvm -fcuda-short-ptr -mllvm -nvptx-short-ptr %s -o - \
7-
// RUN: | FileCheck %s --check-prefix CHECK64
18+
// RUN: | FileCheck %s --check-prefix CHECK64-SHORT
819

20+
// Targeting a 32-bit NVPTX, check that we see universal 32-bit pointers (the
21+
// option changes nothing)
922
// CHECK32: target datalayout = "e-p:32:32-i64:64-i128:128-v16:16-v32:32-n16:32:64"
10-
// CHECK64: target datalayout = "e-p3:32:32-p4:32:32-p5:32:32-i64:64-i128:128-v16:16-v32:32-n16:32:64"
23+
24+
// Targeting a 64-bit NVPTX target, check that we see 32-bit pointers for
25+
// shared (3), const (4), and local (5) address spaces only.
26+
// CHECK64-DEFAULT: target datalayout = "e-i64:64-i128:128-v16:16-v32:32-n16:32:64"
27+
// CHECK64-SHORT: target datalayout = "e-p3:32:32-p4:32:32-p5:32:32-i64:64-i128:128-v16:16-v32:32-n16:32:64"

0 commit comments

Comments
 (0)