1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc < %s -mtriple=i686-- -tailcallopt | FileCheck %s
3
4; Bug 4396. This tail call can NOT be optimized.
5
6declare fastcc i8* @_D3gcx2GC12mallocNoSyncMFmkZPv() nounwind
7
8define fastcc i8* @_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
22; CHECK-NEXT:    retl
23entry:
24	%tmp6 = tail call fastcc i8* @_D3gcx2GC12mallocNoSyncMFmkZPv()		; <i8*> [#uses=2]
25	%tmp9 = tail call i8* @memset(i8* %tmp6, i32 0, i64 2)		; <i8*> [#uses=0]
26	ret i8* %tmp6
27}
28
29declare i8* @memset(i8*, i32, i64)
30