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 ; TODO(jvoung): fix extra "CALLTARGETS" run. The llvm-objdump symbolizer | 5 ; TODO(jvoung): fix extra "CALLTARGETS" run. The llvm-objdump symbolizer |
6 ; doesn't know how to symbolize non-section-local functions. | 6 ; doesn't know how to symbolize non-section-local functions. |
7 ; The newer LLVM 3.6 one does work, but watch out for other bugs. | 7 ; The newer LLVM 3.6 one does work, but watch out for other bugs. |
8 | 8 |
9 ; RUN: %p2i -i %s --args -O2 --verbose none \ | 9 ; RUN: %p2i -i %s --args -O2 --verbose none \ |
10 ; RUN: | FileCheck --check-prefix=CALLTARGETS %s | 10 ; RUN: | FileCheck --check-prefix=CALLTARGETS %s |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 entry: | 92 entry: |
93 %call = call i32 @ignore64BitArgNoInline(i64 %a, i32 123, i64 -240105309230672
5256) | 93 %call = call i32 @ignore64BitArgNoInline(i64 %a, i32 123, i64 -240105309230672
5256) |
94 ret i32 %call | 94 ret i32 %call |
95 } | 95 } |
96 ; CHECK-LABEL: pass64BitConstArg | 96 ; CHECK-LABEL: pass64BitConstArg |
97 ; CALLTARGETS-LABEL: pass64BitConstArg | 97 ; CALLTARGETS-LABEL: pass64BitConstArg |
98 ; CHECK: sub esp | 98 ; CHECK: sub esp |
99 ; CHECK: mov dword ptr [esp + 4] | 99 ; CHECK: mov dword ptr [esp + 4] |
100 ; CHECK-NEXT: mov dword ptr [esp] | 100 ; CHECK-NEXT: mov dword ptr [esp] |
101 ; CHECK-NEXT: mov dword ptr [esp + 8], 123 | 101 ; CHECK-NEXT: mov dword ptr [esp + 8], 123 |
102 ; Bundle padding added by -triple=i686-none-nacl. | 102 ; Bundle padding might be added (so not using -NEXT). |
103 ; CHECK-NEXT: nop | 103 ; CHECK: mov dword ptr [esp + 16], 3735928559 |
104 ; CHECK-NEXT: mov dword ptr [esp + 16], 3735928559 | |
105 ; CHECK-NEXT: mov dword ptr [esp + 12], 305419896 | 104 ; CHECK-NEXT: mov dword ptr [esp + 12], 305419896 |
106 ; CHECK-NEXT: call -4 | 105 ; CHECK-NEXT: call -4 |
107 ; CALLTARGETS: call ignore64BitArgNoInline | 106 ; CALLTARGETS: call ignore64BitArgNoInline |
108 ; | 107 ; |
109 ; OPTM1-LABEL: pass64BitConstArg | 108 ; OPTM1-LABEL: pass64BitConstArg |
110 ; OPTM1: sub esp | 109 ; OPTM1: sub esp |
111 ; OPTM1: mov dword ptr [esp + 4] | 110 ; OPTM1: mov dword ptr [esp + 4] |
112 ; OPTM1-NEXT: mov dword ptr [esp] | 111 ; OPTM1-NEXT: mov dword ptr [esp] |
113 ; OPTM1-NEXT: mov dword ptr [esp + 8], 123 | 112 ; OPTM1-NEXT: mov dword ptr [esp + 8], 123 |
114 ; Bundle padding added by -triple=i686-none-nacl. | 113 ; Bundle padding might be added (so not using -NEXT). |
115 ; OPTM1-NEXT: nop | 114 ; OPTM1: mov dword ptr [esp + 16], 3735928559 |
116 ; OPTM1-NEXT: mov dword ptr [esp + 16], 3735928559 | |
117 ; OPTM1-NEXT: mov dword ptr [esp + 12], 305419896 | 115 ; OPTM1-NEXT: mov dword ptr [esp + 12], 305419896 |
118 ; OPTM1-NEXT: call -4 | 116 ; OPTM1-NEXT: call -4 |
119 | 117 |
120 define internal i64 @return64BitArg(i64 %a) { | 118 define internal i64 @return64BitArg(i64 %a) { |
121 entry: | 119 entry: |
122 ret i64 %a | 120 ret i64 %a |
123 } | 121 } |
124 ; CHECK-LABEL: return64BitArg | 122 ; CHECK-LABEL: return64BitArg |
125 ; CHECK: mov {{.*}}, dword ptr [esp + 4] | 123 ; CHECK: mov {{.*}}, dword ptr [esp + 4] |
126 ; CHECK: mov {{.*}}, dword ptr [esp + 8] | 124 ; CHECK: mov {{.*}}, dword ptr [esp + 8] |
(...skipping 1195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1322 ret void | 1320 ret void |
1323 } | 1321 } |
1324 ; The following checks are not strictly necessary since one of the RUN | 1322 ; The following checks are not strictly necessary since one of the RUN |
1325 ; lines actually runs the output through the assembler. | 1323 ; lines actually runs the output through the assembler. |
1326 ; CHECK-LABEL: icmpLt64Imm | 1324 ; CHECK-LABEL: icmpLt64Imm |
1327 ; CHECK-NOT: cmp {{[0-9]+}}, | 1325 ; CHECK-NOT: cmp {{[0-9]+}}, |
1328 ; OPTM1-LABEL: icmpLt64Imm | 1326 ; OPTM1-LABEL: icmpLt64Imm |
1329 ; OPTM1-NOT: cmp {{[0-9]+}}, | 1327 ; OPTM1-NOT: cmp {{[0-9]+}}, |
1330 | 1328 |
1331 ; ERRORS-NOT: ICE translation error | 1329 ; ERRORS-NOT: ICE translation error |
OLD | NEW |