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

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

Issue 680733002: Subzero: Allow delaying Phi lowering until after register allocation. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix vector const undef lowering for phis. Created 6 years, 1 month 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/nacl-atomic-cmpxchg-optimization.ll ('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 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 17 matching lines...) Expand all
28 br i1 %cmp, label %for.body, label %for.end 28 br i1 %cmp, label %for.body, label %for.end
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: j{{le|g}} {{[0-9]}}
39 39
40 ; TODO: the mov from ebx to esi seems redundant here - so this may need to be 40 ; Check for the combination of address mode inference, register
41 ; modified later 41 ; allocation, and load/arithmetic fusing.
42 42 ; CHECK: add e{{..}}, dword ptr [e{{..}} + 4*[[IREG:e..]]]
43 ; CHECK: add [[IREG:[a-z]+]], 1 43 ; Check for incrementing of the register-allocated induction variable.
44 ; CHECK-NEXT: mov [[ICMPREG:[a-z]+]], [[IREG]] 44 ; CHECK-NEXT: add [[IREG]], 1
45 ; CHECK: cmp [[ICMPREG]], ecx 45 ; Check for comparing the induction variable against the loop size.
46 ; CHECK-NEXT: cmp [[IREG]],
46 ; CHECK-NEXT: jl -{{[0-9]}} 47 ; CHECK-NEXT: jl -{{[0-9]}}
47 ; 48 ;
48 ; There's nothing remarkable under Om1 to test for, since Om1 generates 49 ; There's nothing remarkable under Om1 to test for, since Om1 generates
49 ; such atrocious code (by design). 50 ; such atrocious code (by design).
50 ; OPTM1-LABEL: simple_loop 51 ; OPTM1-LABEL: simple_loop
51 ; OPTM1: cmp {{.*}}, 0 52 ; OPTM1: cmp {{.*}}, 0
52 ; OPTM1: jg 53 ; OPTM1: jg
53 ; OPTM1: ret 54 ; OPTM1: ret
54 55
55 ; ERRORS-NOT: ICE translation error 56 ; ERRORS-NOT: ICE translation error
OLDNEW
« no previous file with comments | « tests_lit/llvm2ice_tests/nacl-atomic-cmpxchg-optimization.ll ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698