Update Transforms tests to use CHECK-LABEL for easier debugging. No functionality...
[oota-llvm.git] / test / Transforms / LowerAtomic / atomic-swap.ll
1 ; RUN: opt < %s -loweratomic -S | FileCheck %s
2
3 define i8 @cmpswap() {
4 ; CHECK-LABEL: @cmpswap(
5   %i = alloca i8
6   %j = cmpxchg i8* %i, i8 0, i8 42 monotonic
7 ; CHECK: [[INST:%[a-z0-9]+]] = load
8 ; CHECK-NEXT: icmp
9 ; CHECK-NEXT: select
10 ; CHECK-NEXT: store
11   ret i8 %j
12 ; CHECK: ret i8 [[INST]]
13 }
14
15 define i8 @swap() {
16 ; CHECK-LABEL: @swap(
17   %i = alloca i8
18   %j = atomicrmw xchg i8* %i, i8 42 monotonic
19 ; CHECK: [[INST:%[a-z0-9]+]] = load
20 ; CHECK-NEXT: store
21   ret i8 %j
22 ; CHECK: ret i8 [[INST]]
23 }