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

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

Issue 277033003: Modify pnacl subzero to be able to read pnacl bitcode files. (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Fix nits. Created 6 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/llvm2ice_tests/simple-cond.ll ('k') | tests_lit/llvm2ice_tests/store.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 ; RUIN: %llvm2ice -verbose inst %s | FileCheck %s 1 ; RUIN: %llvm2ice -verbose inst %s | FileCheck %s
2 ; RUIN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s 2 ; RUIN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
3 ; RUN: %szdiff --llvm2ice=%llvm2ice %s | FileCheck --check-prefix=DUMP %s 3 ; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
4 ; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \
5 ; RUN: | FileCheck --check-prefix=DUMP %s
4 6
5 define i32 @simple_loop(i32 %a, i32 %n) { 7 define i32 @simple_loop(i32 %a, i32 %n) {
6 entry: 8 entry:
7 %cmp4 = icmp sgt i32 %n, 0 9 %cmp4 = icmp sgt i32 %n, 0
8 br i1 %cmp4, label %for.body, label %for.end 10 br i1 %cmp4, label %for.body, label %for.end
9 11
10 for.body: 12 for.body:
11 %i.06 = phi i32 [ %inc, %for.body ], [ 0, %entry ] 13 %i.06 = phi i32 [ %inc, %for.body ], [ 0, %entry ]
12 %sum.05 = phi i32 [ %add, %for.body ], [ 0, %entry ] 14 %sum.05 = phi i32 [ %add, %for.body ], [ 0, %entry ]
13 %gep_array = mul i32 %i.06, 4 15 %gep_array = mul i32 %i.06, 4
14 %gep = add i32 %a, %gep_array 16 %gep = add i32 %a, %gep_array
15 %gep.asptr = inttoptr i32 %gep to i32* 17 %__9 = inttoptr i32 %gep to i32*
16 %v0 = load i32* %gep.asptr, align 1 18 %v0 = load i32* %__9, align 1
17 %add = add i32 %v0, %sum.05 19 %add = add i32 %v0, %sum.05
18 %inc = add i32 %i.06, 1 20 %inc = add i32 %i.06, 1
19 %cmp = icmp slt i32 %inc, %n 21 %cmp = icmp slt i32 %inc, %n
20 br i1 %cmp, label %for.body, label %for.end 22 br i1 %cmp, label %for.body, label %for.end
21 23
22 for.end: 24 for.end:
23 %sum.0.lcssa = phi i32 [ 0, %entry ], [ %add, %for.body ] 25 %sum.0.lcssa = phi i32 [ 0, %entry ], [ %add, %for.body ]
24 ret i32 %sum.0.lcssa 26 ret i32 %sum.0.lcssa
25 } 27 }
26 28
(...skipping 16 matching lines...) Expand all
43 ; TODO: the mov from ebx to esi seems redundant here - so this may need to be 45 ; TODO: the mov from ebx to esi seems redundant here - so this may need to be
44 ; modified later 46 ; modified later
45 47
46 ; CHECK: add [[IREG:[a-z]+]], 1 48 ; CHECK: add [[IREG:[a-z]+]], 1
47 ; CHECK-NEXT: mov [[ICMPREG:[a-z]+]], [[IREG]] 49 ; CHECK-NEXT: mov [[ICMPREG:[a-z]+]], [[IREG]]
48 ; CHECK: cmp [[ICMPREG]], ecx 50 ; CHECK: cmp [[ICMPREG]], ecx
49 ; CHECK-NEXT: jl {{.*}}for.body 51 ; CHECK-NEXT: jl {{.*}}for.body
50 52
51 ; ERRORS-NOT: ICE translation error 53 ; ERRORS-NOT: ICE translation error
52 ; DUMP-NOT: SZ 54 ; DUMP-NOT: SZ
OLDNEW
« no previous file with comments | « tests_lit/llvm2ice_tests/simple-cond.ll ('k') | tests_lit/llvm2ice_tests/store.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698