|
| 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 | + |
1 | 8 | // RUN: %clang_cc1 -fsycl-is-device -disable-llvm-passes \ |
2 | 9 | // RUN: -triple nvptx-nvidia-cuda -emit-llvm -fcuda-short-ptr -mllvm -nvptx-short-ptr %s -o - \ |
3 | 10 | // RUN: | FileCheck %s --check-prefix CHECK32 |
4 | 11 |
|
| 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 | + |
5 | 16 | // RUN: %clang_cc1 -fsycl-is-device -disable-llvm-passes \ |
6 | 17 | // 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 |
8 | 19 |
|
| 20 | +// Targeting a 32-bit NVPTX, check that we see universal 32-bit pointers (the |
| 21 | +// option changes nothing) |
9 | 22 | // 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