~ubuntu-branches/ubuntu/quantal/llvm-3.1/quantal

« back to all changes in this revision

Viewing changes to test/Transforms/LowerAtomic/atomic-load.ll

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2012-03-29 19:09:51 UTC
  • Revision ID: package-import@ubuntu.com-20120329190951-aq83ivog4cg8bxun
Tags: upstream-3.1~svn153643
ImportĀ upstreamĀ versionĀ 3.1~svn153643

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
; RUN: opt < %s -loweratomic -S | FileCheck %s
 
2
 
 
3
define i8 @add() {
 
4
; CHECK: @add
 
5
  %i = alloca i8
 
6
  %j = atomicrmw add i8* %i, i8 42 monotonic
 
7
; CHECK: [[INST:%[a-z0-9]+]] = load
 
8
; CHECK-NEXT: add
 
9
; CHECK-NEXT: store
 
10
  ret i8 %j
 
11
; CHECK: ret i8 [[INST]]
 
12
}
 
13
 
 
14
define i8 @nand() {
 
15
; CHECK: @nand
 
16
  %i = alloca i8
 
17
  %j = atomicrmw nand i8* %i, i8 42 monotonic
 
18
; CHECK: [[INST:%[a-z0-9]+]] = load
 
19
; CHECK-NEXT: and
 
20
; CHECK-NEXT: xor
 
21
; CHECK-NEXT: store
 
22
  ret i8 %j
 
23
; CHECK: ret i8 [[INST]]
 
24
}
 
25
 
 
26
define i8 @min() {
 
27
; CHECK: @min
 
28
  %i = alloca i8
 
29
  %j = atomicrmw min i8* %i, i8 42 monotonic
 
30
; CHECK: [[INST:%[a-z0-9]+]] = load
 
31
; CHECK-NEXT: icmp
 
32
; CHECK-NEXT: select
 
33
; CHECK-NEXT: store
 
34
  ret i8 %j
 
35
; CHECK: ret i8 [[INST]]
 
36
}