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

Side by Side Diff: tests_lit/llvm2ice_tests/switch-opt.ll

Issue 1233903002: Factor out legalization of undef, and handle more cases for ARM. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: stuff Created 5 years, 5 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 | « tests_lit/llvm2ice_tests/rmw.ll ('k') | tests_lit/llvm2ice_tests/undef.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 a switch statement, including multiple branches to the 1 ; This tests a switch statement, including multiple branches to the
2 ; same label which also results in phi instructions with multiple 2 ; same label which also results in phi instructions with multiple
3 ; entries for the same incoming edge. 3 ; entries for the same incoming edge.
4 4
5 ; RUN: %p2i -i %s --filetype=obj --disassemble --args -O2 | FileCheck %s 5 ; RUN: %p2i -i %s --filetype=obj --disassemble --args -O2 | FileCheck %s
6 6
7 ; TODO(jvoung): Update to -02 once the phi assignments is done for ARM 7 ; TODO(jvoung): Update to -02 once the phi assignments is done for ARM
8 ; RUN: %if --need=target_ARM32 --need=allow_dump \ 8 ; RUN: %if --need=target_ARM32 --need=allow_dump \
9 ; RUN: --command %p2i --filetype=asm --assemble --disassemble \ 9 ; RUN: --command %p2i --filetype=asm --assemble --disassemble \
10 ; RUN: --target arm32 -i %s --args -Om1 --skip-unimplemented \ 10 ; RUN: --target arm32 -i %s --args -Om1 --skip-unimplemented \
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 ; CHECK-NEXT: jne 140 ; CHECK-NEXT: jne
141 ; CHECK-NEXT: cmp {{.*}},0x0 141 ; CHECK-NEXT: cmp {{.*}},0x0
142 ; CHECK-NEXT: je 142 ; CHECK-NEXT: je
143 143
144 ; ARM32-LABEL: testSwitchImm64 144 ; ARM32-LABEL: testSwitchImm64
145 ; ARM32: cmp {{r[0-9]+}}, #1 145 ; ARM32: cmp {{r[0-9]+}}, #1
146 ; ARM32-NEXT: cmpeq {{r[0-9]+}}, #0 146 ; ARM32-NEXT: cmpeq {{r[0-9]+}}, #0
147 ; ARM32-NEXT: beq [[ADDR:[0-9a-f]+]] 147 ; ARM32-NEXT: beq [[ADDR:[0-9a-f]+]]
148 ; ARM32-NEXT: b [[ADDR]] 148 ; ARM32-NEXT: b [[ADDR]]
149 149
150 define i32 @testSwitchUndef64() {
151 entry:
152 switch i64 undef, label %sw.default [
153 i64 1, label %sw.default
154 ]
155
156 sw.default:
157 ret i32 20
158 }
159 ; CHECK-LABEL: testSwitchUndef64
160 ; CHECK: mov {{.*}},0x0
161 ; CHECK: mov {{.*}},0x0
162 ; ARM32-LABEL: testSwitchUndef64
163 ; ARM32: movw {{.*}}, #0
164 ; ARM32: movw {{.*}}, #0
OLDNEW
« no previous file with comments | « tests_lit/llvm2ice_tests/rmw.ll ('k') | tests_lit/llvm2ice_tests/undef.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698