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.
44 lines
883 B
LLVM
44 lines
883 B
LLVM
; RUN: llc < %s -mtriple=xcore | FileCheck %s
|
|
|
|
; CHECK-LABEL: atomic_fence
|
|
; CHECK: #MEMBARRIER
|
|
; CHECK: #MEMBARRIER
|
|
; CHECK: #MEMBARRIER
|
|
; CHECK: #MEMBARRIER
|
|
; CHECK: retsp 0
|
|
define void @atomic_fence() nounwind {
|
|
entry:
|
|
fence acquire
|
|
fence release
|
|
fence acq_rel
|
|
fence seq_cst
|
|
ret void
|
|
}
|
|
|
|
@pool = external global i64
|
|
|
|
define void @atomicloadstore() nounwind {
|
|
entry:
|
|
; CHECK-LABEL: atomicloadstore
|
|
|
|
; CHECK: __atomic_load_4
|
|
%0 = load atomic i32, ptr @pool seq_cst, align 4
|
|
|
|
; CHECK: __atomic_load_2
|
|
%1 = load atomic i16, ptr @pool seq_cst, align 2
|
|
|
|
; CHECK: __atomic_load_1
|
|
%2 = load atomic i8, ptr @pool seq_cst, align 1
|
|
|
|
; CHECK: __atomic_store_4
|
|
store atomic i32 %0, ptr @pool seq_cst, align 4
|
|
|
|
; CHECK: __atomic_store_2
|
|
store atomic i16 %1, ptr @pool seq_cst, align 2
|
|
|
|
; CHECK: __atomic_store_1
|
|
store atomic i8 %2, ptr @pool seq_cst, align 1
|
|
|
|
ret void
|
|
}
|