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

Side by Side Diff: tests_lit/llvm2ice_tests/call.ll

Issue 265703002: Add Om1 lowering with no optimizations (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Merge changed from Karl's committed CL 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
OLDNEW
1 ; RUIN: %llvm2ice -verbose inst %s | FileCheck %s 1 ; Simple smoke test of the call instruction. The assembly checks
2 ; RUIN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s 2 ; currently only verify the function labels.
3
4 ; RUN: %llvm2ice --verbose inst %s | FileCheck %s
5 ; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
3 ; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s 6 ; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s
4 ; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \ 7 ; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \
5 ; RUN: | FileCheck --check-prefix=DUMP %s 8 ; RUN: | FileCheck --check-prefix=DUMP %s
6 9
7 define i32 @fib(i32 %n) { 10 define i32 @fib(i32 %n) {
8 ; CHECK: define i32 @fib 11 ; CHECK: define i32 @fib
9 entry: 12 entry:
10 %cmp = icmp slt i32 %n, 2 13 %cmp = icmp slt i32 %n, 2
11 br i1 %cmp, label %return, label %if.end 14 br i1 %cmp, label %return, label %if.end
12 15
(...skipping 29 matching lines...) Expand all
42 ; CHECK: define i32 @redirect 45 ; CHECK: define i32 @redirect
43 entry: 46 entry:
44 %call = tail call i32 @redirect_target(i32 %n) 47 %call = tail call i32 @redirect_target(i32 %n)
45 ret i32 %call 48 ret i32 %call
46 } 49 }
47 50
48 declare i32 @redirect_target(i32) 51 declare i32 @redirect_target(i32)
49 52
50 define void @call_void(i32 %n) { 53 define void @call_void(i32 %n) {
51 ; CHECK: define void @call_void 54 ; CHECK: define void @call_void
55
52 entry: 56 entry:
53 %cmp2 = icmp sgt i32 %n, 0 57 %cmp2 = icmp sgt i32 %n, 0
54 br i1 %cmp2, label %if.then, label %if.end 58 br i1 %cmp2, label %if.then, label %if.end
55 59
56 if.then: ; preds = %entry, %if.then 60 if.then: ; preds = %entry, %if.then
57 %n.tr3 = phi i32 [ %call.i, %if.then ], [ %n, %entry ] 61 %n.tr3 = phi i32 [ %call.i, %if.then ], [ %n, %entry ]
58 %sub = add i32 %n.tr3, -1 62 %sub = add i32 %n.tr3, -1
59 %call.i = tail call i32 @redirect_target(i32 %sub) 63 %call.i = tail call i32 @redirect_target(i32 %sub)
60 %cmp = icmp sgt i32 %call.i, 0 64 %cmp = icmp sgt i32 %call.i, 0
61 br i1 %cmp, label %if.then, label %if.end 65 br i1 %cmp, label %if.then, label %if.end
62 66
63 if.end: ; preds = %if.then, %entry 67 if.end: ; preds = %if.then, %entry
64 ret void 68 ret void
65 } 69 }
66 70
67 ; ERRORS-NOT: ICE translation error 71 ; ERRORS-NOT: ICE translation error
68 ; DUMP-NOT: SZ 72 ; DUMP-NOT: SZ
OLDNEW
« no previous file with comments | « tests_lit/llvm2ice_tests/branch-simple.ll ('k') | tests_lit/llvm2ice_tests/callindirect.pnacl.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698