OLD | NEW |
1 ; Translate with -fsanitize-address and -O2 to test alignment and ordering of | 1 ; Translate with -fsanitize-address and -O2 to test alignment and ordering of |
2 ; redzones when allocas are coalesced. | 2 ; redzones when allocas are coalesced. |
3 | 3 |
4 ; REQUIRES: no_minimal_build | 4 ; REQUIRES: no_minimal_build |
5 | 5 |
6 ; RUN: %p2i --filetype=obj --disassemble --target x8632 -i %s --args -O2 \ | 6 ; RUN: %p2i --filetype=obj --disassemble --target x8632 -i %s --args -O2 \ |
7 ; RUN: -allow-externally-defined-symbols -fsanitize-address | FileCheck %s | 7 ; RUN: -allow-externally-defined-symbols -fsanitize-address | FileCheck %s |
8 | 8 |
9 define internal i32 @func(i32 %arg1, i32 %arg2) { | 9 define internal i32 @func(i32 %arg1, i32 %arg2) { |
10 %l1 = alloca i8, i32 4, align 4 | 10 %l1 = alloca i8, i32 4, align 4 |
11 %l2 = alloca i8, i32 5, align 1 | 11 %l2 = alloca i8, i32 5, align 1 |
12 ret i32 42 | 12 ret i32 42 |
13 } | 13 } |
14 | 14 |
15 ; CHECK: func | 15 ; CHECK: func |
16 ; CHECK-NEXT: sub esp,0xbc | 16 ; CHECK-NEXT: sub esp,0xbc |
17 ; CHECK-NEXT: lea eax,[esp+0x10] | 17 ; CHECK-NEXT: lea eax,[esp+0x10] |
18 ; CHECK-NEXT: mov DWORD PTR [esp],eax | 18 ; CHECK-NEXT: mov DWORD PTR [esp],eax |
19 ; CHECK-NEXT: mov DWORD PTR [esp+0x4],0x20 | 19 ; CHECK-NEXT: mov DWORD PTR [esp+0x4],0x20 |
| 20 ; CHECK-NEXT: mov DWORD PTR [esp+0x8],0xffffffff |
20 ; CHECK-NEXT: __asan_poison | 21 ; CHECK-NEXT: __asan_poison |
21 ; CHECK-NEXT: lea eax,[esp+0x74] | 22 ; CHECK-NEXT: lea eax,[esp+0x74] |
22 ; CHECK-NEXT: mov DWORD PTR [esp],eax | 23 ; CHECK-NEXT: mov DWORD PTR [esp],eax |
23 ; CHECK-NEXT: mov DWORD PTR [esp+0x4],0x3c | 24 ; CHECK-NEXT: mov DWORD PTR [esp+0x4],0x3c |
| 25 ; CHECK-NEXT: mov DWORD PTR [esp+0x8],0xffffffff |
24 ; CHECK-NEXT: __asan_poison | 26 ; CHECK-NEXT: __asan_poison |
25 ; CHECK-NEXT: lea eax,[esp+0x35] | 27 ; CHECK-NEXT: lea eax,[esp+0x35] |
26 ; CHECK-NEXT: mov DWORD PTR [esp],eax | 28 ; CHECK-NEXT: mov DWORD PTR [esp],eax |
27 ; CHECK-NEXT: mov DWORD PTR [esp+0x4],0x3b | 29 ; CHECK-NEXT: mov DWORD PTR [esp+0x4],0x3b |
| 30 ; CHECK-NEXT: mov DWORD PTR [esp+0x8],0xffffffff |
28 ; CHECK-NEXT: __asan_poison | 31 ; CHECK-NEXT: __asan_poison |
29 ; CHECK-NEXT: lea eax,[esp+0x74] | 32 ; CHECK-NEXT: lea eax,[esp+0x74] |
30 ; CHECK-NEXT: mov DWORD PTR [esp],eax | 33 ; CHECK-NEXT: mov DWORD PTR [esp],eax |
31 ; CHECK-NEXT: mov DWORD PTR [esp+0x4],0x3c | 34 ; CHECK-NEXT: mov DWORD PTR [esp+0x4],0x3c |
32 ; CHECK-NEXT: __asan_unpoison | 35 ; CHECK-NEXT: __asan_unpoison |
33 ; CHECK-NEXT: lea eax,[esp+0x35] | 36 ; CHECK-NEXT: lea eax,[esp+0x35] |
34 ; CHECK-NEXT: mov DWORD PTR [esp],eax | 37 ; CHECK-NEXT: mov DWORD PTR [esp],eax |
35 ; CHECK-NEXT: mov DWORD PTR [esp+0x4],0x3b | 38 ; CHECK-NEXT: mov DWORD PTR [esp+0x4],0x3b |
36 ; CHECK-NEXT: __asan_unpoison | 39 ; CHECK-NEXT: __asan_unpoison |
37 ; CHECK-NEXT: lea eax,[esp+0x10] | 40 ; CHECK-NEXT: lea eax,[esp+0x10] |
38 ; CHECK-NEXT: mov DWORD PTR [esp],eax | 41 ; CHECK-NEXT: mov DWORD PTR [esp],eax |
39 ; CHECK-NEXT: mov DWORD PTR [esp+0x4],0x20 | 42 ; CHECK-NEXT: mov DWORD PTR [esp+0x4],0x20 |
40 ; CHECK-NEXT: __asan_unpoison | 43 ; CHECK-NEXT: __asan_unpoison |
41 ; CHECK-NEXT: mov eax,0x2a | 44 ; CHECK-NEXT: mov eax,0x2a |
42 ; CHECK-NEXT: add esp,0xbc | 45 ; CHECK-NEXT: add esp,0xbc |
43 ; CHECK-NEXT: ret | 46 ; CHECK-NEXT: ret |
OLD | NEW |