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

Side by Side Diff: test/Transforms/NaCl/atomic/atomic_others.ll

Issue 857403002: Emit atomic memory order other than seq_cst on demand only (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-llvm.git@master
Patch Set: Add test for -pnacl-memory-order-seq-cst-only=true Created 5 years, 11 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 unified diff | Download patch
OLDNEW
1 ; RUN: opt -nacl-rewrite-atomics -S < %s | FileCheck %s 1 ; RUN: opt -nacl-rewrite-atomics -pnacl-memory-order-seq-cst-only=false -S < %s | FileCheck %s
2 ; 2 ;
3 ; Validate that atomic non-{acquire/release/acq_rel/seq_cst} loads/stores get 3 ; Validate that atomic non-{acquire/release/acq_rel/seq_cst} loads/stores get
4 ; rewritten into NaCl atomic builtins with sequentially consistent memory 4 ; rewritten into NaCl atomic builtins with sequentially consistent memory
5 ; ordering (enum value 6), and that acquire/release/acq_rel remain as-is (enum 5 ; ordering (enum value 6), and that acquire/release/acq_rel remain as-is (enum
6 ; values 3/4/5). 6 ; values 3/4/5).
7 ; 7 ;
8 ; Note that monotonic doesn't exist in C11/C++11, and consume isn't implemented 8 ; Note that monotonic doesn't exist in C11/C++11, and consume isn't implemented
9 ; in LLVM yet. 9 ; in LLVM yet.
10 10
11 target datalayout = "p:32:32:32" 11 target datalayout = "p:32:32:32"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 ret { i32, i1 } %res 121 ret { i32, i1 } %res
122 } 122 }
123 123
124 ; CHECK-LABEL: @test_cmpxchg_relaxed_relaxed 124 ; CHECK-LABEL: @test_cmpxchg_relaxed_relaxed
125 define { i32, i1 } @test_cmpxchg_relaxed_relaxed(i32* %ptr, i32 %value) { 125 define { i32, i1 } @test_cmpxchg_relaxed_relaxed(i32* %ptr, i32 %value) {
126 ; Failure ordering is upgraded. 126 ; Failure ordering is upgraded.
127 ; CHECK-NEXT: %res = call i32 @llvm.nacl.atomic.cmpxchg.i32(i32* %ptr, i32 0, i32 %value, i32 6, i32 6) 127 ; CHECK-NEXT: %res = call i32 @llvm.nacl.atomic.cmpxchg.i32(i32* %ptr, i32 0, i32 %value, i32 6, i32 6)
128 %res = cmpxchg i32* %ptr, i32 0, i32 %value monotonic monotonic 128 %res = cmpxchg i32* %ptr, i32 0, i32 %value monotonic monotonic
129 ret { i32, i1 } %res 129 ret { i32, i1 } %res
130 } 130 }
OLDNEW
« no previous file with comments | « test/Transforms/NaCl/atomic/atomic-seq-cst-only.ll ('k') | test/Transforms/NaCl/atomic/lock_.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698