Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[NVPTX] Fix pointer type for short 32-bit pointers
Global variables used to be printed as u64/b64 even when -nvptx-short-ptr is set. Differential Revision: https://reviews.llvm.org/D127668
- Loading branch information
Showing
2 changed files
with
23 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
; RUN: llc < %s -march=nvptx64 -mcpu=sm_20 | FileCheck %s --check-prefix CHECK-DEFAULT | ||
; RUN: llc < %s -march=nvptx -mcpu=sm_20 | FileCheck %s --check-prefix CHECK-DEFAULT-32 | ||
; RUN: llc < %s -march=nvptx64 -mcpu=sm_20 -nvptx-short-ptr | FileCheck %s --check-prefixes CHECK-SHORT-SHARED,CHECK-SHORT-CONST | ||
|
||
; RUN: %if ptxas %{ llc < %s -march=nvptx -mcpu=sm_20 | %ptxas-verify %} | ||
; RUN: %if ptxas %{ llc < %s -march=nvptx64 -mcpu=sm_20 | %ptxas-verify %} | ||
; RUN: %if ptxas %{ llc < %s -march=nvptx64 -mcpu=sm_20 -nvptx-short-ptr | %ptxas-verify %} | ||
|
||
; CHECK-DEFAULT: .visible .shared .align 8 .u64 s | ||
; CHECK-DEFAULT-32: .visible .shared .align 8 .u32 s | ||
; CHECK-SHORT-SHARED: .visible .shared .align 8 .u32 s | ||
@s = local_unnamed_addr addrspace(3) global i32 addrspace(3)* null, align 8 | ||
|
||
; CHECK-DEFAULT: .visible .const .align 8 .u64 c | ||
; CHECK-DEFAULT-32: .visible .const .align 8 .u32 c | ||
; CHECK-SHORT-CONST: .visible .const .align 8 .u32 c | ||
@c = local_unnamed_addr addrspace(4) global i32 addrspace(4)* null, align 8 |