Mercurial > hg > CbC > CbC_llvm
comparison test/CodeGen/X86/atomic_add.ll @ 83:60c9769439b8 LLVM3.7
LLVM 3.7
author | Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 18 Feb 2015 14:55:36 +0900 |
parents | 95c75e76d11b |
children | 803732b1fca8 |
comparison
equal
deleted
inserted
replaced
78:af83660cff7b | 83:60c9769439b8 |
---|---|
1 ; RUN: llc < %s -march=x86-64 -verify-machineinstrs | FileCheck %s | 1 ; RUN: llc < %s -march=x86-64 -verify-machineinstrs | FileCheck %s |
2 ; RUN: llc < %s -march=x86-64 -mattr=slow-incdec -verify-machineinstrs | FileCheck %s --check-prefix SLOW_INC | |
2 | 3 |
3 ; rdar://7103704 | 4 ; rdar://7103704 |
4 | 5 |
5 define void @sub1(i32* nocapture %p, i32 %v) nounwind ssp { | 6 define void @sub1(i32* nocapture %p, i32 %v) nounwind ssp { |
6 entry: | 7 entry: |
12 | 13 |
13 define void @inc4(i64* nocapture %p) nounwind ssp { | 14 define void @inc4(i64* nocapture %p) nounwind ssp { |
14 entry: | 15 entry: |
15 ; CHECK-LABEL: inc4: | 16 ; CHECK-LABEL: inc4: |
16 ; CHECK: incq | 17 ; CHECK: incq |
18 ; SLOW_INC-LABEL: inc4: | |
19 ; SLOW_INC-NOT: incq | |
17 %0 = atomicrmw add i64* %p, i64 1 monotonic | 20 %0 = atomicrmw add i64* %p, i64 1 monotonic |
18 ret void | 21 ret void |
19 } | 22 } |
20 | 23 |
21 define void @add8(i64* nocapture %p) nounwind ssp { | 24 define void @add8(i64* nocapture %p) nounwind ssp { |
37 | 40 |
38 define void @inc3(i8* nocapture %p) nounwind ssp { | 41 define void @inc3(i8* nocapture %p) nounwind ssp { |
39 entry: | 42 entry: |
40 ; CHECK-LABEL: inc3: | 43 ; CHECK-LABEL: inc3: |
41 ; CHECK: incb | 44 ; CHECK: incb |
45 ; SLOW_INC-LABEL: inc3: | |
46 ; SLOW_INC-NOT: incb | |
42 %0 = atomicrmw add i8* %p, i8 1 monotonic | 47 %0 = atomicrmw add i8* %p, i8 1 monotonic |
43 ret void | 48 ret void |
44 } | 49 } |
45 | 50 |
46 define void @add7(i8* nocapture %p) nounwind ssp { | 51 define void @add7(i8* nocapture %p) nounwind ssp { |
62 | 67 |
63 define void @inc2(i16* nocapture %p) nounwind ssp { | 68 define void @inc2(i16* nocapture %p) nounwind ssp { |
64 entry: | 69 entry: |
65 ; CHECK-LABEL: inc2: | 70 ; CHECK-LABEL: inc2: |
66 ; CHECK: incw | 71 ; CHECK: incw |
72 ; SLOW_INC-LABEL: inc2: | |
73 ; SLOW_INC-NOT: incw | |
67 %0 = atomicrmw add i16* %p, i16 1 monotonic | 74 %0 = atomicrmw add i16* %p, i16 1 monotonic |
68 ret void | 75 ret void |
69 } | 76 } |
70 | 77 |
71 define void @add6(i16* nocapture %p) nounwind ssp { | 78 define void @add6(i16* nocapture %p) nounwind ssp { |
87 | 94 |
88 define void @inc1(i32* nocapture %p) nounwind ssp { | 95 define void @inc1(i32* nocapture %p) nounwind ssp { |
89 entry: | 96 entry: |
90 ; CHECK-LABEL: inc1: | 97 ; CHECK-LABEL: inc1: |
91 ; CHECK: incl | 98 ; CHECK: incl |
99 ; SLOW_INC-LABEL: inc1: | |
100 ; SLOW_INC-NOT: incl | |
92 %0 = atomicrmw add i32* %p, i32 1 monotonic | 101 %0 = atomicrmw add i32* %p, i32 1 monotonic |
93 ret void | 102 ret void |
94 } | 103 } |
95 | 104 |
96 define void @add5(i32* nocapture %p) nounwind ssp { | 105 define void @add5(i32* nocapture %p) nounwind ssp { |
111 | 120 |
112 define void @dec4(i64* nocapture %p) nounwind ssp { | 121 define void @dec4(i64* nocapture %p) nounwind ssp { |
113 entry: | 122 entry: |
114 ; CHECK-LABEL: dec4: | 123 ; CHECK-LABEL: dec4: |
115 ; CHECK: decq | 124 ; CHECK: decq |
125 ; SLOW_INC-LABEL: dec4: | |
126 ; SLOW_INC-NOT: decq | |
116 %0 = atomicrmw sub i64* %p, i64 1 monotonic | 127 %0 = atomicrmw sub i64* %p, i64 1 monotonic |
117 ret void | 128 ret void |
118 } | 129 } |
119 | 130 |
120 define void @sub8(i64* nocapture %p) nounwind ssp { | 131 define void @sub8(i64* nocapture %p) nounwind ssp { |
136 | 147 |
137 define void @dec3(i8* nocapture %p) nounwind ssp { | 148 define void @dec3(i8* nocapture %p) nounwind ssp { |
138 entry: | 149 entry: |
139 ; CHECK-LABEL: dec3: | 150 ; CHECK-LABEL: dec3: |
140 ; CHECK: decb | 151 ; CHECK: decb |
152 ; SLOW_INC-LABEL: dec3: | |
153 ; SLOW_INC-NOT: decb | |
141 %0 = atomicrmw sub i8* %p, i8 1 monotonic | 154 %0 = atomicrmw sub i8* %p, i8 1 monotonic |
142 ret void | 155 ret void |
143 } | 156 } |
144 | 157 |
145 define void @sub7(i8* nocapture %p) nounwind ssp { | 158 define void @sub7(i8* nocapture %p) nounwind ssp { |
161 | 174 |
162 define void @dec2(i16* nocapture %p) nounwind ssp { | 175 define void @dec2(i16* nocapture %p) nounwind ssp { |
163 entry: | 176 entry: |
164 ; CHECK-LABEL: dec2: | 177 ; CHECK-LABEL: dec2: |
165 ; CHECK: decw | 178 ; CHECK: decw |
179 ; SLOW_INC-LABEL: dec2: | |
180 ; SLOW_INC-NOT: decw | |
166 %0 = atomicrmw sub i16* %p, i16 1 monotonic | 181 %0 = atomicrmw sub i16* %p, i16 1 monotonic |
167 ret void | 182 ret void |
168 } | 183 } |
169 | 184 |
170 define void @sub6(i16* nocapture %p) nounwind ssp { | 185 define void @sub6(i16* nocapture %p) nounwind ssp { |
187 | 202 |
188 define void @dec1(i32* nocapture %p) nounwind ssp { | 203 define void @dec1(i32* nocapture %p) nounwind ssp { |
189 entry: | 204 entry: |
190 ; CHECK-LABEL: dec1: | 205 ; CHECK-LABEL: dec1: |
191 ; CHECK: decl | 206 ; CHECK: decl |
207 ; SLOW_INC-LABEL: dec1: | |
208 ; SLOW_INC-NOT: decl | |
192 %0 = atomicrmw sub i32* %p, i32 1 monotonic | 209 %0 = atomicrmw sub i32* %p, i32 1 monotonic |
193 ret void | 210 ret void |
194 } | 211 } |
195 | 212 |
196 define void @sub5(i32* nocapture %p) nounwind ssp { | 213 define void @sub5(i32* nocapture %p) nounwind ssp { |