| OLD | NEW |
| 1 ; This is a basic test of the alloca instruction and a call. | 1 ; This is a basic test of the alloca instruction and a call. |
| 2 | 2 |
| 3 ; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --disassemble \ | 3 ; RUN: %if --need=target_X8632 --command %p2i --filetype=obj --disassemble \ |
| 4 ; RUN: --target x8632 -i %s --args -O2 -allow-externally-defined-symbols \ | 4 ; RUN: --target x8632 -i %s --args -O2 -allow-externally-defined-symbols \ |
| 5 ; RUN: | %if --need=target_X8632 --command FileCheck %s | 5 ; RUN: | %if --need=target_X8632 --command FileCheck %s |
| 6 | 6 |
| 7 declare void @copy(i32 %arg1, i8* %arr1, i8* %arr2, i8* %arr3, i8* %arr4); | 7 declare void @copy(i32 %arg1, i8* %arr1, i8* %arr2, i8* %arr3, i8* %arr4); |
| 8 | 8 |
| 9 ; Test that alloca base addresses get passed correctly to functions. | 9 ; Test that alloca base addresses get passed correctly to functions. |
| 10 define internal void @caller1(i32 %arg) { | 10 define internal void @caller1(i32 %arg) { |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 %p2 = bitcast i8* %a2 to i32* | 42 %p2 = bitcast i8* %a2 to i32* |
| 43 store i32 %arg, i32* %p1, align 1 | 43 store i32 %arg, i32* %p1, align 1 |
| 44 store i32 %arg, i32* %p2, align 1 | 44 store i32 %arg, i32* %p2, align 1 |
| 45 call void @copy(i32 %arg, i8* %a1, i8* %a2, i8* %a1, i8* %a2) | 45 call void @copy(i32 %arg, i8* %a1, i8* %a2, i8* %a1, i8* %a2) |
| 46 ret void | 46 ret void |
| 47 } | 47 } |
| 48 | 48 |
| 49 ; CHECK-LABEL: caller2 | 49 ; CHECK-LABEL: caller2 |
| 50 ; CHECK-NEXT: sub esp,0x6c | 50 ; CHECK-NEXT: sub esp,0x6c |
| 51 ; CHECK-NEXT: mov eax,DWORD PTR [esp+0x70] | 51 ; CHECK-NEXT: mov eax,DWORD PTR [esp+0x70] |
| 52 ; CHECK-NEXT: mov DWORD PTR [esp+0x20],eax |
| 52 ; CHECK-NEXT: mov DWORD PTR [esp+0x40],eax | 53 ; CHECK-NEXT: mov DWORD PTR [esp+0x40],eax |
| 53 ; CHECK-NEXT: mov DWORD PTR [esp+0x20],eax | |
| 54 ; CHECK-NEXT: mov DWORD PTR [esp],eax | 54 ; CHECK-NEXT: mov DWORD PTR [esp],eax |
| 55 ; CHECK-NEXT: lea eax,[esp+0x20] |
| 56 ; CHECK-NEXT: mov DWORD PTR [esp+0x4],eax |
| 55 ; CHECK-NEXT: lea eax,[esp+0x40] | 57 ; CHECK-NEXT: lea eax,[esp+0x40] |
| 56 ; CHECK-NEXT: mov DWORD PTR [esp+0x4],eax | 58 ; CHECK-NEXT: mov DWORD PTR [esp+0x8],eax |
| 57 ; CHECK-NEXT: lea eax,[esp+0x20] | 59 ; CHECK-NEXT: lea eax,[esp+0x20] |
| 58 ; CHECK-NEXT: mov DWORD PTR [esp+0x8],eax | 60 ; CHECK-NEXT: mov DWORD PTR [esp+0xc],eax |
| 59 ; CHECK-NEXT: lea eax,[esp+0x40] | 61 ; CHECK-NEXT: lea eax,[esp+0x40] |
| 60 ; CHECK-NEXT: mov DWORD PTR [esp+0xc],eax | |
| 61 ; CHECK-NEXT: lea eax,[esp+0x20] | |
| 62 ; CHECK-NEXT: mov DWORD PTR [esp+0x10],eax | 62 ; CHECK-NEXT: mov DWORD PTR [esp+0x10],eax |
| 63 ; CHECK-NEXT: call | 63 ; CHECK-NEXT: call |
| 64 ; CHECK-NEXT: add esp,0x6c | 64 ; CHECK-NEXT: add esp,0x6c |
| 65 ; CHECK-NEXT: ret | 65 ; CHECK-NEXT: ret |
| OLD | NEW |