Similar to 806761a762
-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 xcore-apple-darwin as ELF instead
of rejecting it outrightly.
22 lines
383 B
LLVM
22 lines
383 B
LLVM
; Test to make sure that the 'private' is used correctly.
|
|
;
|
|
; RUN: llc < %s -mtriple=xcore | FileCheck %s
|
|
|
|
define private void @foo() {
|
|
; CHECK: .Lfoo:
|
|
ret void
|
|
}
|
|
|
|
@baz = private global i32 4
|
|
|
|
define i32 @bar() {
|
|
; CHECK-LABEL: bar:
|
|
; CHECK: bl .Lfoo
|
|
; CHECK: ldw r0, dp[.Lbaz]
|
|
call void @foo()
|
|
%1 = load i32, ptr @baz, align 4
|
|
ret i32 %1
|
|
}
|
|
|
|
; CHECK: .Lbaz:
|