You've already forked linux-packaging-mono
Imported Upstream version 5.18.0.167
Former-commit-id: 289509151e0fee68a1b591a20c9f109c3c789d3a
This commit is contained in:
parent
e19d552987
commit
b084638f15
@ -1,37 +0,0 @@
|
||||
; RUN: opt < %s -loweratomic -S | FileCheck %s
|
||||
; RUN: opt < %s -passes=loweratomic -S | FileCheck %s
|
||||
|
||||
define i8 @add() {
|
||||
; CHECK-LABEL: @add(
|
||||
%i = alloca i8
|
||||
%j = atomicrmw add i8* %i, i8 42 monotonic
|
||||
; CHECK: [[INST:%[a-z0-9]+]] = load
|
||||
; CHECK-NEXT: add
|
||||
; CHECK-NEXT: store
|
||||
ret i8 %j
|
||||
; CHECK: ret i8 [[INST]]
|
||||
}
|
||||
|
||||
define i8 @nand() {
|
||||
; CHECK-LABEL: @nand(
|
||||
%i = alloca i8
|
||||
%j = atomicrmw nand i8* %i, i8 42 monotonic
|
||||
; CHECK: [[INST:%[a-z0-9]+]] = load
|
||||
; CHECK-NEXT: and
|
||||
; CHECK-NEXT: xor
|
||||
; CHECK-NEXT: store
|
||||
ret i8 %j
|
||||
; CHECK: ret i8 [[INST]]
|
||||
}
|
||||
|
||||
define i8 @min() {
|
||||
; CHECK-LABEL: @min(
|
||||
%i = alloca i8
|
||||
%j = atomicrmw min i8* %i, i8 42 monotonic
|
||||
; CHECK: [[INST:%[a-z0-9]+]] = load
|
||||
; CHECK-NEXT: icmp
|
||||
; CHECK-NEXT: select
|
||||
; CHECK-NEXT: store
|
||||
ret i8 %j
|
||||
; CHECK: ret i8 [[INST]]
|
||||
}
|
@ -1,39 +0,0 @@
|
||||
; RUN: opt < %s -loweratomic -S | FileCheck %s
|
||||
|
||||
define i8 @cmpswap() {
|
||||
; CHECK-LABEL: @cmpswap(
|
||||
%i = alloca i8
|
||||
%pair = cmpxchg i8* %i, i8 0, i8 42 monotonic monotonic
|
||||
%j = extractvalue { i8, i1 } %pair, 0
|
||||
; CHECK: [[OLDVAL:%[a-z0-9]+]] = load i8, i8* [[ADDR:%[a-z0-9]+]]
|
||||
; CHECK-NEXT: [[SAME:%[a-z0-9]+]] = icmp eq i8 [[OLDVAL]], 0
|
||||
; CHECK-NEXT: [[TO_STORE:%[a-z0-9]+]] = select i1 [[SAME]], i8 42, i8 [[OLDVAL]]
|
||||
; CHECK-NEXT: store i8 [[TO_STORE]], i8* [[ADDR]]
|
||||
; CHECK-NEXT: [[TMP:%[a-z0-9]+]] = insertvalue { i8, i1 } undef, i8 [[OLDVAL]], 0
|
||||
; CHECK-NEXT: [[RES:%[a-z0-9]+]] = insertvalue { i8, i1 } [[TMP]], i1 [[SAME]], 1
|
||||
; CHECK-NEXT: [[VAL:%[a-z0-9]+]] = extractvalue { i8, i1 } [[RES]], 0
|
||||
ret i8 %j
|
||||
; CHECK: ret i8 [[VAL]]
|
||||
}
|
||||
|
||||
|
||||
define i8 @swap() {
|
||||
; CHECK-LABEL: @swap(
|
||||
%i = alloca i8
|
||||
%j = atomicrmw xchg i8* %i, i8 42 monotonic
|
||||
; CHECK: [[INST:%[a-z0-9]+]] = load
|
||||
; CHECK-NEXT: store
|
||||
ret i8 %j
|
||||
; CHECK: ret i8 [[INST]]
|
||||
}
|
||||
|
||||
|
||||
define i8 @swap_optnone() noinline optnone {
|
||||
; CHECK-LABEL: @swap_optnone(
|
||||
%i = alloca i8
|
||||
%j = atomicrmw xchg i8* %i, i8 42 monotonic
|
||||
; CHECK: [[INST:%[a-z0-9]+]] = load
|
||||
; CHECK-NEXT: store
|
||||
ret i8 %j
|
||||
; CHECK: ret i8 [[INST]]
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
; RUN: opt < %s -loweratomic -S | FileCheck %s
|
||||
|
||||
define void @barrier() {
|
||||
; CHECK-LABEL: @barrier(
|
||||
fence seq_cst
|
||||
; CHECK-NEXT: ret
|
||||
ret void
|
||||
}
|
Reference in New Issue
Block a user