| 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 might be added (so not using -NEXT). | 102 ; Bundle padding might be added (so not using -NEXT). |
| 103 ; CHECK: mov dword ptr [esp + 16], 3735928559 | 103 ; CHECK: mov dword ptr [esp + 16], 3735928559 |
| 104 ; CHECK-NEXT: mov dword ptr [esp + 12], 305419896 | 104 ; CHECK-NEXT: mov dword ptr [esp + 12], 305419896 |
| 105 ; CHECK-NEXT: call -4 | 105 ; Bundle padding will push the call down. |
| 106 ; CHECK-NOT: mov |
| 107 ; CHECK: call -4 |
| 106 ; CALLTARGETS: call ignore64BitArgNoInline | 108 ; CALLTARGETS: call ignore64BitArgNoInline |
| 107 ; | 109 ; |
| 108 ; OPTM1-LABEL: pass64BitConstArg | 110 ; OPTM1-LABEL: pass64BitConstArg |
| 109 ; OPTM1: sub esp | 111 ; OPTM1: sub esp |
| 110 ; OPTM1: mov dword ptr [esp + 4] | 112 ; OPTM1: mov dword ptr [esp + 4] |
| 111 ; OPTM1-NEXT: mov dword ptr [esp] | 113 ; OPTM1-NEXT: mov dword ptr [esp] |
| 112 ; OPTM1-NEXT: mov dword ptr [esp + 8], 123 | 114 ; OPTM1-NEXT: mov dword ptr [esp + 8], 123 |
| 113 ; Bundle padding might be added (so not using -NEXT). | 115 ; Bundle padding might be added (so not using -NEXT). |
| 114 ; OPTM1: mov dword ptr [esp + 16], 3735928559 | 116 ; OPTM1: mov dword ptr [esp + 16], 3735928559 |
| 115 ; OPTM1-NEXT: mov dword ptr [esp + 12], 305419896 | 117 ; OPTM1-NEXT: mov dword ptr [esp + 12], 305419896 |
| 116 ; OPTM1-NEXT: call -4 | 118 ; OPTM1-NOT: mov |
| 119 ; OPTM1: call -4 |
| 117 | 120 |
| 118 define internal i64 @return64BitArg(i64 %a) { | 121 define internal i64 @return64BitArg(i64 %a) { |
| 119 entry: | 122 entry: |
| 120 ret i64 %a | 123 ret i64 %a |
| 121 } | 124 } |
| 122 ; CHECK-LABEL: return64BitArg | 125 ; CHECK-LABEL: return64BitArg |
| 123 ; CHECK: mov {{.*}}, dword ptr [esp + 4] | 126 ; CHECK: mov {{.*}}, dword ptr [esp + 4] |
| 124 ; CHECK: mov {{.*}}, dword ptr [esp + 8] | 127 ; CHECK: mov {{.*}}, dword ptr [esp + 8] |
| 125 ; | 128 ; |
| 126 ; OPTM1-LABEL: return64BitArg | 129 ; OPTM1-LABEL: return64BitArg |
| (...skipping 1193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1320 ret void | 1323 ret void |
| 1321 } | 1324 } |
| 1322 ; The following checks are not strictly necessary since one of the RUN | 1325 ; The following checks are not strictly necessary since one of the RUN |
| 1323 ; lines actually runs the output through the assembler. | 1326 ; lines actually runs the output through the assembler. |
| 1324 ; CHECK-LABEL: icmpLt64Imm | 1327 ; CHECK-LABEL: icmpLt64Imm |
| 1325 ; CHECK-NOT: cmp {{[0-9]+}}, | 1328 ; CHECK-NOT: cmp {{[0-9]+}}, |
| 1326 ; OPTM1-LABEL: icmpLt64Imm | 1329 ; OPTM1-LABEL: icmpLt64Imm |
| 1327 ; OPTM1-NOT: cmp {{[0-9]+}}, | 1330 ; OPTM1-NOT: cmp {{[0-9]+}}, |
| 1328 | 1331 |
| 1329 ; ERRORS-NOT: ICE translation error | 1332 ; ERRORS-NOT: ICE translation error |
| OLD | NEW |