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

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: rebase 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 | « tests_lit/assembler/x86/immediate_encodings.ll ('k') | tests_lit/llvm2ice_tests/test_i1.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 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 18 matching lines...) Expand all
29 29
30 for.end: 30 for.end:
31 %sum.0.lcssa = phi i32 [ 0, %entry ], [ %add, %for.body ] 31 %sum.0.lcssa = phi i32 [ 0, %entry ], [ %add, %for.body ]
32 ret i32 %sum.0.lcssa 32 ret i32 %sum.0.lcssa
33 } 33 }
34 34
35 ; CHECK-LABEL: simple_loop 35 ; CHECK-LABEL: simple_loop
36 ; CHECK: mov ecx, dword ptr [esp{{.*}}+{{.*}}{{[0-9]+}}] 36 ; CHECK: mov ecx, dword ptr [esp{{.*}}+{{.*}}{{[0-9]+}}]
37 ; CHECK: cmp ecx, 0 37 ; CHECK: cmp ecx, 0
38 ; CHECK-NEXT: jle {{[0-9]}} 38 ; CHECK-NEXT: jle {{[0-9]}}
39 ; NaCl bundle padding
40 ; CHECK-NEXT: nop
41 39
42 ; TODO: the mov from ebx to esi seems redundant here - so this may need to be 40 ; TODO: the mov from ebx to esi seems redundant here - so this may need to be
43 ; modified later 41 ; modified later
44 42
45 ; CHECK: add [[IREG:[a-z]+]], 1 43 ; CHECK: add [[IREG:[a-z]+]], 1
46 ; CHECK-NEXT: mov [[ICMPREG:[a-z]+]], [[IREG]] 44 ; CHECK-NEXT: mov [[ICMPREG:[a-z]+]], [[IREG]]
47 ; CHECK: cmp [[ICMPREG]], ecx 45 ; CHECK: cmp [[ICMPREG]], ecx
48 ; CHECK-NEXT: jl -{{[0-9]}} 46 ; CHECK-NEXT: jl -{{[0-9]}}
49 ; 47 ;
50 ; There's nothing remarkable under Om1 to test for, since Om1 generates 48 ; There's nothing remarkable under Om1 to test for, since Om1 generates
51 ; such atrocious code (by design). 49 ; such atrocious code (by design).
52 ; OPTM1-LABEL: simple_loop 50 ; OPTM1-LABEL: simple_loop
53 ; OPTM1: cmp {{.*}}, 0 51 ; OPTM1: cmp {{.*}}, 0
54 ; OPTM1: jg 52 ; OPTM1: jg
55 ; OPTM1: ret 53 ; OPTM1: ret
56 54
57 ; ERRORS-NOT: ICE translation error 55 ; ERRORS-NOT: ICE translation error
OLDNEW
« no previous file with comments | « tests_lit/assembler/x86/immediate_encodings.ll ('k') | tests_lit/llvm2ice_tests/test_i1.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698