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

Side by Side Diff: tests_lit/llvm2ice_tests/8bit.pnacl.ll

Issue 1118353005: Subzero: Use a setcc sequence for better icmp lowering. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Cleanup Created 5 years, 7 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/assembler/x86/sandboxing.ll ('k') | tests_lit/llvm2ice_tests/branch-opt.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 tries to be a comprehensive test of i8 operations. 1 ; This tries to be a comprehensive test of i8 operations.
2 2
3 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -O2 | FileCheck %s 3 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -O2 | FileCheck %s
4 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -Om1 | FileCheck %s 4 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -Om1 | FileCheck %s
5 5
6 define internal i32 @add8Bit(i32 %a, i32 %b) { 6 define internal i32 @add8Bit(i32 %a, i32 %b) {
7 entry: 7 entry:
8 %a_8 = trunc i32 %a to i8 8 %a_8 = trunc i32 %a to i8
9 %b_8 = trunc i32 %b to i8 9 %b_8 = trunc i32 %b to i8
10 %add = add i8 %b_8, %a_8 10 %add = add i8 %b_8, %a_8
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 entry: 275 entry:
276 %a_8 = trunc i32 %a to i8 276 %a_8 = trunc i32 %a to i8
277 %b_8 = trunc i32 %b to i8 277 %b_8 = trunc i32 %b to i8
278 %cmp = icmp slt i8 %a_8, %b_8 278 %cmp = icmp slt i8 %a_8, %b_8
279 %ret = select i1 %cmp, i8 %a_8, i8 %b_8 279 %ret = select i1 %cmp, i8 %a_8, i8 %b_8
280 %ret_ext = zext i8 %ret to i32 280 %ret_ext = zext i8 %ret to i32
281 ret i32 %ret_ext 281 ret i32 %ret_ext
282 } 282 }
283 ; CHECK-LABEL: selectI8Var 283 ; CHECK-LABEL: selectI8Var
284 ; CHECK: cmp 284 ; CHECK: cmp
285 ; CHECK: jl 285 ; CHECK: setl
286 ; CHECK: mov {{[a-d]l}} 286 ; CHECK: mov {{[a-d]l}}
287 287
288 define internal i32 @testPhi8(i32 %arg, i32 %arg2, i32 %arg3, i32 %arg4, i32 %ar g5, i32 %arg6, i32 %arg7, i32 %arg8, i32 %arg9, i32 %arg10) { 288 define internal i32 @testPhi8(i32 %arg, i32 %arg2, i32 %arg3, i32 %arg4, i32 %ar g5, i32 %arg6, i32 %arg7, i32 %arg8, i32 %arg9, i32 %arg10) {
289 entry: 289 entry:
290 %trunc = trunc i32 %arg to i8 290 %trunc = trunc i32 %arg to i8
291 %trunc2 = trunc i32 %arg2 to i8 291 %trunc2 = trunc i32 %arg2 to i8
292 %trunc3 = trunc i32 %arg3 to i8 292 %trunc3 = trunc i32 %arg3 to i8
293 %trunc4 = trunc i32 %arg4 to i8 293 %trunc4 = trunc i32 %arg4 to i8
294 %trunc5 = trunc i32 %arg5 to i8 294 %trunc5 = trunc i32 %arg5 to i8
295 %cmp1 = icmp sgt i32 %arg, 0 295 %cmp1 = icmp sgt i32 %arg, 0
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 ; CHECK: mov BYTE PTR {{.*}},{{[a-d]l}} 357 ; CHECK: mov BYTE PTR {{.*}},{{[a-d]l}}
358 358
359 define void @store_i8_const(i32 %addr_arg) { 359 define void @store_i8_const(i32 %addr_arg) {
360 entry: 360 entry:
361 %addr = inttoptr i32 %addr_arg to i8* 361 %addr = inttoptr i32 %addr_arg to i8*
362 store i8 123, i8* %addr, align 1 362 store i8 123, i8* %addr, align 1
363 ret void 363 ret void
364 } 364 }
365 ; CHECK-LABEL: store_i8_const 365 ; CHECK-LABEL: store_i8_const
366 ; CHECK: mov BYTE PTR {{.*}},0x7b 366 ; CHECK: mov BYTE PTR {{.*}},0x7b
OLDNEW
« no previous file with comments | « tests_lit/assembler/x86/sandboxing.ll ('k') | tests_lit/llvm2ice_tests/branch-opt.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698