OLD | NEW |
1 ; Simple test of non-fused compare/branch. | 1 ; Simple test of non-fused compare/branch. |
2 | 2 |
3 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -O2 \ | 3 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -O2 \ |
4 ; RUN: | FileCheck %s | 4 ; RUN: -allow-externally-defined-symbols | FileCheck %s |
5 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -Om1 \ | 5 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -Om1 \ |
6 ; RUN: | FileCheck --check-prefix=OPTM1 %s | 6 ; RUN: -allow-externally-defined-symbols | FileCheck --check-prefix=OPTM1 %s |
7 | 7 |
8 define void @testBool(i32 %a, i32 %b) { | 8 define internal void @testBool(i32 %a, i32 %b) { |
9 entry: | 9 entry: |
10 %cmp = icmp slt i32 %a, %b | 10 %cmp = icmp slt i32 %a, %b |
11 %cmp1 = icmp sgt i32 %a, %b | 11 %cmp1 = icmp sgt i32 %a, %b |
12 br i1 %cmp, label %if.then, label %if.end | 12 br i1 %cmp, label %if.then, label %if.end |
13 | 13 |
14 if.then: ; preds = %entry | 14 if.then: ; preds = %entry |
15 %cmp_ext = zext i1 %cmp to i32 | 15 %cmp_ext = zext i1 %cmp to i32 |
16 tail call void @use(i32 %cmp_ext) | 16 tail call void @use(i32 %cmp_ext) |
17 br label %if.end | 17 br label %if.end |
18 | 18 |
(...skipping 27 matching lines...) Expand all Loading... |
46 ; Two bool computations | 46 ; Two bool computations |
47 ; OPTM1: cmp | 47 ; OPTM1: cmp |
48 ; OPTM1: cmp | 48 ; OPTM1: cmp |
49 ; Test first bool | 49 ; Test first bool |
50 ; OPTM1: cmp | 50 ; OPTM1: cmp |
51 ; OPTM1: call | 51 ; OPTM1: call |
52 ; Test second bool | 52 ; Test second bool |
53 ; OPTM1: cmp | 53 ; OPTM1: cmp |
54 ; OPTM1: call | 54 ; OPTM1: call |
55 ; OPTM1: ret | 55 ; OPTM1: ret |
OLD | NEW |