Skip to content

Commit 118c10c

Browse files
Vandana2896LewisCrawford
authored andcommitted
upadte test
1 parent 21da083 commit 118c10c

File tree

3 files changed

+5
-11
lines changed

3 files changed

+5
-11
lines changed

llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===-- NVPTXAsmPrinter.cpp - NVPTX LLVM assembly writer ------------------===//
1+
///===-- NVPTXAsmPrinter.cpp - NVPTX LLVM assembly writer ------------------===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
@@ -1603,18 +1603,12 @@ void NVPTXAsmPrinter::emitFunctionParamList(const Function *F, raw_ostream &O) {
16031603
O << "\t.param .u" << PTySizeInBits << " ";
16041604

16051605
int addrSpace = PTy->getAddressSpace();
1606-
<<<<<<< HEAD
1607-
1608-
if (static_cast<NVPTXTargetMachine &>(TM).getDrvInterface() == NVPTX::CUDA) {
1606+
if (static_cast<NVPTXTargetMachine &>(TM).getDrvInterface() ==
1607+
NVPTX::CUDA) {
16091608
// Special handling for pointer arguments to kernel
16101609
// CUDA kernels assume that pointers are in global address space
16111610
// See:
16121611
// https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#parameter-state-space
1613-
=======
1614-
if (static_cast<NVPTXTargetMachine &>(TM).getDrvInterface() ==
1615-
NVPTX::CUDA) {
1616-
>>>>>>> 3d49f303bf57 (Update NVPTXAsmPrinter.cpp)
1617-
assert(addrSpace == 0 && "Invalid address space");
16181612
O << ".ptr .global ";
16191613
if (I->getParamAlign().valueOrOne() != 1) {
16201614
Align ParamAlign = I->getParamAlign().value();

llvm/test/CodeGen/NVPTX/i1-param.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ target triple = "nvptx-nvidia-cuda"
88

99
; CHECK: .entry foo
1010
; CHECK: .param .u8 foo_param_0
11-
; CHECK: .param .u64 foo_param_1
11+
; CHECK: .param .u64 .ptr .global foo_param_1
1212
define void @foo(i1 %p, ptr %out) {
1313
%val = zext i1 %p to i32
1414
store i32 %val, ptr %out

llvm/test/CodeGen/NVPTX/kernel-param-align.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
; CHECK-LABEL: func_align
77
; CHECK: .param .u64 .ptr .global .align 16 func_align_param_0,
88
; CHECK: .param .u64 .ptr .global func_align_param_1,
9-
; CHECK: .param .u64 .ptr .global func_align_param_2
9+
; CHECK: .param .u32 .ptr .global func_align_param_2
1010
define void @func_align(ptr nocapture readonly align 16 %input, ptr nocapture %out, ptr addrspace(3) %n) {
1111
entry:
1212
%0 = addrspacecast ptr %out to ptr addrspace(1)

0 commit comments

Comments
 (0)