| OLD | NEW |
| 1 ; This tries to be a comprehensive test of i64 operations, in | 1 ; This tries to be a comprehensive test of i64 operations, in |
| 2 ; particular the patterns for lowering i64 operations into constituent | 2 ; particular the patterns for lowering i64 operations into constituent |
| 3 ; i32 operations on x86-32. | 3 ; i32 operations on x86-32. |
| 4 | 4 |
| 5 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -O2 \ | 5 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -O2 \ |
| 6 ; RUN: | FileCheck %s | 6 ; RUN: | FileCheck %s |
| 7 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -Om1 \ | 7 ; RUN: %p2i --filetype=obj --disassemble -i %s --args -Om1 \ |
| 8 ; RUN: | FileCheck --check-prefix=OPTM1 %s | 8 ; RUN: | FileCheck --check-prefix=OPTM1 %s |
| 9 | 9 |
| 10 @__init_array_start = internal constant [0 x i8] zeroinitializer, align 4 | 10 @__init_array_start = internal constant [0 x i8] zeroinitializer, align 4 |
| (...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 725 | 725 |
| 726 if.then2: ; preds = %if.end | 726 if.then2: ; preds = %if.end |
| 727 call void @func() | 727 call void @func() |
| 728 br label %if.end3 | 728 br label %if.end3 |
| 729 | 729 |
| 730 if.end3: ; preds = %if.then2, %if.end | 730 if.end3: ; preds = %if.then2, %if.end |
| 731 ret void | 731 ret void |
| 732 } | 732 } |
| 733 ; CHECK-LABEL: icmpEq64 | 733 ; CHECK-LABEL: icmpEq64 |
| 734 ; CHECK: jne | 734 ; CHECK: jne |
| 735 ; CHECK: jne | 735 ; CHECK: je |
| 736 ; CHECK: call | 736 ; CHECK: call |
| 737 ; CHECK: jne | 737 ; CHECK: jne |
| 738 ; CHECK: jne | 738 ; CHECK: je |
| 739 ; CHECK: call | 739 ; CHECK: call |
| 740 ; | 740 ; |
| 741 ; OPTM1-LABEL: icmpEq64 | 741 ; OPTM1-LABEL: icmpEq64 |
| 742 ; OPTM1: jne | 742 ; OPTM1: jne |
| 743 ; OPTM1: jne | 743 ; OPTM1: je |
| 744 ; OPTM1: call | 744 ; OPTM1: call |
| 745 ; OPTM1: jne | 745 ; OPTM1: jne |
| 746 ; OPTM1: jne | 746 ; OPTM1: je |
| 747 ; OPTM1: call | 747 ; OPTM1: call |
| 748 | 748 |
| 749 declare void @func() | 749 declare void @func() |
| 750 | 750 |
| 751 define internal void @icmpNe64(i64 %a, i64 %b, i64 %c, i64 %d) { | 751 define internal void @icmpNe64(i64 %a, i64 %b, i64 %c, i64 %d) { |
| 752 entry: | 752 entry: |
| 753 %cmp = icmp ne i64 %a, %b | 753 %cmp = icmp ne i64 %a, %b |
| 754 br i1 %cmp, label %if.then, label %if.end | 754 br i1 %cmp, label %if.then, label %if.end |
| 755 | 755 |
| 756 if.then: ; preds = %entry | 756 if.then: ; preds = %entry |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 945 ; OPTM1: call | 945 ; OPTM1: call |
| 946 | 946 |
| 947 define internal i32 @icmpEq64Bool(i64 %a, i64 %b) { | 947 define internal i32 @icmpEq64Bool(i64 %a, i64 %b) { |
| 948 entry: | 948 entry: |
| 949 %cmp = icmp eq i64 %a, %b | 949 %cmp = icmp eq i64 %a, %b |
| 950 %cmp.ret_ext = zext i1 %cmp to i32 | 950 %cmp.ret_ext = zext i1 %cmp to i32 |
| 951 ret i32 %cmp.ret_ext | 951 ret i32 %cmp.ret_ext |
| 952 } | 952 } |
| 953 ; CHECK-LABEL: icmpEq64Bool | 953 ; CHECK-LABEL: icmpEq64Bool |
| 954 ; CHECK: jne | 954 ; CHECK: jne |
| 955 ; CHECK: jne | 955 ; CHECK: je |
| 956 ; | 956 ; |
| 957 ; OPTM1-LABEL: icmpEq64Bool | 957 ; OPTM1-LABEL: icmpEq64Bool |
| 958 ; OPTM1: jne | 958 ; OPTM1: jne |
| 959 ; OPTM1: jne | 959 ; OPTM1: je |
| 960 | 960 |
| 961 define internal i32 @icmpNe64Bool(i64 %a, i64 %b) { | 961 define internal i32 @icmpNe64Bool(i64 %a, i64 %b) { |
| 962 entry: | 962 entry: |
| 963 %cmp = icmp ne i64 %a, %b | 963 %cmp = icmp ne i64 %a, %b |
| 964 %cmp.ret_ext = zext i1 %cmp to i32 | 964 %cmp.ret_ext = zext i1 %cmp to i32 |
| 965 ret i32 %cmp.ret_ext | 965 ret i32 %cmp.ret_ext |
| 966 } | 966 } |
| 967 ; CHECK-LABEL: icmpNe64Bool | 967 ; CHECK-LABEL: icmpNe64Bool |
| 968 ; CHECK: jne | 968 ; CHECK: jne |
| 969 ; CHECK: jne | 969 ; CHECK: jne |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1295 | 1295 |
| 1296 if.end3: ; preds = %if.then2, %if.end | 1296 if.end3: ; preds = %if.then2, %if.end |
| 1297 ret void | 1297 ret void |
| 1298 } | 1298 } |
| 1299 ; The following checks are not strictly necessary since one of the RUN | 1299 ; The following checks are not strictly necessary since one of the RUN |
| 1300 ; lines actually runs the output through the assembler. | 1300 ; lines actually runs the output through the assembler. |
| 1301 ; CHECK-LABEL: icmpLt64Imm | 1301 ; CHECK-LABEL: icmpLt64Imm |
| 1302 ; CHECK-NOT: cmp 0x{{[0-9a-f]+}}, | 1302 ; CHECK-NOT: cmp 0x{{[0-9a-f]+}}, |
| 1303 ; OPTM1-LABEL: icmpLt64Imm | 1303 ; OPTM1-LABEL: icmpLt64Imm |
| 1304 ; OPTM1-NOT: cmp 0x{{[0-9a-f]+}}, | 1304 ; OPTM1-NOT: cmp 0x{{[0-9a-f]+}}, |
| OLD | NEW |