Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1412)

Unified Diff: test/Transforms/NaCl/resolve-pnacl-intrinsics.ll

Issue 22474008: Add the new @llvm.nacl.atomic.fence.all intrinsic (Closed) Base URL: http://git.chromium.org/native_client/pnacl-llvm.git@master
Patch Set: Add note suggested by jvoung. Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/Transforms/NaCl/remove-asm-memory.ll ('k') | test/Transforms/NaCl/rewrite-asm-memory.ll » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/Transforms/NaCl/resolve-pnacl-intrinsics.ll
diff --git a/test/Transforms/NaCl/resolve-pnacl-intrinsics.ll b/test/Transforms/NaCl/resolve-pnacl-intrinsics.ll
index 737561ee1d1b13dd2b5834a5691273faccf54089..0a297057fe26eb9dc5c99b123c36604704044e54 100644
--- a/test/Transforms/NaCl/resolve-pnacl-intrinsics.ll
+++ b/test/Transforms/NaCl/resolve-pnacl-intrinsics.ll
@@ -29,6 +29,7 @@ declare i16 @llvm.nacl.atomic.cmpxchg.i16(i16*, i16, i16, i32, i32)
declare i32 @llvm.nacl.atomic.cmpxchg.i32(i32*, i32, i32, i32, i32)
declare i64 @llvm.nacl.atomic.cmpxchg.i64(i64*, i64, i64, i32, i32)
declare void @llvm.nacl.atomic.fence(i32)
+declare void @llvm.nacl.atomic.fence.all()
declare i1 @llvm.nacl.atomic.is.lock.free(i32, i8*)
; These declarations must be here because the function pass expects
@@ -93,10 +94,19 @@ define i32 @test_val_compare_and_swap_i32(i32* %ptr, i32 %oldval, i32 %newval) {
ret i32 %1
}
+; CHECK: @test_c11_fence
+define void @test_c11_fence() {
+ ; CHECK: fence seq_cst
+ call void @llvm.nacl.atomic.fence(i32 6)
+ ret void
+}
+
; CHECK: @test_synchronize
define void @test_synchronize() {
+ ; CHECK: call void asm sideeffect "", "~{memory}"()
; CHECK: fence seq_cst
- call void @llvm.nacl.atomic.fence(i32 6)
+ ; CHECK: call void asm sideeffect "", "~{memory}"()
+ call void @llvm.nacl.atomic.fence.all()
ret void
}
« no previous file with comments | « test/Transforms/NaCl/remove-asm-memory.ll ('k') | test/Transforms/NaCl/rewrite-asm-memory.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698