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

Side by Side Diff: tests_lit/llvm2ice_tests/nacl-mem-intrinsics.ll

Issue 2215553002: Subzero: Fix sign issues for inlined memset lowering. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 4 years, 4 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 | « src/IceTargetLoweringX86BaseImpl.h ('k') | no next file » | 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 NaCl intrinsics memset, memcpy and memmove. 1 ; This tests the NaCl intrinsics memset, memcpy and memmove.
2 2
3 ; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --disassemble \ 3 ; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --disassemble \
4 ; RUN: --target x8632 --sandbox -i %s --args -O2 \ 4 ; RUN: --target x8632 --sandbox -i %s --args -O2 \
5 ; RUN: | %if --need=target_X8632 --command FileCheck %s 5 ; RUN: | %if --need=target_X8632 --command FileCheck %s
6 ; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --disassemble \ 6 ; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --disassemble \
7 ; RUN: --target x8632 --sandbox -i %s --args -Om1 --fmem-intrin-opt \ 7 ; RUN: --target x8632 --sandbox -i %s --args -Om1 --fmem-intrin-opt \
8 ; RUN: | %if --need=target_X8632 --command FileCheck %s 8 ; RUN: | %if --need=target_X8632 --command FileCheck %s
9 ; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --disassemble \ 9 ; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --disassemble \
10 ; RUN: --target x8632 --sandbox -i %s --args -Om1 \ 10 ; RUN: --target x8632 --sandbox -i %s --args -Om1 \
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 ; CHECK: mov DWORD PTR [{{.*}}+0x4],0x20202020 426 ; CHECK: mov DWORD PTR [{{.*}}+0x4],0x20202020
427 ; CHECK: mov DWORD PTR [{{.*}}],0x20202020 427 ; CHECK: mov DWORD PTR [{{.*}}],0x20202020
428 ; CHECK-NEXT: mov BYTE PTR [{{.*}}+0x8],0x20 428 ; CHECK-NEXT: mov BYTE PTR [{{.*}}+0x8],0x20
429 ; CHECK-NOT: mov 429 ; CHECK-NOT: mov
430 ; OM1-LABEL: test_memset_const_val_len_mid 430 ; OM1-LABEL: test_memset_const_val_len_mid
431 ; OM1: call {{.*}} R_{{.*}} memset 431 ; OM1: call {{.*}} R_{{.*}} memset
432 ; ARM32-LABEL: test_memset_const_val_len_mid 432 ; ARM32-LABEL: test_memset_const_val_len_mid
433 ; ARM32: uxtb 433 ; ARM32: uxtb
434 ; ARM32: bl {{.*}} memset 434 ; ARM32: bl {{.*}} memset
435 435
436 ; Same as above, but with a negative value.
437 define internal void @test_memset_const_neg_val_len_mid(i32 %iptr_dst) {
438 entry:
439 %dst = inttoptr i32 %iptr_dst to i8*
440 call void @llvm.memset.p0i8.i32(i8* %dst, i8 -128, i32 9, i32 1, i1 false)
441 ret void
442 }
443 ; CHECK-LABEL: test_memset_const_neg_val_len_mid
444 ; CHECK: mov DWORD PTR [{{.*}}+0x4],0x80808080
445 ; CHECK: mov DWORD PTR [{{.*}}],0x80808080
446 ; CHECK-NEXT: mov BYTE PTR [{{.*}}+0x8],0x80
447 ; CHECK-NOT: mov
448 ; OM1-LABEL: test_memset_const_neg_val_len_mid
449 ; OM1: call {{.*}} R_{{.*}} memset
450 ; ARM32-LABEL: test_memset_const_neg_val_len_mid
451 ; ARM32: uxtb
452 ; ARM32: bl {{.*}} memset
453
436 define internal void @test_memset_zero_const_len_small(i32 %iptr_dst) { 454 define internal void @test_memset_zero_const_len_small(i32 %iptr_dst) {
437 entry: 455 entry:
438 %dst = inttoptr i32 %iptr_dst to i8* 456 %dst = inttoptr i32 %iptr_dst to i8*
439 call void @llvm.memset.p0i8.i32(i8* %dst, i8 0, i32 12, i32 1, i1 false) 457 call void @llvm.memset.p0i8.i32(i8* %dst, i8 0, i32 12, i32 1, i1 false)
440 ret void 458 ret void
441 } 459 }
442 ; CHECK-LABEL: test_memset_zero_const_len_small 460 ; CHECK-LABEL: test_memset_zero_const_len_small
443 ; CHECK: pxor [[ZERO:xmm[0-9]+]],[[ZERO]] 461 ; CHECK: pxor [[ZERO:xmm[0-9]+]],[[ZERO]]
444 ; CHECK-NEXT: movq QWORD PTR [{{.*}}],[[ZERO]] 462 ; CHECK-NEXT: movq QWORD PTR [{{.*}}],[[ZERO]]
445 ; CHECK-NEXT: mov DWORD PTR [{{.*}}+0x8],0x0 463 ; CHECK-NEXT: mov DWORD PTR [{{.*}}+0x8],0x0
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 ; CHECK: pxor [[ZERO:xmm[0-9]+]],[[ZERO]] 512 ; CHECK: pxor [[ZERO:xmm[0-9]+]],[[ZERO]]
495 ; CHECK-NEXT: movups XMMWORD PTR [{{.*}}+0x10],[[ZERO]] 513 ; CHECK-NEXT: movups XMMWORD PTR [{{.*}}+0x10],[[ZERO]]
496 ; CHECK-NEXT: movups XMMWORD PTR [{{.*}}],[[ZERO]] 514 ; CHECK-NEXT: movups XMMWORD PTR [{{.*}}],[[ZERO]]
497 ; CHECK-NEXT: mov BYTE PTR [{{.*}}+0x20],0x0 515 ; CHECK-NEXT: mov BYTE PTR [{{.*}}+0x20],0x0
498 ; CHECK-NOT: mov 516 ; CHECK-NOT: mov
499 ; OM1-LABEL: test_memset_zero_const_len_large 517 ; OM1-LABEL: test_memset_zero_const_len_large
500 ; OM1: call {{.*}} R_{{.*}} memset 518 ; OM1: call {{.*}} R_{{.*}} memset
501 ; ARM32-LABEL: test_memset_zero_const_len_large 519 ; ARM32-LABEL: test_memset_zero_const_len_large
502 ; ARM32: uxtb 520 ; ARM32: uxtb
503 ; ARM32: bl {{.*}} memset 521 ; ARM32: bl {{.*}} memset
OLDNEW
« no previous file with comments | « src/IceTargetLoweringX86BaseImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698