1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i386-apple-darwin -relocation-model=pic -frame-pointer=all | FileCheck %s
3 ; Don't fold re-materialized load into a two address instruction
5 %"struct.Smarts::Runnable" = type { ptr, i32 }
6 %struct.__sbuf = type { ptr, i32 }
7 %"struct.std::ios_base" = type { ptr, i32, i32, i32, i32, i32, ptr, %struct.__sbuf, [8 x %struct.__sbuf], i32, ptr, %"struct.std::locale" }
8 %"struct.std::ios_base::_Callback_list" = type { ptr, ptr, i32, i32 }
9 %"struct.std::locale" = type { ptr }
10 %"struct.std::locale::_Impl" = type { i32, ptr, i32, ptr, ptr }
11 @_ZTVSt9basic_iosIcSt11char_traitsIcEE = external constant [4 x ptr] ; <ptr> [#uses=1]
12 @_ZTTSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE = external constant [4 x ptr] ; <ptr> [#uses=1]
13 @_ZTVSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE = external constant [10 x ptr] ; <ptr> [#uses=2]
14 @_ZTVSt15basic_streambufIcSt11char_traitsIcEE = external constant [16 x ptr] ; <ptr> [#uses=1]
15 @_ZTVSt15basic_stringbufIcSt11char_traitsIcESaIcEE = external constant [16 x ptr] ; <ptr> [#uses=1]
17 define void @_GLOBAL__I__ZN5Pooma5pinfoE() nounwind {
18 ; CHECK-LABEL: _GLOBAL__I__ZN5Pooma5pinfoE:
19 ; CHECK: ## %bb.0: ## %entry
20 ; CHECK-NEXT: pushl %ebp
21 ; CHECK-NEXT: movl %esp, %ebp
22 ; CHECK-NEXT: pushl %ebx
23 ; CHECK-NEXT: pushl %edi
24 ; CHECK-NEXT: pushl %esi
25 ; CHECK-NEXT: subl $12, %esp
26 ; CHECK-NEXT: calll L0$pb
28 ; CHECK-NEXT: popl %edi
29 ; CHECK-NEXT: movl L__ZTVSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE$non_lazy_ptr-L0$pb(%edi), %ebx
30 ; CHECK-NEXT: leal 32(%ebx), %eax
31 ; CHECK-NEXT: movl %eax, 0
32 ; CHECK-NEXT: movl $180, (%esp)
33 ; CHECK-NEXT: calll __Znwm
34 ; CHECK-NEXT: movl %eax, %esi
35 ; CHECK-NEXT: movl $0, (%esp)
36 ; CHECK-NEXT: calll __ZNSt8ios_baseC2Ev
37 ; CHECK-NEXT: movl $0, 0
38 ; CHECK-NEXT: addl $12, %ebx
39 ; CHECK-NEXT: movl %ebx, (%esi)
40 ; CHECK-NEXT: movl L__ZTVSt15basic_streambufIcSt11char_traitsIcEE$non_lazy_ptr-L0$pb(%edi), %eax
41 ; CHECK-NEXT: addl $8, %eax
42 ; CHECK-NEXT: movl %eax, 0
43 ; CHECK-NEXT: movl $0, (%esp)
44 ; CHECK-NEXT: calll __ZNSt6localeC1Ev
45 ; CHECK-NEXT: movl L__ZTVSt15basic_stringbufIcSt11char_traitsIcESaIcEE$non_lazy_ptr-L0$pb(%edi), %eax
46 ; CHECK-NEXT: addl $8, %eax
47 ; CHECK-NEXT: movl %eax, 0
50 store ptr getelementptr ([10 x ptr], ptr @_ZTVSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE, i32 0, i32 8), ptr null, align 4
51 %tmp96.i.i142.i = call ptr @_Znwm( i32 180 ) nounwind ; <ptr> [#uses=2]
52 call void @_ZNSt8ios_baseC2Ev( ptr null ) nounwind
53 store ptr getelementptr ([4 x ptr], ptr @_ZTVSt9basic_iosIcSt11char_traitsIcEE, i32 0, i32 2), ptr null, align 4
54 store ptr null, ptr null, align 4
55 %ctg2242.i.i163.i = getelementptr i8, ptr %tmp96.i.i142.i, i32 0 ; <ptr> [#uses=1]
56 %tmp150.i.i164.i = load ptr, ptr getelementptr ([4 x ptr], ptr @_ZTTSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE, i32 0, i64 2), align 4 ; <ptr> [#uses=1]
57 store ptr %tmp150.i.i164.i, ptr %ctg2242.i.i163.i, align 4
58 store ptr getelementptr ([10 x ptr], ptr @_ZTVSt19basic_ostringstreamIcSt11char_traitsIcESaIcEE, i32 0, i32 3), ptr %tmp96.i.i142.i, align 4
59 store ptr getelementptr ([16 x ptr], ptr @_ZTVSt15basic_streambufIcSt11char_traitsIcEE, i32 0, i32 2), ptr null, align 4
60 call void @_ZNSt6localeC1Ev( ptr null ) nounwind
61 store ptr getelementptr ([16 x ptr], ptr @_ZTVSt15basic_stringbufIcSt11char_traitsIcESaIcEE, i32 0, i32 2), ptr null, align 4
65 declare ptr @_Znwm(i32)
67 declare void @_ZNSt8ios_baseC2Ev(ptr)
69 declare void @_ZNSt6localeC1Ev(ptr) nounwind