1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i686-- -tailcallopt | FileCheck %s
4 ; Bug 4396. This tail call can NOT be optimized.
6 declare fastcc ptr @_D3gcx2GC12mallocNoSyncMFmkZPv() nounwind
8 define fastcc ptr @_D3gcx2GC12callocNoSyncMFmkZPv() nounwind {
9 ; CHECK-LABEL: _D3gcx2GC12callocNoSyncMFmkZPv:
10 ; CHECK: # %bb.0: # %entry
11 ; CHECK-NEXT: pushl %esi
12 ; CHECK-NEXT: calll _D3gcx2GC12mallocNoSyncMFmkZPv@PLT
13 ; CHECK-NEXT: movl %eax, %esi
14 ; CHECK-NEXT: pushl $0
15 ; CHECK-NEXT: pushl $2
16 ; CHECK-NEXT: pushl $0
17 ; CHECK-NEXT: pushl %eax
18 ; CHECK-NEXT: calll memset@PLT
19 ; CHECK-NEXT: addl $16, %esp
20 ; CHECK-NEXT: movl %esi, %eax
21 ; CHECK-NEXT: popl %esi
24 %tmp6 = tail call fastcc ptr @_D3gcx2GC12mallocNoSyncMFmkZPv() ; <ptr> [#uses=2]
25 %tmp9 = tail call ptr @memset(ptr %tmp6, i32 0, i64 2) ; <ptr> [#uses=0]
29 declare ptr @memset(ptr, i32, i64)