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

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

Issue 588893005: Subzero: Make tests stricter after fixing "lock foo" bundling bug. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « no previous file | tests_lit/llvm2ice_tests/nacl-atomic-intrinsics.ll » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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: %llvm2ice -O2 --verbose none %s \ 3 ; RUN: %llvm2ice -O2 --verbose none %s \
4 ; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ 4 ; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
5 ; RUN: | llvm-objdump -d -symbolize -x86-asm-syntax=intel - \ 5 ; RUN: | llvm-objdump -d -symbolize -x86-asm-syntax=intel - \
6 ; RUN: | FileCheck --check-prefix=O2 %s 6 ; RUN: | FileCheck --check-prefix=O2 %s
7 ; RUN: %llvm2ice -Om1 --verbose none %s \ 7 ; RUN: %llvm2ice -Om1 --verbose none %s \
8 ; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ 8 ; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
9 ; RUN: | llvm-objdump -d -symbolize -x86-asm-syntax=intel - \ 9 ; RUN: | llvm-objdump -d -symbolize -x86-asm-syntax=intel - \
10 ; RUN: | FileCheck --check-prefix=OM1 %s 10 ; RUN: | FileCheck --check-prefix=OM1 %s
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 %old = call i32 @llvm.nacl.atomic.cmpxchg.i32(i32* %ptr, i32 0, 92 %old = call i32 @llvm.nacl.atomic.cmpxchg.i32(i32* %ptr, i32 0,
93 i32 %desired, i32 6, i32 6) 93 i32 %desired, i32 6, i32 6)
94 %success = icmp eq i32 %old, 0 94 %success = icmp eq i32 %old, 0
95 br i1 %success, label %done, label %loop 95 br i1 %success, label %done, label %loop
96 96
97 done: 97 done:
98 ret i32 %succeeded_first_try 98 ret i32 %succeeded_first_try
99 } 99 }
100 ; O2-LABEL: test_atomic_cmpxchg_loop_const 100 ; O2-LABEL: test_atomic_cmpxchg_loop_const
101 ; O2: lock 101 ; O2: lock
102 ; Should be using NEXT: see issue 3929 102 ; O2-NEXT: cmpxchg dword ptr [e{{[^a].}}], e{{[^a]}}
103 ; O2: cmpxchg dword ptr [e{{[^a].}}], e{{[^a]}}
104 ; O2-NOT: cmp 103 ; O2-NOT: cmp
105 ; O2: jne 104 ; O2: jne
106 105
107 ; This is a case where the flags cannot be reused (compare is for some 106 ; This is a case where the flags cannot be reused (compare is for some
108 ; other condition). 107 ; other condition).
109 define i32 @test_atomic_cmpxchg_no_opt(i32 %iptr, i32 %expected, i32 %desired) { 108 define i32 @test_atomic_cmpxchg_no_opt(i32 %iptr, i32 %expected, i32 %desired) {
110 entry: 109 entry:
111 br label %loop 110 br label %loop
112 111
113 loop: 112 loop:
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 } 147 }
149 ; O2-LABEL: test_atomic_cmpxchg_no_opt2 148 ; O2-LABEL: test_atomic_cmpxchg_no_opt2
150 ; O2: lock 149 ; O2: lock
151 ; O2-NEXT: cmpxchg dword ptr [e{{[^a].}}], e{{[^a]}} 150 ; O2-NEXT: cmpxchg dword ptr [e{{[^a].}}], e{{[^a]}}
152 ; O2: mov {{.*}} 151 ; O2: mov {{.*}}
153 ; O2: cmp 152 ; O2: cmp
154 ; O2: je 153 ; O2: je
155 154
156 ; ERRORS-NOT: ICE translation error 155 ; ERRORS-NOT: ICE translation error
157 ; DUMP-NOT: SZ 156 ; DUMP-NOT: SZ
OLDNEW
« no previous file with comments | « no previous file | tests_lit/llvm2ice_tests/nacl-atomic-intrinsics.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698