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

Side by Side Diff: tests_lit/llvm2ice_tests/simple-loop.ll

Issue 604873003: Handle add, adc, etc., mfence, div, idiv, mul in the assembler. (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
OLDNEW
1 ; This tests a simple loop that sums the elements of an input array. 1 ; This tests a simple loop that sums the elements of an input array.
2 ; The O2 check patterns represent the best code currently achieved. 2 ; The O2 check patterns represent the best code currently achieved.
3 3
4 ; RUN: %p2i -i %s --args -O2 --verbose none \ 4 ; RUN: %p2i -i %s --args -O2 --verbose none \
5 ; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ 5 ; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \
6 ; RUN: | llvm-objdump -d -symbolize -x86-asm-syntax=intel - | FileCheck %s 6 ; RUN: | llvm-objdump -d -symbolize -x86-asm-syntax=intel - | FileCheck %s
7 ; RUN: %p2i -i %s --args -Om1 --verbose none \ 7 ; RUN: %p2i -i %s --args -Om1 --verbose none \
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=OPTM1 %s 10 ; RUN: | FileCheck --check-prefix=OPTM1 %s
(...skipping 20 matching lines...) Expand all
31 31
32 for.end: 32 for.end:
33 %sum.0.lcssa = phi i32 [ 0, %entry ], [ %add, %for.body ] 33 %sum.0.lcssa = phi i32 [ 0, %entry ], [ %add, %for.body ]
34 ret i32 %sum.0.lcssa 34 ret i32 %sum.0.lcssa
35 } 35 }
36 36
37 ; CHECK-LABEL: simple_loop 37 ; CHECK-LABEL: simple_loop
38 ; CHECK: mov ecx, dword ptr [esp{{.*}}+{{.*}}{{[0-9]+}}] 38 ; CHECK: mov ecx, dword ptr [esp{{.*}}+{{.*}}{{[0-9]+}}]
39 ; CHECK: cmp ecx, 0 39 ; CHECK: cmp ecx, 0
40 ; CHECK-NEXT: jle {{[0-9]}} 40 ; CHECK-NEXT: jle {{[0-9]}}
41 ; NaCl bundle padding
42 ; CHECK-NEXT: nop
43 41
44 ; TODO: the mov from ebx to esi seems redundant here - so this may need to be 42 ; TODO: the mov from ebx to esi seems redundant here - so this may need to be
45 ; modified later 43 ; modified later
46 44
47 ; CHECK: add [[IREG:[a-z]+]], 1 45 ; CHECK: add [[IREG:[a-z]+]], 1
48 ; CHECK-NEXT: mov [[ICMPREG:[a-z]+]], [[IREG]] 46 ; CHECK-NEXT: mov [[ICMPREG:[a-z]+]], [[IREG]]
49 ; CHECK: cmp [[ICMPREG]], ecx 47 ; CHECK: cmp [[ICMPREG]], ecx
50 ; CHECK-NEXT: jl -{{[0-9]}} 48 ; CHECK-NEXT: jl -{{[0-9]}}
51 ; 49 ;
52 ; There's nothing remarkable under Om1 to test for, since Om1 generates 50 ; There's nothing remarkable under Om1 to test for, since Om1 generates
53 ; such atrocious code (by design). 51 ; such atrocious code (by design).
54 ; OPTM1-LABEL: simple_loop 52 ; OPTM1-LABEL: simple_loop
55 ; OPTM1: cmp {{.*}}, 0 53 ; OPTM1: cmp {{.*}}, 0
56 ; OPTM1: jg 54 ; OPTM1: jg
57 ; OPTM1: ret 55 ; OPTM1: ret
58 56
59 ; ERRORS-NOT: ICE translation error 57 ; ERRORS-NOT: ICE translation error
60 ; DUMP-NOT: SZ 58 ; DUMP-NOT: SZ
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698