OLD | NEW |
(Empty) | |
| 1 ; RUIN: %llvm2ice --verbose none %s | FileCheck %s |
| 2 ; RUIN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s |
| 3 ; RUN: %szdiff --llvm2ice=%llvm2ice %s | FileCheck --check-prefix=DUMP %s |
| 4 |
| 5 define void @fixed_400(i32 %n) { |
| 6 entry: |
| 7 %array = alloca i8, i32 400, align 16 |
| 8 %array.asint = ptrtoint i8* %array to i32 |
| 9 call void @f1(i32 %array.asint) |
| 10 ret void |
| 11 ; CHECK: sub esp, 400 |
| 12 ; CHECK-NEXT: mov eax, esp |
| 13 ; CHECK-NEXT: push eax |
| 14 ; CHECK-NEXT: call f1 |
| 15 } |
| 16 |
| 17 declare void @f1(i32) |
| 18 |
| 19 define void @variable_n(i32 %n) { |
| 20 entry: |
| 21 %array = alloca i8, i32 %n, align 16 |
| 22 %array.asint = ptrtoint i8* %array to i32 |
| 23 call void @f2(i32 %array.asint) |
| 24 ret void |
| 25 ; CHECK: mov eax, dword ptr [ebp+8] |
| 26 ; CHECK-NEXT: sub esp, eax |
| 27 ; CHECK-NEXT: mov eax, esp |
| 28 ; CHECK-NEXT: push eax |
| 29 ; CHECK-NEXT: call f2 |
| 30 } |
| 31 |
| 32 declare void @f2(i32) |
| 33 |
| 34 ; ERRORS-NOT: ICE translation error |
| 35 ; DUMP-NOT: SZ |
OLD | NEW |