
Similar to 806761a7629df268c8aed49657aeccffa6bca449 -mtriple= specifies the full target triple while -march= merely sets the architecture part of the default target triple (e.g. Windows, macOS), leaving a target triple which may not make sense. Therefore, -march= is error-prone and not recommended for tests without a target triple. The issue has been benign as we recognize nvptx{,64}-apple-darwin as ELF instead of rejecting it outrightly.
30 lines
901 B
LLVM
30 lines
901 B
LLVM
; RUN: llc < %s -mtriple=nvptx -mcpu=sm_20 -mattr=+ptx43 | FileCheck %s --check-prefixes CHECK,PTX43
|
|
; RUN: llc < %s -mtriple=nvptx -mcpu=sm_20 -mattr=+ptx50 | FileCheck %s --check-prefixes CHECK,PTX50
|
|
; RUN: %if ptxas %{ llc < %s -mtriple=nvptx64 -mcpu=sm_20 -mattr=+ptx43 | %ptxas-verify %}
|
|
; RUN: %if ptxas %{ llc < %s -mtriple=nvptx64 -mcpu=sm_20 -mattr=+ptx50 | %ptxas-verify %}
|
|
|
|
; PTX43: .weak .global .align 4 .u32 g
|
|
; PTX50: .common .global .align 4 .u32 g
|
|
@g = common addrspace(1) global i32 0, align 4
|
|
|
|
; CHECK: .weak .const .align 4 .u32 c
|
|
@c = common addrspace(4) global i32 0, align 4
|
|
|
|
; CHECK: .weak .shared .align 4 .u32 s
|
|
@s = common addrspace(3) global i32 0, align 4
|
|
|
|
define i32 @f1() {
|
|
%1 = load i32, ptr addrspace(1) @g
|
|
ret i32 %1
|
|
}
|
|
|
|
define i32 @f4() {
|
|
%1 = load i32, ptr addrspace(4) @c
|
|
ret i32 %1
|
|
}
|
|
|
|
define i32 @f3() {
|
|
%1 = load i32, ptr addrspace(3) @s
|
|
ret i32 %1
|
|
}
|