llvm.org GIT mirror llvm / 07efe87
Add some tests for NVPTX lowering of cmpxchg git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213586 91177308-0d34-0410-b5e6-96231b3b80d8 Eli Bendersky 5 years ago
1 changed file(s) with 14 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
165165 %ret = call float @llvm.nvvm.atomic.load.add.f32.p3f32(float addrspace(3)* %addr, float %val)
166166 ret float %ret
167167 }
168
169 ; CHECK-LABEL: atomic_cmpxchg_i32
170 define i32 @atomic_cmpxchg_i32(i32* %addr, i32 %cmp, i32 %new) {
171 ; CHECK: atom.cas.b32
172 %pairold = cmpxchg i32* %addr, i32 %cmp, i32 %new seq_cst seq_cst
173 ret i32 %new
174 }
175
176 ; CHECK-LABEL: atomic_cmpxchg_i64
177 define i64 @atomic_cmpxchg_i64(i64* %addr, i64 %cmp, i64 %new) {
178 ; CHECK: atom.cas.b64
179 %pairold = cmpxchg i64* %addr, i64 %cmp, i64 %new seq_cst seq_cst
180 ret i64 %new
181 }