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

Side by Side Diff: tests_lit/llvm2ice_tests/cmp-opt.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: Address Jan's third-round comments 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 %s | FileCheck %s 1 ; Simple test of non-fused compare/branch.
2 ; RUIN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s 2
3 ; RUIN: %llvm2ice -O2 --verbose none %s | FileCheck %s
4 ; RUN: %llvm2ice -Om1 --verbose none %s | FileCheck --check-prefix=OPTM1 %s
5 ; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s
3 ; RUN: %szdiff --llvm2ice=%llvm2ice %s | FileCheck --check-prefix=DUMP %s 6 ; RUN: %szdiff --llvm2ice=%llvm2ice %s | FileCheck --check-prefix=DUMP %s
4 7
5 define void @testBool(i32 %a, i32 %b) { 8 define void @testBool(i32 %a, i32 %b) {
6 entry: 9 entry:
7 %cmp = icmp slt i32 %a, %b 10 %cmp = icmp slt i32 %a, %b
8 %cmp1 = icmp sgt i32 %a, %b 11 %cmp1 = icmp sgt i32 %a, %b
9 br i1 %cmp, label %if.then, label %if.end 12 br i1 %cmp, label %if.then, label %if.end
10 13
11 if.then: ; preds = %entry 14 if.then: ; preds = %entry
12 tail call void @use(i1 %cmp) 15 tail call void @use(i1 %cmp)
13 br label %if.end 16 br label %if.end
14 17
15 if.end: ; preds = %if.then, %entry 18 if.end: ; preds = %if.then, %entry
16 br i1 %cmp1, label %if.then5, label %if.end7 19 br i1 %cmp1, label %if.then5, label %if.end7
17 20
18 if.then5: ; preds = %if.end 21 if.then5: ; preds = %if.end
19 tail call void @use(i1 %cmp1) 22 tail call void @use(i1 %cmp1)
20 br label %if.end7 23 br label %if.end7
21 24
22 if.end7: ; preds = %if.then5, %if.end 25 if.end7: ; preds = %if.then5, %if.end
23 ret void 26 ret void
24 } 27 }
25 28
26 declare void @use(i1 zeroext) 29 declare void @use(i1 zeroext)
27 30
28 ; ERRORS-NOT: ICE translation error
29
30 ; CHECK: .globl testBool 31 ; CHECK: .globl testBool
31 ; Two bool computations 32 ; Two bool computations
32 ; CHECK: cmp 33 ; CHECK: cmp
33 ; CHECK: cmp 34 ; CHECK: cmp
34 ; Test first bool 35 ; Test first bool
35 ; CHECK: cmp 36 ; CHECK: cmp
36 ; CHECK: call 37 ; CHECK: call
37 ; Test second bool 38 ; Test second bool
38 ; CHECK: cmp 39 ; CHECK: cmp
39 ; CHECK: call 40 ; CHECK: call
40 ; CHECK: ret 41 ; CHECK: ret
42 ;
43 ; OPTM1: .globl testBool
44 ; Two bool computations
45 ; OPTM1: cmp
46 ; OPTM1: cmp
47 ; Test first bool
48 ; OPTM1: cmp
49 ; OPTM1: call
50 ; Test second bool
51 ; OPTM1: cmp
52 ; OPTM1: call
53 ; OPTM1: ret
54
55 ; ERRORS-NOT: ICE translation error
41 ; DUMP-NOT: SZ 56 ; DUMP-NOT: SZ
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698