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

Side by Side Diff: tests_lit/llvm2ice_tests/nacl-atomic-cmpxchg-optimization.ll

Issue 955003002: Subzero: Clean up function header emission. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix the tests that were broken as a result Created 5 years, 9 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 ; This tests the optimization of atomic cmpxchg w/ following cmp + branches. 1 ; This tests the optimization of atomic cmpxchg w/ following cmp + branches.
2 2
3 ; RUN: %p2i -i %s --assemble --disassemble --args -O2 --verbose none \ 3 ; RUN: %p2i -i %s --filetype=obj --disassemble --args -O2 \
4 ; RUN: | FileCheck --check-prefix=O2 %s 4 ; RUN: | FileCheck --check-prefix=O2 %s
5 ; RUN: %p2i -i %s --assemble --disassemble --args -Om1 --verbose none \ 5 ; RUN: %p2i -i %s --filetype=obj --disassemble --args -Om1 \
6 ; RUN: | FileCheck --check-prefix=OM1 %s 6 ; RUN: | FileCheck --check-prefix=OM1 %s
7 7
8 declare i32 @llvm.nacl.atomic.cmpxchg.i32(i32*, i32, i32, i32, i32) 8 declare i32 @llvm.nacl.atomic.cmpxchg.i32(i32*, i32, i32, i32, i32)
9 9
10 10
11 ; Test that a cmpxchg followed by icmp eq and branch can be optimized to 11 ; Test that a cmpxchg followed by icmp eq and branch can be optimized to
12 ; reuse the flags set by the cmpxchg instruction itself. 12 ; reuse the flags set by the cmpxchg instruction itself.
13 ; This is only expected to work w/ O2, based on lightweight liveness. 13 ; This is only expected to work w/ O2, based on lightweight liveness.
14 ; (Or if we had other means to detect the only use). 14 ; (Or if we had other means to detect the only use).
15 declare void @use_value(i32) 15 declare void @use_value(i32)
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 124
125 done: 125 done:
126 %r = zext i1 %success to i32 126 %r = zext i1 %success to i32
127 ret i32 %r 127 ret i32 %r
128 } 128 }
129 ; O2-LABEL: test_atomic_cmpxchg_no_opt2 129 ; O2-LABEL: test_atomic_cmpxchg_no_opt2
130 ; O2: lock cmpxchg DWORD PTR [e{{[^a].}}],e{{[^a]}} 130 ; O2: lock cmpxchg DWORD PTR [e{{[^a].}}],e{{[^a]}}
131 ; O2: mov {{.*}} 131 ; O2: mov {{.*}}
132 ; O2: cmp 132 ; O2: cmp
133 ; O2: je 133 ; O2: je
OLDNEW
« no previous file with comments | « tests_lit/llvm2ice_tests/ias-multi-reloc.ll ('k') | tests_lit/llvm2ice_tests/nacl-atomic-fence-all.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698