Home | History | Annotate | Download | only in PowerPC
      1 ; RUN: llc -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr8 -enable-shrink-wrap=true %s -o - | FileCheck %s --check-prefix=CHECK
      2 ;
      3 ; Test the use of a non-R0 register to save/restore the LR in function 
      4 ; prologue/epilogue.
      5 ; This problem can occur as a result of shrink wrapping, where the function
      6 ; prologue and epilogue are moved from the beginning/ending of the function. If
      7 ; register R0 is used before the prologue/epilogue blocks, then it cannot be
      8 ; used to save/restore the LR.
      9 ;
     10 ; TODO: Convert this to an MIR test once the infrastructure can support it.
     11 ;       To convert this to an MIR pass, generate MIR after register allocation
     12 ;       but before shrink wrapping and verify that has been used in the body of
     13 ;       the function. This can be done with something like: 
     14 ;         llc -stop-after stack-slot-coloring BreakableToken-reduced.ll > BreakableToken-reduced.mir
     15 ;
     16 ;       The resulting MIR file can then be used as input to llc, and only run
     17 ;       shrink wrapping and Prologue/Epilogue insertion on it. For example:
     18 ;         llc -start-after stack-slot-coloring -stop-after prologepilog BreakableToken-reduced.mir
     19 ;       
     20 ;       Verify in the resulting code that R0 is not used in the prologue/epilogue.
     21 ;
     22 ;       This currently cannot be done because the PrologEpilogInserter pass has
     23 ;       a dependency on the TargetPassConfig and StackProtector classes, which
     24 ;       are currently not serialized when generating the MIR.
     25 ;
     26 
     27 ; ModuleID = 'BreakableToken.cpp'
     28 target datalayout = "e-m:e-i64:64-n32:64"
     29 target triple = "powerpc64le-unknown-linux-gnu"
     30 
     31 %"class.clang::format::BreakableStringLiteral" = type { %"class.clang::format::BreakableSingleLineToken" }
     32 %"class.clang::format::BreakableSingleLineToken" = type { %"class.clang::format::BreakableToken", i32, %"class.llvm::StringRef", %"class.llvm::StringRef", %"class.llvm::StringRef" }
     33 %"class.clang::format::BreakableToken" = type { i32 (...)**, %"struct.clang::format::FormatToken"*, i32, i8, i32, %"struct.clang::format::FormatStyle"* }
     34 %"class.llvm::StringRef" = type { i8*, i64 }
     35 %"struct.clang::format::FormatToken" = type <{ %"class.clang::Token", i32, i8, [3 x i8], %"class.clang::SourceRange", i32, i32, i32, i8, i8, i8, i8, %"class.llvm::StringRef", i8, [3 x i8], i32, i32, i32, i8, i8, [2 x i8], i32, i32, i16, [2 x i8], %"class.std::unique_ptr", i32, i32, i32, i32, i32, i32, i32, i32, %"class.llvm::SmallVector", i32, i8, i8, [2 x i8], i32, i8, i8, [2 x i8], %"struct.clang::format::FormatToken"*, %"struct.clang::format::FormatToken"*, %"struct.clang::format::FormatToken"*, %"class.llvm::SmallVector.6", i32, i8, [3 x i8] }>
     36 %"class.clang::Token" = type <{ i32, i32, i8*, i16, i16, [4 x i8] }>
     37 %"class.clang::SourceRange" = type { %"class.clang::SourceLocation", %"class.clang::SourceLocation" }
     38 %"class.clang::SourceLocation" = type { i32 }
     39 %"class.std::unique_ptr" = type { %"class.std::tuple" }
     40 %"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
     41 %"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.2" }
     42 %"struct.std::_Head_base.2" = type { %"class.clang::format::TokenRole"* }
     43 %"class.clang::format::TokenRole" = type { i32 (...)**, %"struct.clang::format::FormatStyle"* }
     44 %"class.llvm::SmallVector" = type { %"class.llvm::SmallVectorImpl.base", %"struct.llvm::SmallVectorStorage" }
     45 %"class.llvm::SmallVectorImpl.base" = type { %"class.llvm::SmallVectorTemplateBase.base" }
     46 %"class.llvm::SmallVectorTemplateBase.base" = type { %"class.llvm::SmallVectorTemplateCommon.base" }
     47 %"class.llvm::SmallVectorTemplateCommon.base" = type <{ %"class.llvm::SmallVectorBase", %"struct.llvm::AlignedCharArrayUnion" }>
     48 %"class.llvm::SmallVectorBase" = type { i8*, i8*, i8* }
     49 %"struct.llvm::AlignedCharArrayUnion" = type { %"struct.llvm::AlignedCharArray" }
     50 %"struct.llvm::AlignedCharArray" = type { [4 x i8] }
     51 %"struct.llvm::SmallVectorStorage" = type { [3 x %"struct.llvm::AlignedCharArrayUnion"] }
     52 %"class.llvm::SmallVector.6" = type <{ %"class.llvm::SmallVectorImpl.7", %"struct.llvm::SmallVectorStorage.12", [7 x i8] }>
     53 %"class.llvm::SmallVectorImpl.7" = type { %"class.llvm::SmallVectorTemplateBase.8" }
     54 %"class.llvm::SmallVectorTemplateBase.8" = type { %"class.llvm::SmallVectorTemplateCommon.9" }
     55 %"class.llvm::SmallVectorTemplateCommon.9" = type { %"class.llvm::SmallVectorBase", %"struct.llvm::AlignedCharArrayUnion.10" }
     56 %"struct.llvm::AlignedCharArrayUnion.10" = type { %"struct.llvm::AlignedCharArray.11" }
     57 %"struct.llvm::AlignedCharArray.11" = type { [8 x i8] }
     58 %"struct.llvm::SmallVectorStorage.12" = type { i8 }
     59 %"struct.clang::format::FormatStyle" = type { i32, i8, i8, i8, i8, i8, i8, i8, i8, i32, i8, i8, i32, i8, i8, i8, i8, i32, i32, i8, i8, i32, %"class.std::basic_string", i8, i32, i32, i8, i8, i8, i8, %"class.std::vector", i8, i32, i8, i8, i32, %"class.std::basic_string", %"class.std::basic_string", i32, i32, i32, i8, i8, i32, i32, i32, i32, i32, i32, i32, i8, i8, i32, i8, i32, i8, i8, i8, i8, i8, i32, i32, i32 }
     60 %"class.std::vector" = type { %"struct.std::_Vector_base" }
     61 %"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::basic_string<char>, std::allocator<std::basic_string<char> > >::_Vector_impl" }
     62 %"struct.std::_Vector_base<std::basic_string<char>, std::allocator<std::basic_string<char> > >::_Vector_impl" = type { %"class.std::basic_string"*, %"class.std::basic_string"*, %"class.std::basic_string"* }
     63 %"class.std::basic_string" = type { %"struct.std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Alloc_hider" }
     64 %"struct.std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Alloc_hider" = type { i8* }
     65 %"struct.llvm::AlignedCharArray.52" = type { [16 x i8] }
     66 %"class.clang::format::WhitespaceManager" = type <{ %"class.llvm::SmallVector.13", %"class.clang::SourceManager"*, %"class.std::set", %"struct.clang::format::FormatStyle"*, i8, [7 x i8] }>
     67 %"class.llvm::SmallVector.13" = type { %"class.llvm::SmallVectorImpl.14", %"struct.llvm::SmallVectorStorage.19" }
     68 %"class.llvm::SmallVectorImpl.14" = type { %"class.llvm::SmallVectorTemplateBase.15" }
     69 %"class.llvm::SmallVectorTemplateBase.15" = type { %"class.llvm::SmallVectorTemplateCommon.16" }
     70 %"class.llvm::SmallVectorTemplateCommon.16" = type { %"class.llvm::SmallVectorBase", %"struct.llvm::AlignedCharArrayUnion.17" }
     71 %"struct.llvm::AlignedCharArrayUnion.17" = type { %"struct.llvm::AlignedCharArray.18" }
     72 %"struct.llvm::AlignedCharArray.18" = type { [88 x i8] }
     73 %"struct.llvm::SmallVectorStorage.19" = type { [15 x %"struct.llvm::AlignedCharArrayUnion.17"] }
     74 %"class.clang::SourceManager" = type { %"class.llvm::RefCountedBase", %"class.clang::DiagnosticsEngine"*, %"class.clang::FileManager"*, %"class.llvm::BumpPtrAllocatorImpl", %"class.llvm::DenseMap.65", i8, i8, %"class.std::unique_ptr.78", %"class.std::vector.94", %"class.llvm::SmallVector.99", %"class.llvm::SmallVector.99", i32, i32, %"class.std::vector.107", %"class.clang::ExternalSLocEntrySource"*, %"class.clang::FileID", %"class.clang::LineTableInfo"*, %"class.clang::FileID", %"class.clang::SrcMgr::ContentCache"*, i32, i32, %"class.clang::FileID", %"class.clang::FileID", i32, i32, %"class.llvm::DenseMap.111", %"class.llvm::DenseMap.115", %"class.clang::InBeforeInTUCacheEntry", %"class.std::unique_ptr.119", %"class.std::unique_ptr.127", %"class.llvm::DenseMap.135", %"class.llvm::SmallVector.139" }
     75 %"class.llvm::RefCountedBase" = type { i32 }
     76 %"class.clang::DiagnosticsEngine" = type opaque
     77 %"class.clang::FileManager" = type { %"class.llvm::RefCountedBase.20", %"class.llvm::IntrusiveRefCntPtr", %"class.clang::FileSystemOptions", %"class.std::map", %"class.std::map.24", %"class.llvm::SmallVector.29", %"class.llvm::SmallVector.35", %"class.llvm::StringMap", %"class.llvm::StringMap.56", %"class.llvm::DenseMap", %"class.llvm::BumpPtrAllocatorImpl", i32, i32, i32, i32, i32, %"class.std::unique_ptr.57" }
     78 %"class.llvm::RefCountedBase.20" = type { i32 }
     79 %"class.llvm::IntrusiveRefCntPtr" = type { %"class.clang::vfs::FileSystem"* }
     80 %"class.clang::vfs::FileSystem" = type <{ i32 (...)**, %"class.llvm::ThreadSafeRefCountedBase", [4 x i8] }>
     81 %"class.llvm::ThreadSafeRefCountedBase" = type { %"struct.std::atomic" }
     82 %"struct.std::atomic" = type { %"struct.std::__atomic_base" }
     83 %"struct.std::__atomic_base" = type { i32 }
     84 %"class.clang::FileSystemOptions" = type { %"class.std::basic_string" }
     85 %"class.std::map" = type { %"class.std::_Rb_tree" }
     86 %"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<llvm::sys::fs::UniqueID, std::pair<const llvm::sys::fs::UniqueID, clang::DirectoryEntry>, std::_Select1st<std::pair<const llvm::sys::fs::UniqueID, clang::DirectoryEntry> >, std::less<llvm::sys::fs::UniqueID>, std::allocator<std::pair<const llvm::sys::fs::UniqueID, clang::DirectoryEntry> > >::_Rb_tree_impl" }
     87 %"struct.std::_Rb_tree<llvm::sys::fs::UniqueID, std::pair<const llvm::sys::fs::UniqueID, clang::DirectoryEntry>, std::_Select1st<std::pair<const llvm::sys::fs::UniqueID, clang::DirectoryEntry> >, std::less<llvm::sys::fs::UniqueID>, std::allocator<std::pair<const llvm::sys::fs::UniqueID, clang::DirectoryEntry> > >::_Rb_tree_impl" = type { %"struct.std::less", %"struct.std::_Rb_tree_node_base", i64 }
     88 %"struct.std::less" = type { i8 }
     89 %"struct.std::_Rb_tree_node_base" = type { i32, %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }
     90 %"class.std::map.24" = type { %"class.std::_Rb_tree.25" }
     91 %"class.std::_Rb_tree.25" = type { %"struct.std::_Rb_tree<llvm::sys::fs::UniqueID, std::pair<const llvm::sys::fs::UniqueID, clang::FileEntry>, std::_Select1st<std::pair<const llvm::sys::fs::UniqueID, clang::FileEntry> >, std::less<llvm::sys::fs::UniqueID>, std::allocator<std::pair<const llvm::sys::fs::UniqueID, clang::FileEntry> > >::_Rb_tree_impl" }
     92 %"struct.std::_Rb_tree<llvm::sys::fs::UniqueID, std::pair<const llvm::sys::fs::UniqueID, clang::FileEntry>, std::_Select1st<std::pair<const llvm::sys::fs::UniqueID, clang::FileEntry> >, std::less<llvm::sys::fs::UniqueID>, std::allocator<std::pair<const llvm::sys::fs::UniqueID, clang::FileEntry> > >::_Rb_tree_impl" = type { %"struct.std::less", %"struct.std::_Rb_tree_node_base", i64 }
     93 %"class.llvm::SmallVector.29" = type { %"class.llvm::SmallVectorImpl.30", %"struct.llvm::SmallVectorStorage.34" }
     94 %"class.llvm::SmallVectorImpl.30" = type { %"class.llvm::SmallVectorTemplateBase.31" }
     95 %"class.llvm::SmallVectorTemplateBase.31" = type { %"class.llvm::SmallVectorTemplateCommon.32" }
     96 %"class.llvm::SmallVectorTemplateCommon.32" = type { %"class.llvm::SmallVectorBase", %"struct.llvm::AlignedCharArrayUnion.33" }
     97 %"struct.llvm::AlignedCharArrayUnion.33" = type { %"struct.llvm::AlignedCharArray.11" }
     98 %"struct.llvm::SmallVectorStorage.34" = type { [3 x %"struct.llvm::AlignedCharArrayUnion.33"] }
     99 %"class.llvm::SmallVector.35" = type { %"class.llvm::SmallVectorImpl.36", %"struct.llvm::SmallVectorStorage.40" }
    100 %"class.llvm::SmallVectorImpl.36" = type { %"class.llvm::SmallVectorTemplateBase.37" }
    101 %"class.llvm::SmallVectorTemplateBase.37" = type { %"class.llvm::SmallVectorTemplateCommon.38" }
    102 %"class.llvm::SmallVectorTemplateCommon.38" = type { %"class.llvm::SmallVectorBase", %"struct.llvm::AlignedCharArrayUnion.39" }
    103 %"struct.llvm::AlignedCharArrayUnion.39" = type { %"struct.llvm::AlignedCharArray.11" }
    104 %"struct.llvm::SmallVectorStorage.40" = type { [3 x %"struct.llvm::AlignedCharArrayUnion.39"] }
    105 %"class.llvm::StringMap" = type { %"class.llvm::StringMapImpl", %"class.llvm::BumpPtrAllocatorImpl" }
    106 %"class.llvm::StringMapImpl" = type { %"class.llvm::StringMapEntryBase"**, i32, i32, i32, i32 }
    107 %"class.llvm::StringMapEntryBase" = type { i32 }
    108 %"class.llvm::StringMap.56" = type { %"class.llvm::StringMapImpl", %"class.llvm::BumpPtrAllocatorImpl" }
    109 %"class.llvm::DenseMap" = type <{ %"struct.llvm::detail::DenseMapPair"*, i32, i32, i32, [4 x i8] }>
    110 %"struct.llvm::detail::DenseMapPair" = type opaque
    111 %"class.std::unique_ptr.57" = type { %"class.std::tuple.58" }
    112 %"class.std::tuple.58" = type { %"struct.std::_Tuple_impl.59" }
    113 %"struct.std::_Tuple_impl.59" = type { %"struct.std::_Head_base.64" }
    114 %"struct.std::_Head_base.64" = type { %"class.clang::FileSystemStatCache"* }
    115 %"class.clang::FileSystemStatCache" = type opaque
    116 %"class.llvm::BumpPtrAllocatorImpl" = type <{ i8*, i8*, %"class.llvm::SmallVector.41", %"class.llvm::SmallVector.47", i64, %"class.llvm::MallocAllocator", [7 x i8] }>
    117 %"class.llvm::SmallVector.41" = type { %"class.llvm::SmallVectorImpl.42", %"struct.llvm::SmallVectorStorage.46" }
    118 %"class.llvm::SmallVectorImpl.42" = type { %"class.llvm::SmallVectorTemplateBase.43" }
    119 %"class.llvm::SmallVectorTemplateBase.43" = type { %"class.llvm::SmallVectorTemplateCommon.44" }
    120 %"class.llvm::SmallVectorTemplateCommon.44" = type { %"class.llvm::SmallVectorBase", %"struct.llvm::AlignedCharArrayUnion.45" }
    121 %"struct.llvm::AlignedCharArrayUnion.45" = type { %"struct.llvm::AlignedCharArray.11" }
    122 %"struct.llvm::SmallVectorStorage.46" = type { [3 x %"struct.llvm::AlignedCharArrayUnion.45"] }
    123 %"class.llvm::SmallVector.47" = type <{ %"class.llvm::SmallVectorImpl.48", %"struct.llvm::SmallVectorStorage.53", [7 x i8] }>
    124 %"class.llvm::SmallVectorImpl.48" = type { %"class.llvm::SmallVectorTemplateBase.49" }
    125 %"class.llvm::SmallVectorTemplateBase.49" = type { %"class.llvm::SmallVectorTemplateCommon.50" }
    126 %"class.llvm::SmallVectorTemplateCommon.50" = type { %"class.llvm::SmallVectorBase", %"struct.llvm::AlignedCharArrayUnion.51" }
    127 %"struct.llvm::AlignedCharArrayUnion.51" = type { %"struct.llvm::AlignedCharArray.52" }
    128 %"struct.llvm::SmallVectorStorage.53" = type { i8 }
    129 %"class.llvm::MallocAllocator" = type { i8 }
    130 %"class.llvm::DenseMap.65" = type <{ %"struct.llvm::detail::DenseMapPair.67"*, i32, i32, i32, [4 x i8] }>
    131 %"struct.llvm::detail::DenseMapPair.67" = type { %"struct.std::pair.68" }
    132 %"struct.std::pair.68" = type { %"class.clang::FileEntry"*, %"class.clang::SrcMgr::ContentCache"* }
    133 %"class.clang::FileEntry" = type { i8*, i64, i64, %"class.clang::DirectoryEntry"*, i32, %"class.llvm::sys::fs::UniqueID", i8, i8, i8, %"class.std::unique_ptr.69" }
    134 %"class.clang::DirectoryEntry" = type { i8* }
    135 %"class.llvm::sys::fs::UniqueID" = type { i64, i64 }
    136 %"class.std::unique_ptr.69" = type { %"class.std::tuple.70" }
    137 %"class.std::tuple.70" = type { %"struct.std::_Tuple_impl.71" }
    138 %"struct.std::_Tuple_impl.71" = type { %"struct.std::_Head_base.76" }
    139 %"struct.std::_Head_base.76" = type { %"class.clang::vfs::File"* }
    140 %"class.clang::vfs::File" = type { i32 (...)** }
    141 %"class.std::unique_ptr.78" = type { %"class.std::tuple.79" }
    142 %"class.std::tuple.79" = type { %"struct.std::_Tuple_impl.80" }
    143 %"struct.std::_Tuple_impl.80" = type { %"struct.std::_Head_base.85" }
    144 %"struct.std::_Head_base.85" = type { %"struct.clang::SourceManager::OverriddenFilesInfoTy"* }
    145 %"struct.clang::SourceManager::OverriddenFilesInfoTy" = type { %"class.llvm::DenseMap.86", %"class.llvm::DenseSet" }
    146 %"class.llvm::DenseMap.86" = type <{ %"struct.llvm::detail::DenseMapPair.88"*, i32, i32, i32, [4 x i8] }>
    147 %"struct.llvm::detail::DenseMapPair.88" = type { %"struct.std::pair.89" }
    148 %"struct.std::pair.89" = type { %"class.clang::FileEntry"*, %"class.clang::FileEntry"* }
    149 %"class.llvm::DenseSet" = type { %"class.llvm::DenseMap.91" }
    150 %"class.llvm::DenseMap.91" = type <{ %"class.llvm::detail::DenseSetPair"*, i32, i32, i32, [4 x i8] }>
    151 %"class.llvm::detail::DenseSetPair" = type { %"class.clang::FileEntry"* }
    152 %"class.std::vector.94" = type { %"struct.std::_Vector_base.95" }
    153 %"struct.std::_Vector_base.95" = type { %"struct.std::_Vector_base<clang::SrcMgr::ContentCache *, std::allocator<clang::SrcMgr::ContentCache *> >::_Vector_impl" }
    154 %"struct.std::_Vector_base<clang::SrcMgr::ContentCache *, std::allocator<clang::SrcMgr::ContentCache *> >::_Vector_impl" = type { %"class.clang::SrcMgr::ContentCache"**, %"class.clang::SrcMgr::ContentCache"**, %"class.clang::SrcMgr::ContentCache"** }
    155 %"class.llvm::SmallVector.99" = type <{ %"class.llvm::SmallVectorImpl.100", %"struct.llvm::SmallVectorStorage.105", [7 x i8] }>
    156 %"class.llvm::SmallVectorImpl.100" = type { %"class.llvm::SmallVectorTemplateBase.101" }
    157 %"class.llvm::SmallVectorTemplateBase.101" = type { %"class.llvm::SmallVectorTemplateCommon.102" }
    158 %"class.llvm::SmallVectorTemplateCommon.102" = type { %"class.llvm::SmallVectorBase", %"struct.llvm::AlignedCharArrayUnion.103" }
    159 %"struct.llvm::AlignedCharArrayUnion.103" = type { %"struct.llvm::AlignedCharArray.104" }
    160 %"struct.llvm::AlignedCharArray.104" = type { [24 x i8] }
    161 %"struct.llvm::SmallVectorStorage.105" = type { i8 }
    162 %"class.std::vector.107" = type { %"struct.std::_Bvector_base" }
    163 %"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool> >::_Bvector_impl" }
    164 %"struct.std::_Bvector_base<std::allocator<bool> >::_Bvector_impl" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", i64* }
    165 %"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
    166 %"struct.std::_Bit_iterator_base.base" = type <{ i64*, i32 }>
    167 %"class.clang::ExternalSLocEntrySource" = type { i32 (...)** }
    168 %"class.clang::LineTableInfo" = type opaque
    169 %"class.clang::SrcMgr::ContentCache" = type <{ %"class.llvm::PointerIntPair", %"class.clang::FileEntry"*, %"class.clang::FileEntry"*, i32*, [5 x i8], [3 x i8] }>
    170 %"class.llvm::PointerIntPair" = type { i64 }
    171 %"class.clang::FileID" = type { i32 }
    172 %"class.llvm::DenseMap.111" = type <{ %"struct.llvm::detail::DenseMapPair.113"*, i32, i32, i32, [4 x i8] }>
    173 %"struct.llvm::detail::DenseMapPair.113" = type opaque
    174 %"class.llvm::DenseMap.115" = type <{ %"struct.llvm::detail::DenseMapPair.117"*, i32, i32, i32, [4 x i8] }>
    175 %"struct.llvm::detail::DenseMapPair.117" = type opaque
    176 %"class.clang::InBeforeInTUCacheEntry" = type { %"class.clang::FileID", %"class.clang::FileID", i8, %"class.clang::FileID", i32, i32 }
    177 %"class.std::unique_ptr.119" = type { %"class.std::tuple.120" }
    178 %"class.std::tuple.120" = type { %"struct.std::_Tuple_impl.121" }
    179 %"struct.std::_Tuple_impl.121" = type { %"struct.std::_Head_base.126" }
    180 %"struct.std::_Head_base.126" = type { %"class.llvm::MemoryBuffer"* }
    181 %"class.llvm::MemoryBuffer" = type { i32 (...)**, i8*, i8* }
    182 %"class.std::unique_ptr.127" = type { %"class.std::tuple.128" }
    183 %"class.std::tuple.128" = type { %"struct.std::_Tuple_impl.129" }
    184 %"struct.std::_Tuple_impl.129" = type { %"struct.std::_Head_base.134" }
    185 %"struct.std::_Head_base.134" = type { %"class.clang::SrcMgr::ContentCache"* }
    186 %"class.llvm::DenseMap.135" = type <{ %"struct.llvm::detail::DenseMapPair.137"*, i32, i32, i32, [4 x i8] }>
    187 %"struct.llvm::detail::DenseMapPair.137" = type opaque
    188 %"class.llvm::SmallVector.139" = type { %"class.llvm::SmallVectorImpl.140", %"struct.llvm::SmallVectorStorage.144" }
    189 %"class.llvm::SmallVectorImpl.140" = type { %"class.llvm::SmallVectorTemplateBase.141" }
    190 %"class.llvm::SmallVectorTemplateBase.141" = type { %"class.llvm::SmallVectorTemplateCommon.142" }
    191 %"class.llvm::SmallVectorTemplateCommon.142" = type { %"class.llvm::SmallVectorBase", %"struct.llvm::AlignedCharArrayUnion.143" }
    192 %"struct.llvm::AlignedCharArrayUnion.143" = type { %"struct.llvm::AlignedCharArray.104" }
    193 %"struct.llvm::SmallVectorStorage.144" = type { [1 x %"struct.llvm::AlignedCharArrayUnion.143"] }
    194 %"class.std::set" = type { %"class.std::_Rb_tree.145" }
    195 %"class.std::_Rb_tree.145" = type { %"struct.std::_Rb_tree<clang::tooling::Replacement, clang::tooling::Replacement, std::_Identity<clang::tooling::Replacement>, std::less<clang::tooling::Replacement>, std::allocator<clang::tooling::Replacement> >::_Rb_tree_impl" }
    196 %"struct.std::_Rb_tree<clang::tooling::Replacement, clang::tooling::Replacement, std::_Identity<clang::tooling::Replacement>, std::less<clang::tooling::Replacement>, std::allocator<clang::tooling::Replacement> >::_Rb_tree_impl" = type { %"struct.std::less.149", %"struct.std::_Rb_tree_node_base", i64 }
    197 %"struct.std::less.149" = type { i8 }
    198 
    199 
    200 ; Function Attrs: nounwind
    201 ; CHECK-LABEL: @_ZN5clang6format22BreakableStringLiteral11insertBreakEjjSt4pairImjERNS0_17WhitespaceManagerE
    202 
    203 ; Load a value into R0 before saving the LR
    204 ; CHECK: lwz 0, {{[0-9]+([0-9]+)}}
    205 
    206 ; Ensure the LR is saved using a different register
    207 ; CHECK: mflr {{[1-9]+}}
    208 
    209 ; Ensure the LR is restored using a different register
    210 ; CHECK: mtlr {{[0-9]+}}
    211 ; CHECK: blr
    212 define void @_ZN5clang6format22BreakableStringLiteral11insertBreakEjjSt4pairImjERNS0_17WhitespaceManagerE(%"class.clang::format::BreakableStringLiteral"* nocapture readonly %this, i32 zeroext %LineIndex, i32 zeroext %TailOffset, [2 x i64] %Split.coerce, %"class.clang::format::WhitespaceManager"* dereferenceable(1504) %Whitespaces) unnamed_addr #1 align 2 {
    213 entry:
    214   %Split.coerce.fca.0.extract = extractvalue [2 x i64] %Split.coerce, 0
    215   %Split.coerce.fca.1.extract = extractvalue [2 x i64] %Split.coerce, 1
    216   %StartColumn = getelementptr inbounds %"class.clang::format::BreakableStringLiteral", %"class.clang::format::BreakableStringLiteral"* %this, i64 0, i32 0, i32 1
    217   %0 = load i32, i32* %StartColumn, align 8, !tbaa !2
    218   %Prefix = getelementptr inbounds %"class.clang::format::BreakableStringLiteral", %"class.clang::format::BreakableStringLiteral"* %this, i64 0, i32 0, i32 2
    219   %Length.i.19 = getelementptr inbounds %"class.clang::format::BreakableStringLiteral", %"class.clang::format::BreakableStringLiteral"* %this, i64 0, i32 0, i32 2, i32 1
    220   %1 = load i64, i64* %Length.i.19, align 8, !tbaa !10
    221   %cmp.i = icmp eq i64 %1, 0
    222   br i1 %cmp.i, label %entry._ZNK4llvm9StringRef10startswithES0_.exit_crit_edge, label %if.end.i.i
    223 
    224 entry._ZNK4llvm9StringRef10startswithES0_.exit_crit_edge: ; preds = %entry
    225   %agg.tmp7.sroa.0.0..sroa_cast.phi.trans.insert = bitcast %"class.llvm::StringRef"* %Prefix to i64*
    226   %agg.tmp7.sroa.0.0.copyload.pre = load i64, i64* %agg.tmp7.sroa.0.0..sroa_cast.phi.trans.insert, align 8
    227   br label %_ZNK4llvm9StringRef10startswithES0_.exit
    228 
    229 if.end.i.i:                                       ; preds = %entry
    230   %Data.i.20 = getelementptr inbounds %"class.llvm::StringRef", %"class.llvm::StringRef"* %Prefix, i64 0, i32 0
    231   %2 = load i8*, i8** %Data.i.20, align 8, !tbaa !12
    232   %lhsc = load i8, i8* %2, align 1
    233   %phitmp.i = icmp eq i8 %lhsc, 64
    234   %3 = ptrtoint i8* %2 to i64
    235   br label %_ZNK4llvm9StringRef10startswithES0_.exit
    236 
    237 _ZNK4llvm9StringRef10startswithES0_.exit:         ; preds = %entry._ZNK4llvm9StringRef10startswithES0_.exit_crit_edge, %if.end.i.i
    238   %agg.tmp7.sroa.0.0.copyload = phi i64 [ %agg.tmp7.sroa.0.0.copyload.pre, %entry._ZNK4llvm9StringRef10startswithES0_.exit_crit_edge ], [ %3, %if.end.i.i ]
    239   %4 = phi i1 [ false, %entry._ZNK4llvm9StringRef10startswithES0_.exit_crit_edge ], [ %phitmp.i, %if.end.i.i ]
    240   %dec = sext i1 %4 to i32
    241   %dec. = add i32 %dec, %0
    242   %Tok = getelementptr inbounds %"class.clang::format::BreakableStringLiteral", %"class.clang::format::BreakableStringLiteral"* %this, i64 0, i32 0, i32 0, i32 1
    243   %ref = load %"struct.clang::format::FormatToken"*, %"struct.clang::format::FormatToken"** %Tok, align 8, !tbaa !13
    244   %conv = zext i32 %TailOffset to i64
    245   %add = add i64 %Split.coerce.fca.0.extract, %conv
    246   %add4 = add i64 %add, %1
    247   %conv5 = trunc i64 %add4 to i32
    248   %Split.sroa.2.8.extract.trunc = trunc i64 %Split.coerce.fca.1.extract to i32
    249   %agg.tmp6.sroa.0.0..sroa_idx13 = getelementptr inbounds %"class.clang::format::BreakableStringLiteral", %"class.clang::format::BreakableStringLiteral"* %this, i64 0, i32 0, i32 3
    250   %agg.tmp6.sroa.0.0..sroa_cast = bitcast %"class.llvm::StringRef"* %agg.tmp6.sroa.0.0..sroa_idx13 to i64*
    251   %agg.tmp6.sroa.0.0.copyload = load i64, i64* %agg.tmp6.sroa.0.0..sroa_cast, align 8
    252   %agg.tmp6.sroa.2.0..sroa_idx14 = getelementptr inbounds %"class.clang::format::BreakableStringLiteral", %"class.clang::format::BreakableStringLiteral"* %this, i64 0, i32 0, i32 3, i32 1
    253   %agg.tmp6.sroa.2.0.copyload = load i64, i64* %agg.tmp6.sroa.2.0..sroa_idx14, align 8
    254   %InPPDirective = getelementptr inbounds %"class.clang::format::BreakableStringLiteral", %"class.clang::format::BreakableStringLiteral"* %this, i64 0, i32 0, i32 0, i32 3
    255   %5 = load i8, i8* %InPPDirective, align 4, !tbaa !34, !range !39
    256   %tobool = icmp ne i8 %5, 0
    257   %IndentLevel = getelementptr inbounds %"class.clang::format::BreakableStringLiteral", %"class.clang::format::BreakableStringLiteral"* %this, i64 0, i32 0, i32 0, i32 2
    258   %6 = load i32, i32* %IndentLevel, align 8, !tbaa !33
    259   %.fca.0.insert11 = insertvalue [2 x i64] undef, i64 %agg.tmp6.sroa.0.0.copyload, 0
    260   %.fca.1.insert12 = insertvalue [2 x i64] %.fca.0.insert11, i64 %agg.tmp6.sroa.2.0.copyload, 1
    261   %.fca.0.insert = insertvalue [2 x i64] undef, i64 %agg.tmp7.sroa.0.0.copyload, 0
    262   %.fca.1.insert = insertvalue [2 x i64] %.fca.0.insert, i64 %1, 1
    263   tail call void @_ZN5clang6format17WhitespaceManager24replaceWhitespaceInTokenERKNS0_11FormatTokenEjjN4llvm9StringRefES6_bjji(%"class.clang::format::WhitespaceManager"* nonnull %Whitespaces, %"struct.clang::format::FormatToken"* dereferenceable(272) %ref, i32 zeroext %conv5, i32 zeroext %Split.sroa.2.8.extract.trunc, [2 x i64] %.fca.1.insert12, [2 x i64] %.fca.1.insert, i1 zeroext %tobool, i32 zeroext 1, i32 zeroext %6, i32 signext %dec.) #9
    264   ret void
    265 }
    266 
    267 ; Function Attrs: nounwind argmemonly
    268 declare void @llvm.lifetime.start(i64, i8* nocapture) #2
    269 
    270 declare void @_ZN5clang6format17WhitespaceManager24replaceWhitespaceInTokenERKNS0_11FormatTokenEjjN4llvm9StringRefES6_bjji(%"class.clang::format::WhitespaceManager"*, %"struct.clang::format::FormatToken"* dereferenceable(272), i32 zeroext, i32 zeroext, [2 x i64], [2 x i64], i1 zeroext, i32 zeroext, i32 zeroext, i32 signext) #3
    271 
    272 ; Function Attrs: nounwind argmemonly
    273 declare void @llvm.lifetime.end(i64, i8* nocapture) #2
    274 
    275 attributes #9 = { nounwind }
    276 
    277 !llvm.module.flags = !{!0}
    278 !llvm.ident = !{!1}
    279 
    280 !0 = !{i32 1, !"PIC Level", i32 2}
    281 !1 = !{!"clang version 3.8.0 (trunk 248714) (llvm/trunk 248719)"}
    282 !2 = !{!3, !4, i64 40}
    283 !3 = !{!"_ZTSN5clang6format24BreakableSingleLineTokenE", !4, i64 40, !7, i64 48, !7, i64 64, !7, i64 80}
    284 !4 = !{!"int", !5, i64 0}
    285 !5 = !{!"omnipotent char", !6, i64 0}
    286 !6 = !{!"Simple C/C++ TBAA"}
    287 !7 = !{!"_ZTSN4llvm9StringRefE", !8, i64 0, !9, i64 8}
    288 !8 = !{!"any pointer", !5, i64 0}
    289 !9 = !{!"long", !5, i64 0}
    290 !10 = !{!7, !9, i64 8}
    291 !11 = !{!9, !9, i64 0}
    292 !12 = !{!7, !8, i64 0}
    293 !13 = !{!5, !5, i64 0}
    294 !14 = !{!15, !4, i64 200}
    295 !15 = !{!"_ZTSN5clang6format11FormatStyleE", !4, i64 0, !16, i64 4, !16, i64 5, !16, i64 6, !16, i64 7, !16, i64 8, !16, i64 9, !16, i64 10, !16, i64 11, !17, i64 12, !16, i64 16, !16, i64 17, !18, i64 20, !16, i64 24, !16, i64 25, !16, i64 26, !16, i64 27, !19, i64 28, !20, i64 32, !16, i64 36, !16, i64 37, !4, i64 40, !21, i64 48, !16, i64 56, !4, i64 60, !4, i64 64, !16, i64 68, !16, i64 69, !16, i64 70, !16, i64 71, !23, i64 72, !16, i64 96, !4, i64 100, !16, i64 104, !16, i64 105, !24, i64 108, !21, i64 112, !21, i64 120, !4, i64 128, !25, i64 132, !4, i64 136, !16, i64 140, !16, i64 141, !4, i64 144, !4, i64 148, !4, i64 152, !4, i64 156, !4, i64 160, !4, i64 164, !26, i64 168, !16, i64 172, !16, i64 173, !27, i64 176, !16, i64 180, !4, i64 184, !16, i64 188, !16, i64 189, !16, i64 190, !16, i64 191, !16, i64 192, !28, i64 196, !4, i64 200, !29, i64 204}
    296 !16 = !{!"bool", !5, i64 0}
    297 !17 = !{!"_ZTSN5clang6format11FormatStyle18ShortFunctionStyleE", !5, i64 0}
    298 !18 = !{!"_ZTSN5clang6format11FormatStyle33DefinitionReturnTypeBreakingStyleE", !5, i64 0}
    299 !19 = !{!"_ZTSN5clang6format11FormatStyle19BinaryOperatorStyleE", !5, i64 0}
    300 !20 = !{!"_ZTSN5clang6format11FormatStyle18BraceBreakingStyleE", !5, i64 0}
    301 !21 = !{!"_ZTSSs", !22, i64 0}
    302 !22 = !{!"_ZTSNSs12_Alloc_hiderE", !8, i64 0}
    303 !23 = !{!"_ZTSSt6vectorISsSaISsEE"}
    304 !24 = !{!"_ZTSN5clang6format11FormatStyle12LanguageKindE", !5, i64 0}
    305 !25 = !{!"_ZTSN5clang6format11FormatStyle24NamespaceIndentationKindE", !5, i64 0}
    306 !26 = !{!"_ZTSN5clang6format11FormatStyle21PointerAlignmentStyleE", !5, i64 0}
    307 !27 = !{!"_ZTSN5clang6format11FormatStyle24SpaceBeforeParensOptionsE", !5, i64 0}
    308 !28 = !{!"_ZTSN5clang6format11FormatStyle16LanguageStandardE", !5, i64 0}
    309 !29 = !{!"_ZTSN5clang6format11FormatStyle11UseTabStyleE", !5, i64 0}
    310 !30 = !{!31, !32, i64 24}
    311 !31 = !{!"_ZTSN5clang6format14BreakableTokenE", !5, i64 8, !4, i64 16, !16, i64 20, !32, i64 24, !5, i64 32}
    312 !32 = !{!"_ZTSN5clang6format8encoding8EncodingE", !5, i64 0}
    313 !33 = !{!31, !4, i64 16}
    314 !34 = !{!31, !16, i64 20}
    315 !35 = !{!36, !36, i64 0}
    316 !36 = !{!"vtable pointer", !6, i64 0}
    317 !37 = !{!38, !38, i64 0}
    318 !38 = !{!"short", !5, i64 0}
    319 !39 = !{i8 0, i8 2}
    320 !40 = !{i64 0, i64 8, !41, i64 8, i64 8, !11}
    321 !41 = !{!8, !8, i64 0}
    322 !42 = !{!43, !8, i64 16}
    323 !43 = !{!"_ZTSN4llvm15SmallVectorBaseE", !8, i64 0, !8, i64 8, !8, i64 16}
    324 !44 = !{!43, !8, i64 8}
    325 !45 = !{!43, !8, i64 0}
    326 !46 = !{!4, !4, i64 0}
    327 !47 = !{!48, !16, i64 500}
    328 !48 = !{!"_ZTSN5clang6format21BreakableBlockCommentE", !49, i64 40, !51, i64 320, !53, i64 408, !4, i64 496, !16, i64 500, !7, i64 504}
    329 !49 = !{!"_ZTSN4llvm11SmallVectorINS_9StringRefELj16EEE", !50, i64 40}
    330 !50 = !{!"_ZTSN4llvm18SmallVectorStorageINS_9StringRefELj16EEE", !5, i64 0}
    331 !51 = !{!"_ZTSN4llvm11SmallVectorIjLj16EEE", !52, i64 28}
    332 !52 = !{!"_ZTSN4llvm18SmallVectorStorageIjLj16EEE", !5, i64 0}
    333 !53 = !{!"_ZTSN4llvm11SmallVectorIiLj16EEE", !54, i64 28}
    334 !54 = !{!"_ZTSN4llvm18SmallVectorStorageIiLj16EEE", !5, i64 0}
    335 !55 = !{!48, !4, i64 496}
    336