Home | History | Annotate | Download | only in Hexagon
      1 ; RUN: llc -O2 -march=hexagon -mcpu=hexagonv5 < %s | FileCheck %s
      2 ; we do not want to see a segv.
      3 ; CHECK-NOT: segmentation
      4 ; CHECK: call
      5 
      6 target datalayout = "e-m:e-p:32:32-i1:32-i64:64-a:0-v32:32-n16:32"
      7 target triple = "hexagon"
      8 
      9 %"class.std::__1::basic_string" = type { %"class.std::__1::__compressed_pair" }
     10 %"class.std::__1::__compressed_pair" = type { %"class.std::__1::__libcpp_compressed_pair_imp" }
     11 %"class.std::__1::__libcpp_compressed_pair_imp" = type { %"struct.std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__rep" }
     12 %"struct.std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__rep" = type { %union.anon }
     13 %union.anon = type { %"struct.std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__long" }
     14 %"struct.std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__long" = type { i32, i32, i8* }
     15 %"class.std::__1::ios_base" = type { i32 (...)**, i32, i32, i32, i32, i32, i8*, i8*, void (i8, %"class.std::__1::ios_base"*, i32)**, i32*, i32, i32, i32*, i32, i32, i8**, i32, i32 }
     16 %"class.std::__1::basic_streambuf" = type { i32 (...)**, %"class.std::__1::locale", i8*, i8*, i8*, i8*, i8*, i8* }
     17 %"class.std::__1::locale" = type { %"class.std::__1::locale::__imp"* }
     18 %"class.std::__1::locale::__imp" = type opaque
     19 %"class.std::__1::allocator" = type { i8 }
     20 %"class.std::__1::ostreambuf_iterator" = type { %"class.std::__1::basic_streambuf"* }
     21 %"class.std::__1::__basic_string_common" = type { i8 }
     22 %"struct.std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__short" = type { %union.anon.0, [11 x i8] }
     23 %union.anon.0 = type { i8 }
     24 
     25 ; Function Attrs: nounwind
     26 declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture readonly, i32, i32, i1) #0
     27 
     28 declare i32 @__gxx_personality_v0(...)
     29 
     30 ; Function Attrs: nounwind
     31 declare void @_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED1Ev(%"class.std::__1::basic_string"*) #1
     32 
     33 define weak_odr hidden i32 @_ZNSt3__116__pad_and_outputIcNS_11char_traitsIcEEEENS_19ostreambuf_iteratorIT_T0_EES6_PKS4_S8_S8_RNS_8ios_baseES4_(i32 %__s.coerce, i8* %__ob, i8* %__op, i8* %__oe, %"class.std::__1::ios_base"* nonnull %__iob, i8 zeroext %__fl) #2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
     34 entry:
     35   %this.addr.i66 = alloca %"class.std::__1::basic_streambuf"*, align 4
     36   %__s.addr.i67 = alloca i8*, align 4
     37   %__n.addr.i68 = alloca i32, align 4
     38   %__p.addr.i.i = alloca i8*, align 4
     39   %this.addr.i.i.i13.i.i = alloca %"class.std::__1::__libcpp_compressed_pair_imp"*, align 4
     40   %this.addr.i.i14.i.i = alloca %"class.std::__1::__compressed_pair"*, align 4
     41   %this.addr.i15.i.i = alloca %"class.std::__1::basic_string"*, align 4
     42   %__x.addr.i.i.i.i.i = alloca i8*, align 4
     43   %__r.addr.i.i.i.i = alloca i8*, align 4
     44   %this.addr.i.i.i4.i.i = alloca %"class.std::__1::__libcpp_compressed_pair_imp"*, align 4
     45   %this.addr.i.i5.i.i = alloca %"class.std::__1::__compressed_pair"*, align 4
     46   %this.addr.i6.i.i = alloca %"class.std::__1::basic_string"*, align 4
     47   %this.addr.i.i.i.i.i56 = alloca %"class.std::__1::__libcpp_compressed_pair_imp"*, align 4
     48   %this.addr.i.i.i.i57 = alloca %"class.std::__1::__compressed_pair"*, align 4
     49   %this.addr.i.i.i58 = alloca %"class.std::__1::basic_string"*, align 4
     50   %this.addr.i.i59 = alloca %"class.std::__1::basic_string"*, align 4
     51   %this.addr.i60 = alloca %"class.std::__1::basic_string"*, align 4
     52   %this.addr.i.i.i.i.i = alloca %"class.std::__1::allocator"*, align 4
     53   %this.addr.i.i.i.i = alloca %"class.std::__1::__libcpp_compressed_pair_imp"*, align 4
     54   %this.addr.i.i.i = alloca %"class.std::__1::__compressed_pair"*, align 4
     55   %this.addr.i.i = alloca %"class.std::__1::basic_string"*, align 4
     56   %__n.addr.i.i = alloca i32, align 4
     57   %__c.addr.i.i = alloca i8, align 1
     58   %this.addr.i53 = alloca %"class.std::__1::basic_string"*, align 4
     59   %__n.addr.i54 = alloca i32, align 4
     60   %__c.addr.i = alloca i8, align 1
     61   %this.addr.i46 = alloca %"class.std::__1::basic_streambuf"*, align 4
     62   %__s.addr.i47 = alloca i8*, align 4
     63   %__n.addr.i48 = alloca i32, align 4
     64   %this.addr.i44 = alloca %"class.std::__1::basic_streambuf"*, align 4
     65   %__s.addr.i = alloca i8*, align 4
     66   %__n.addr.i = alloca i32, align 4
     67   %this.addr.i41 = alloca %"class.std::__1::ios_base"*, align 4
     68   %__wide.addr.i = alloca i32, align 4
     69   %__r.i = alloca i32, align 4
     70   %this.addr.i = alloca %"class.std::__1::ios_base"*, align 4
     71   %retval = alloca %"class.std::__1::ostreambuf_iterator", align 4
     72   %__s = alloca %"class.std::__1::ostreambuf_iterator", align 4
     73   %__ob.addr = alloca i8*, align 4
     74   %__op.addr = alloca i8*, align 4
     75   %__oe.addr = alloca i8*, align 4
     76   %__iob.addr = alloca %"class.std::__1::ios_base"*, align 4
     77   %__fl.addr = alloca i8, align 1
     78   %__sz = alloca i32, align 4
     79   %__ns = alloca i32, align 4
     80   %__np = alloca i32, align 4
     81   %__sp = alloca %"class.std::__1::basic_string", align 4
     82   %exn.slot = alloca i8*
     83   %ehselector.slot = alloca i32
     84   %cleanup.dest.slot = alloca i32
     85   %coerce.dive = getelementptr %"class.std::__1::ostreambuf_iterator", %"class.std::__1::ostreambuf_iterator"* %__s, i32 0, i32 0
     86   %coerce.val.ip = inttoptr i32 %__s.coerce to %"class.std::__1::basic_streambuf"*
     87   store %"class.std::__1::basic_streambuf"* %coerce.val.ip, %"class.std::__1::basic_streambuf"** %coerce.dive
     88   store i8* %__ob, i8** %__ob.addr, align 4
     89   store i8* %__op, i8** %__op.addr, align 4
     90   store i8* %__oe, i8** %__oe.addr, align 4
     91   store %"class.std::__1::ios_base"* %__iob, %"class.std::__1::ios_base"** %__iob.addr, align 4
     92   store i8 %__fl, i8* %__fl.addr, align 1
     93   %__sbuf_ = getelementptr inbounds %"class.std::__1::ostreambuf_iterator", %"class.std::__1::ostreambuf_iterator"* %__s, i32 0, i32 0
     94   %0 = load %"class.std::__1::basic_streambuf"*, %"class.std::__1::basic_streambuf"** %__sbuf_, align 4
     95   %cmp = icmp eq %"class.std::__1::basic_streambuf"* %0, null
     96   br i1 %cmp, label %if.then, label %if.end
     97 
     98 if.then:                                          ; preds = %entry
     99   %1 = bitcast %"class.std::__1::ostreambuf_iterator"* %retval to i8*
    100   %2 = bitcast %"class.std::__1::ostreambuf_iterator"* %__s to i8*
    101   call void @llvm.memcpy.p0i8.p0i8.i32(i8* %1, i8* %2, i32 4, i32 4, i1 false)
    102   br label %return
    103 
    104 if.end:                                           ; preds = %entry
    105   %3 = load i8*, i8** %__oe.addr, align 4
    106   %4 = load i8*, i8** %__ob.addr, align 4
    107   %sub.ptr.lhs.cast = ptrtoint i8* %3 to i32
    108   %sub.ptr.rhs.cast = ptrtoint i8* %4 to i32
    109   %sub.ptr.sub = sub i32 %sub.ptr.lhs.cast, %sub.ptr.rhs.cast
    110   store i32 %sub.ptr.sub, i32* %__sz, align 4
    111   %5 = load %"class.std::__1::ios_base"*, %"class.std::__1::ios_base"** %__iob.addr, align 4
    112   store %"class.std::__1::ios_base"* %5, %"class.std::__1::ios_base"** %this.addr.i, align 4
    113   %this1.i = load %"class.std::__1::ios_base"*, %"class.std::__1::ios_base"** %this.addr.i
    114   %__width_.i = getelementptr inbounds %"class.std::__1::ios_base", %"class.std::__1::ios_base"* %this1.i, i32 0, i32 3
    115   %6 = load i32, i32* %__width_.i, align 4
    116   store i32 %6, i32* %__ns, align 4
    117   %7 = load i32, i32* %__ns, align 4
    118   %8 = load i32, i32* %__sz, align 4
    119   %cmp1 = icmp sgt i32 %7, %8
    120   br i1 %cmp1, label %if.then2, label %if.else
    121 
    122 if.then2:                                         ; preds = %if.end
    123   %9 = load i32, i32* %__sz, align 4
    124   %10 = load i32, i32* %__ns, align 4
    125   %sub = sub nsw i32 %10, %9
    126   store i32 %sub, i32* %__ns, align 4
    127   br label %if.end3
    128 
    129 if.else:                                          ; preds = %if.end
    130   store i32 0, i32* %__ns, align 4
    131   br label %if.end3
    132 
    133 if.end3:                                          ; preds = %if.else, %if.then2
    134   %11 = load i8*, i8** %__op.addr, align 4
    135   %12 = load i8*, i8** %__ob.addr, align 4
    136   %sub.ptr.lhs.cast4 = ptrtoint i8* %11 to i32
    137   %sub.ptr.rhs.cast5 = ptrtoint i8* %12 to i32
    138   %sub.ptr.sub6 = sub i32 %sub.ptr.lhs.cast4, %sub.ptr.rhs.cast5
    139   store i32 %sub.ptr.sub6, i32* %__np, align 4
    140   %13 = load i32, i32* %__np, align 4
    141   %cmp7 = icmp sgt i32 %13, 0
    142   br i1 %cmp7, label %if.then8, label %if.end15
    143 
    144 if.then8:                                         ; preds = %if.end3
    145   %__sbuf_9 = getelementptr inbounds %"class.std::__1::ostreambuf_iterator", %"class.std::__1::ostreambuf_iterator"* %__s, i32 0, i32 0
    146   %14 = load %"class.std::__1::basic_streambuf"*, %"class.std::__1::basic_streambuf"** %__sbuf_9, align 4
    147   %15 = load i8*, i8** %__ob.addr, align 4
    148   %16 = load i32, i32* %__np, align 4
    149   store %"class.std::__1::basic_streambuf"* %14, %"class.std::__1::basic_streambuf"** %this.addr.i46, align 4
    150   store i8* %15, i8** %__s.addr.i47, align 4
    151   store i32 %16, i32* %__n.addr.i48, align 4
    152   %this1.i49 = load %"class.std::__1::basic_streambuf"*, %"class.std::__1::basic_streambuf"** %this.addr.i46
    153   %17 = bitcast %"class.std::__1::basic_streambuf"* %this1.i49 to i32 (%"class.std::__1::basic_streambuf"*, i8*, i32)***
    154   %vtable.i50 = load i32 (%"class.std::__1::basic_streambuf"*, i8*, i32)**, i32 (%"class.std::__1::basic_streambuf"*, i8*, i32)*** %17
    155   %vfn.i51 = getelementptr inbounds i32 (%"class.std::__1::basic_streambuf"*, i8*, i32)*, i32 (%"class.std::__1::basic_streambuf"*, i8*, i32)** %vtable.i50, i64 12
    156   %18 = load i32 (%"class.std::__1::basic_streambuf"*, i8*, i32)*, i32 (%"class.std::__1::basic_streambuf"*, i8*, i32)** %vfn.i51
    157   %19 = load i8*, i8** %__s.addr.i47, align 4
    158   %20 = load i32, i32* %__n.addr.i48, align 4
    159   %call.i52 = call i32 %18(%"class.std::__1::basic_streambuf"* %this1.i49, i8* %19, i32 %20)
    160   %21 = load i32, i32* %__np, align 4
    161   %cmp11 = icmp ne i32 %call.i52, %21
    162   br i1 %cmp11, label %if.then12, label %if.end14
    163 
    164 if.then12:                                        ; preds = %if.then8
    165   %__sbuf_13 = getelementptr inbounds %"class.std::__1::ostreambuf_iterator", %"class.std::__1::ostreambuf_iterator"* %__s, i32 0, i32 0
    166   store %"class.std::__1::basic_streambuf"* null, %"class.std::__1::basic_streambuf"** %__sbuf_13, align 4
    167   %22 = bitcast %"class.std::__1::ostreambuf_iterator"* %retval to i8*
    168   %23 = bitcast %"class.std::__1::ostreambuf_iterator"* %__s to i8*
    169   call void @llvm.memcpy.p0i8.p0i8.i32(i8* %22, i8* %23, i32 4, i32 4, i1 false)
    170   br label %return
    171 
    172 if.end14:                                         ; preds = %if.then8
    173   br label %if.end15
    174 
    175 if.end15:                                         ; preds = %if.end14, %if.end3
    176   %24 = load i32, i32* %__ns, align 4
    177   %cmp16 = icmp sgt i32 %24, 0
    178   br i1 %cmp16, label %if.then17, label %if.end25
    179 
    180 if.then17:                                        ; preds = %if.end15
    181   %25 = load i32, i32* %__ns, align 4
    182   %26 = load i8, i8* %__fl.addr, align 1
    183   store %"class.std::__1::basic_string"* %__sp, %"class.std::__1::basic_string"** %this.addr.i53, align 4
    184   store i32 %25, i32* %__n.addr.i54, align 4
    185   store i8 %26, i8* %__c.addr.i, align 1
    186   %this1.i55 = load %"class.std::__1::basic_string"*, %"class.std::__1::basic_string"** %this.addr.i53
    187   %27 = load i32, i32* %__n.addr.i54, align 4
    188   %28 = load i8, i8* %__c.addr.i, align 1
    189   store %"class.std::__1::basic_string"* %this1.i55, %"class.std::__1::basic_string"** %this.addr.i.i, align 4
    190   store i32 %27, i32* %__n.addr.i.i, align 4
    191   store i8 %28, i8* %__c.addr.i.i, align 1
    192   %this1.i.i = load %"class.std::__1::basic_string"*, %"class.std::__1::basic_string"** %this.addr.i.i
    193   %29 = bitcast %"class.std::__1::basic_string"* %this1.i.i to %"class.std::__1::__basic_string_common"*
    194   %__r_.i.i = getelementptr inbounds %"class.std::__1::basic_string", %"class.std::__1::basic_string"* %this1.i.i, i32 0, i32 0
    195   store %"class.std::__1::__compressed_pair"* %__r_.i.i, %"class.std::__1::__compressed_pair"** %this.addr.i.i.i, align 4
    196   %this1.i.i.i = load %"class.std::__1::__compressed_pair"*, %"class.std::__1::__compressed_pair"** %this.addr.i.i.i
    197   %30 = bitcast %"class.std::__1::__compressed_pair"* %this1.i.i.i to %"class.std::__1::__libcpp_compressed_pair_imp"*
    198   store %"class.std::__1::__libcpp_compressed_pair_imp"* %30, %"class.std::__1::__libcpp_compressed_pair_imp"** %this.addr.i.i.i.i, align 4
    199   %this1.i.i.i.i = load %"class.std::__1::__libcpp_compressed_pair_imp"*, %"class.std::__1::__libcpp_compressed_pair_imp"** %this.addr.i.i.i.i
    200   %31 = bitcast %"class.std::__1::__libcpp_compressed_pair_imp"* %this1.i.i.i.i to %"class.std::__1::allocator"*
    201   store %"class.std::__1::allocator"* %31, %"class.std::__1::allocator"** %this.addr.i.i.i.i.i, align 4
    202   %this1.i.i.i.i.i = load %"class.std::__1::allocator"*, %"class.std::__1::allocator"** %this.addr.i.i.i.i.i
    203   %__first_.i.i.i.i = getelementptr inbounds %"class.std::__1::__libcpp_compressed_pair_imp", %"class.std::__1::__libcpp_compressed_pair_imp"* %this1.i.i.i.i, i32 0, i32 0
    204   %32 = load i32, i32* %__n.addr.i.i, align 4
    205   %33 = load i8, i8* %__c.addr.i.i, align 1
    206   call void @_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEjc(%"class.std::__1::basic_string"* %this1.i.i, i32 %32, i8 zeroext %33)
    207   %__sbuf_18 = getelementptr inbounds %"class.std::__1::ostreambuf_iterator", %"class.std::__1::ostreambuf_iterator"* %__s, i32 0, i32 0
    208   %34 = load %"class.std::__1::basic_streambuf"*, %"class.std::__1::basic_streambuf"** %__sbuf_18, align 4
    209   store %"class.std::__1::basic_string"* %__sp, %"class.std::__1::basic_string"** %this.addr.i60, align 4
    210   %this1.i61 = load %"class.std::__1::basic_string"*, %"class.std::__1::basic_string"** %this.addr.i60
    211   store %"class.std::__1::basic_string"* %this1.i61, %"class.std::__1::basic_string"** %this.addr.i.i59, align 4
    212   %this1.i.i62 = load %"class.std::__1::basic_string"*, %"class.std::__1::basic_string"** %this.addr.i.i59
    213   store %"class.std::__1::basic_string"* %this1.i.i62, %"class.std::__1::basic_string"** %this.addr.i.i.i58, align 4
    214   %this1.i.i.i63 = load %"class.std::__1::basic_string"*, %"class.std::__1::basic_string"** %this.addr.i.i.i58
    215   %__r_.i.i.i = getelementptr inbounds %"class.std::__1::basic_string", %"class.std::__1::basic_string"* %this1.i.i.i63, i32 0, i32 0
    216   store %"class.std::__1::__compressed_pair"* %__r_.i.i.i, %"class.std::__1::__compressed_pair"** %this.addr.i.i.i.i57, align 4
    217   %this1.i.i.i.i64 = load %"class.std::__1::__compressed_pair"*, %"class.std::__1::__compressed_pair"** %this.addr.i.i.i.i57
    218   %35 = bitcast %"class.std::__1::__compressed_pair"* %this1.i.i.i.i64 to %"class.std::__1::__libcpp_compressed_pair_imp"*
    219   store %"class.std::__1::__libcpp_compressed_pair_imp"* %35, %"class.std::__1::__libcpp_compressed_pair_imp"** %this.addr.i.i.i.i.i56, align 4
    220   %this1.i.i.i.i.i65 = load %"class.std::__1::__libcpp_compressed_pair_imp"*, %"class.std::__1::__libcpp_compressed_pair_imp"** %this.addr.i.i.i.i.i56
    221   %__first_.i.i.i.i.i = getelementptr inbounds %"class.std::__1::__libcpp_compressed_pair_imp", %"class.std::__1::__libcpp_compressed_pair_imp"* %this1.i.i.i.i.i65, i32 0, i32 0
    222   %36 = getelementptr inbounds %"struct.std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__rep", %"struct.std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__rep"* %__first_.i.i.i.i.i, i32 0, i32 0
    223   %__s.i.i.i = bitcast %union.anon* %36 to %"struct.std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__short"*
    224   %37 = getelementptr inbounds %"struct.std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__short", %"struct.std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__short"* %__s.i.i.i, i32 0, i32 0
    225   %__size_.i.i.i = bitcast %union.anon.0* %37 to i8*
    226   %38 = load i8, i8* %__size_.i.i.i, align 1
    227   %conv.i.i.i = zext i8 %38 to i32
    228   %and.i.i.i = and i32 %conv.i.i.i, 1
    229   %tobool.i.i.i = icmp ne i32 %and.i.i.i, 0
    230   br i1 %tobool.i.i.i, label %cond.true.i.i, label %cond.false.i.i
    231 
    232 cond.true.i.i:                                    ; preds = %if.then17
    233   store %"class.std::__1::basic_string"* %this1.i.i62, %"class.std::__1::basic_string"** %this.addr.i15.i.i, align 4
    234   %this1.i16.i.i = load %"class.std::__1::basic_string"*, %"class.std::__1::basic_string"** %this.addr.i15.i.i
    235   %__r_.i17.i.i = getelementptr inbounds %"class.std::__1::basic_string", %"class.std::__1::basic_string"* %this1.i16.i.i, i32 0, i32 0
    236   store %"class.std::__1::__compressed_pair"* %__r_.i17.i.i, %"class.std::__1::__compressed_pair"** %this.addr.i.i14.i.i, align 4
    237   %this1.i.i18.i.i = load %"class.std::__1::__compressed_pair"*, %"class.std::__1::__compressed_pair"** %this.addr.i.i14.i.i
    238   %39 = bitcast %"class.std::__1::__compressed_pair"* %this1.i.i18.i.i to %"class.std::__1::__libcpp_compressed_pair_imp"*
    239   store %"class.std::__1::__libcpp_compressed_pair_imp"* %39, %"class.std::__1::__libcpp_compressed_pair_imp"** %this.addr.i.i.i13.i.i, align 4
    240   %this1.i.i.i19.i.i = load %"class.std::__1::__libcpp_compressed_pair_imp"*, %"class.std::__1::__libcpp_compressed_pair_imp"** %this.addr.i.i.i13.i.i
    241   %__first_.i.i.i20.i.i = getelementptr inbounds %"class.std::__1::__libcpp_compressed_pair_imp", %"class.std::__1::__libcpp_compressed_pair_imp"* %this1.i.i.i19.i.i, i32 0, i32 0
    242   %40 = getelementptr inbounds %"struct.std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__rep", %"struct.std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__rep"* %__first_.i.i.i20.i.i, i32 0, i32 0
    243   %__l.i.i.i = bitcast %union.anon* %40 to %"struct.std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__long"*
    244   %__data_.i21.i.i = getelementptr inbounds %"struct.std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__long", %"struct.std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__long"* %__l.i.i.i, i32 0, i32 2
    245   %41 = load i8*, i8** %__data_.i21.i.i, align 4
    246   br label %_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4dataEv.exit
    247 
    248 cond.false.i.i:                                   ; preds = %if.then17
    249   store %"class.std::__1::basic_string"* %this1.i.i62, %"class.std::__1::basic_string"** %this.addr.i6.i.i, align 4
    250   %this1.i7.i.i = load %"class.std::__1::basic_string"*, %"class.std::__1::basic_string"** %this.addr.i6.i.i
    251   %__r_.i8.i.i = getelementptr inbounds %"class.std::__1::basic_string", %"class.std::__1::basic_string"* %this1.i7.i.i, i32 0, i32 0
    252   store %"class.std::__1::__compressed_pair"* %__r_.i8.i.i, %"class.std::__1::__compressed_pair"** %this.addr.i.i5.i.i, align 4
    253   %this1.i.i9.i.i = load %"class.std::__1::__compressed_pair"*, %"class.std::__1::__compressed_pair"** %this.addr.i.i5.i.i
    254   %42 = bitcast %"class.std::__1::__compressed_pair"* %this1.i.i9.i.i to %"class.std::__1::__libcpp_compressed_pair_imp"*
    255   store %"class.std::__1::__libcpp_compressed_pair_imp"* %42, %"class.std::__1::__libcpp_compressed_pair_imp"** %this.addr.i.i.i4.i.i, align 4
    256   %this1.i.i.i10.i.i = load %"class.std::__1::__libcpp_compressed_pair_imp"*, %"class.std::__1::__libcpp_compressed_pair_imp"** %this.addr.i.i.i4.i.i
    257   %__first_.i.i.i11.i.i = getelementptr inbounds %"class.std::__1::__libcpp_compressed_pair_imp", %"class.std::__1::__libcpp_compressed_pair_imp"* %this1.i.i.i10.i.i, i32 0, i32 0
    258   %43 = getelementptr inbounds %"struct.std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__rep", %"struct.std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__rep"* %__first_.i.i.i11.i.i, i32 0, i32 0
    259   %__s.i12.i.i = bitcast %union.anon* %43 to %"struct.std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__short"*
    260   %__data_.i.i.i = getelementptr inbounds %"struct.std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__short", %"struct.std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__short"* %__s.i12.i.i, i32 0, i32 1
    261   %arrayidx.i.i.i = getelementptr inbounds [11 x i8], [11 x i8]* %__data_.i.i.i, i32 0, i32 0
    262   store i8* %arrayidx.i.i.i, i8** %__r.addr.i.i.i.i, align 4
    263   %44 = load i8*, i8** %__r.addr.i.i.i.i, align 4
    264   store i8* %44, i8** %__x.addr.i.i.i.i.i, align 4
    265   %45 = load i8*, i8** %__x.addr.i.i.i.i.i, align 4
    266   br label %_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4dataEv.exit
    267 
    268 _ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4dataEv.exit: ; preds = %cond.false.i.i, %cond.true.i.i
    269   %cond.i.i = phi i8* [ %41, %cond.true.i.i ], [ %45, %cond.false.i.i ]
    270   store i8* %cond.i.i, i8** %__p.addr.i.i, align 4
    271   %46 = load i8*, i8** %__p.addr.i.i, align 4
    272   %47 = load i32, i32* %__ns, align 4
    273   store %"class.std::__1::basic_streambuf"* %34, %"class.std::__1::basic_streambuf"** %this.addr.i66, align 4
    274   store i8* %46, i8** %__s.addr.i67, align 4
    275   store i32 %47, i32* %__n.addr.i68, align 4
    276   %this1.i69 = load %"class.std::__1::basic_streambuf"*, %"class.std::__1::basic_streambuf"** %this.addr.i66
    277   %48 = bitcast %"class.std::__1::basic_streambuf"* %this1.i69 to i32 (%"class.std::__1::basic_streambuf"*, i8*, i32)***
    278   %vtable.i70 = load i32 (%"class.std::__1::basic_streambuf"*, i8*, i32)**, i32 (%"class.std::__1::basic_streambuf"*, i8*, i32)*** %48
    279   %vfn.i71 = getelementptr inbounds i32 (%"class.std::__1::basic_streambuf"*, i8*, i32)*, i32 (%"class.std::__1::basic_streambuf"*, i8*, i32)** %vtable.i70, i64 12
    280   %49 = load i32 (%"class.std::__1::basic_streambuf"*, i8*, i32)*, i32 (%"class.std::__1::basic_streambuf"*, i8*, i32)** %vfn.i71
    281   %50 = load i8*, i8** %__s.addr.i67, align 4
    282   %51 = load i32, i32* %__n.addr.i68, align 4
    283   %call.i7273 = invoke i32 %49(%"class.std::__1::basic_streambuf"* %this1.i69, i8* %50, i32 %51)
    284           to label %_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5sputnEPKci.exit unwind label %lpad
    285 
    286 _ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5sputnEPKci.exit: ; preds = %_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4dataEv.exit
    287   br label %invoke.cont
    288 
    289 invoke.cont:                                      ; preds = %_ZNSt3__115basic_streambufIcNS_11char_traitsIcEEE5sputnEPKci.exit
    290   %52 = load i32, i32* %__ns, align 4
    291   %cmp21 = icmp ne i32 %call.i7273, %52
    292   br i1 %cmp21, label %if.then22, label %if.end24
    293 
    294 if.then22:                                        ; preds = %invoke.cont
    295   %__sbuf_23 = getelementptr inbounds %"class.std::__1::ostreambuf_iterator", %"class.std::__1::ostreambuf_iterator"* %__s, i32 0, i32 0
    296   store %"class.std::__1::basic_streambuf"* null, %"class.std::__1::basic_streambuf"** %__sbuf_23, align 4
    297   %53 = bitcast %"class.std::__1::ostreambuf_iterator"* %retval to i8*
    298   %54 = bitcast %"class.std::__1::ostreambuf_iterator"* %__s to i8*
    299   call void @llvm.memcpy.p0i8.p0i8.i32(i8* %53, i8* %54, i32 4, i32 4, i1 false)
    300   store i32 1, i32* %cleanup.dest.slot
    301   br label %cleanup
    302 
    303 lpad:                                             ; preds = %_ZNKSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE4dataEv.exit
    304   %55 = landingpad { i8*, i32 }
    305           cleanup
    306   %56 = extractvalue { i8*, i32 } %55, 0
    307   store i8* %56, i8** %exn.slot
    308   %57 = extractvalue { i8*, i32 } %55, 1
    309   store i32 %57, i32* %ehselector.slot
    310   call void @_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED1Ev(%"class.std::__1::basic_string"* %__sp) #0
    311   br label %eh.resume
    312 
    313 if.end24:                                         ; preds = %invoke.cont
    314   store i32 0, i32* %cleanup.dest.slot
    315   br label %cleanup
    316 
    317 cleanup:                                          ; preds = %if.end24, %if.then22
    318   call void @_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED1Ev(%"class.std::__1::basic_string"* %__sp) #0
    319   %cleanup.dest = load i32, i32* %cleanup.dest.slot
    320   switch i32 %cleanup.dest, label %unreachable [
    321     i32 0, label %cleanup.cont
    322     i32 1, label %return
    323   ]
    324 
    325 cleanup.cont:                                     ; preds = %cleanup
    326   br label %if.end25
    327 
    328 if.end25:                                         ; preds = %cleanup.cont, %if.end15
    329   %58 = load i8*, i8** %__oe.addr, align 4
    330   %59 = load i8*, i8** %__op.addr, align 4
    331   %sub.ptr.lhs.cast26 = ptrtoint i8* %58 to i32
    332   %sub.ptr.rhs.cast27 = ptrtoint i8* %59 to i32
    333   %sub.ptr.sub28 = sub i32 %sub.ptr.lhs.cast26, %sub.ptr.rhs.cast27
    334   store i32 %sub.ptr.sub28, i32* %__np, align 4
    335   %60 = load i32, i32* %__np, align 4
    336   %cmp29 = icmp sgt i32 %60, 0
    337   br i1 %cmp29, label %if.then30, label %if.end37
    338 
    339 if.then30:                                        ; preds = %if.end25
    340   %__sbuf_31 = getelementptr inbounds %"class.std::__1::ostreambuf_iterator", %"class.std::__1::ostreambuf_iterator"* %__s, i32 0, i32 0
    341   %61 = load %"class.std::__1::basic_streambuf"*, %"class.std::__1::basic_streambuf"** %__sbuf_31, align 4
    342   %62 = load i8*, i8** %__op.addr, align 4
    343   %63 = load i32, i32* %__np, align 4
    344   store %"class.std::__1::basic_streambuf"* %61, %"class.std::__1::basic_streambuf"** %this.addr.i44, align 4
    345   store i8* %62, i8** %__s.addr.i, align 4
    346   store i32 %63, i32* %__n.addr.i, align 4
    347   %this1.i45 = load %"class.std::__1::basic_streambuf"*, %"class.std::__1::basic_streambuf"** %this.addr.i44
    348   %64 = bitcast %"class.std::__1::basic_streambuf"* %this1.i45 to i32 (%"class.std::__1::basic_streambuf"*, i8*, i32)***
    349   %vtable.i = load i32 (%"class.std::__1::basic_streambuf"*, i8*, i32)**, i32 (%"class.std::__1::basic_streambuf"*, i8*, i32)*** %64
    350   %vfn.i = getelementptr inbounds i32 (%"class.std::__1::basic_streambuf"*, i8*, i32)*, i32 (%"class.std::__1::basic_streambuf"*, i8*, i32)** %vtable.i, i64 12
    351   %65 = load i32 (%"class.std::__1::basic_streambuf"*, i8*, i32)*, i32 (%"class.std::__1::basic_streambuf"*, i8*, i32)** %vfn.i
    352   %66 = load i8*, i8** %__s.addr.i, align 4
    353   %67 = load i32, i32* %__n.addr.i, align 4
    354   %call.i = call i32 %65(%"class.std::__1::basic_streambuf"* %this1.i45, i8* %66, i32 %67)
    355   %68 = load i32, i32* %__np, align 4
    356   %cmp33 = icmp ne i32 %call.i, %68
    357   br i1 %cmp33, label %if.then34, label %if.end36
    358 
    359 if.then34:                                        ; preds = %if.then30
    360   %__sbuf_35 = getelementptr inbounds %"class.std::__1::ostreambuf_iterator", %"class.std::__1::ostreambuf_iterator"* %__s, i32 0, i32 0
    361   store %"class.std::__1::basic_streambuf"* null, %"class.std::__1::basic_streambuf"** %__sbuf_35, align 4
    362   %69 = bitcast %"class.std::__1::ostreambuf_iterator"* %retval to i8*
    363   %70 = bitcast %"class.std::__1::ostreambuf_iterator"* %__s to i8*
    364   call void @llvm.memcpy.p0i8.p0i8.i32(i8* %69, i8* %70, i32 4, i32 4, i1 false)
    365   br label %return
    366 
    367 if.end36:                                         ; preds = %if.then30
    368   br label %if.end37
    369 
    370 if.end37:                                         ; preds = %if.end36, %if.end25
    371   %71 = load %"class.std::__1::ios_base"*, %"class.std::__1::ios_base"** %__iob.addr, align 4
    372   store %"class.std::__1::ios_base"* %71, %"class.std::__1::ios_base"** %this.addr.i41, align 4
    373   store i32 0, i32* %__wide.addr.i, align 4
    374   %this1.i42 = load %"class.std::__1::ios_base"*, %"class.std::__1::ios_base"** %this.addr.i41
    375   %__width_.i43 = getelementptr inbounds %"class.std::__1::ios_base", %"class.std::__1::ios_base"* %this1.i42, i32 0, i32 3
    376   %72 = load i32, i32* %__width_.i43, align 4
    377   store i32 %72, i32* %__r.i, align 4
    378   %73 = load i32, i32* %__wide.addr.i, align 4
    379   %__width_2.i = getelementptr inbounds %"class.std::__1::ios_base", %"class.std::__1::ios_base"* %this1.i42, i32 0, i32 3
    380   store i32 %73, i32* %__width_2.i, align 4
    381   %74 = load i32, i32* %__r.i, align 4
    382   %75 = bitcast %"class.std::__1::ostreambuf_iterator"* %retval to i8*
    383   %76 = bitcast %"class.std::__1::ostreambuf_iterator"* %__s to i8*
    384   call void @llvm.memcpy.p0i8.p0i8.i32(i8* %75, i8* %76, i32 4, i32 4, i1 false)
    385   br label %return
    386 
    387 return:                                           ; preds = %if.end37, %if.then34, %cleanup, %if.then12, %if.then
    388   %coerce.dive39 = getelementptr %"class.std::__1::ostreambuf_iterator", %"class.std::__1::ostreambuf_iterator"* %retval, i32 0, i32 0
    389   %77 = load %"class.std::__1::basic_streambuf"*, %"class.std::__1::basic_streambuf"** %coerce.dive39
    390   %coerce.val.pi = ptrtoint %"class.std::__1::basic_streambuf"* %77 to i32
    391   ret i32 %coerce.val.pi
    392 
    393 eh.resume:                                        ; preds = %lpad
    394   %exn = load i8*, i8** %exn.slot
    395   %sel = load i32, i32* %ehselector.slot
    396   %lpad.val = insertvalue { i8*, i32 } undef, i8* %exn, 0
    397   %lpad.val40 = insertvalue { i8*, i32 } %lpad.val, i32 %sel, 1
    398   resume { i8*, i32 } %lpad.val40
    399 
    400 unreachable:                                      ; preds = %cleanup
    401   unreachable
    402 }
    403 
    404 declare void @_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEjc(%"class.std::__1::basic_string"*, i32, i8 zeroext) #2
    405 
    406 attributes #0 = { nounwind }
    407 attributes #1 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
    408 attributes #2 = { "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
    409 
    410 !llvm.ident = !{!0}
    411 
    412 !0 = !{!"Clang 3.1"}
    413