1 ; RUN: llc -mcpu=pwr7 -O3 < %s | FileCheck %s 2 3 ; Test case derived from bug report 15031. The code in the post-RA 4 ; scheduler to break critical anti-dependencies was failing to check 5 ; whether an instruction had more than one definition, and ensuring 6 ; that any additional definitions interfered with the choice of a new 7 ; register. As a result, this test originally caused this to be 8 ; generated: 9 ; 10 ; lbzu 3, 1(3) 11 ; 12 ; which is illegal, since it requires register 3 to both receive the 13 ; loaded value and receive the updated address. With the fix to bug 14 ; 15031, a different register is chosen to receive the loaded value. 15 16 target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f128:128:128-v128:128:128-n32:64" 17 target triple = "powerpc64-unknown-linux-gnu" 18 19 %"class.llvm::MachineMemOperand" = type { %"struct.llvm::MachinePointerInfo", i64, i32, %"class.llvm::MDNode"*, %"class.llvm::MDNode"* } 20 %"struct.llvm::MachinePointerInfo" = type { %"class.llvm::Value"*, i64 } 21 %"class.llvm::Value" = type { i32 (...)**, i8, i8, i16, %"class.llvm::Type"*, %"class.llvm::Use"*, %"class.llvm::StringMapEntry"* } 22 %"class.llvm::Type" = type { %"class.llvm::LLVMContext"*, i32, i32, %"class.llvm::Type"** } 23 %"class.llvm::LLVMContext" = type { %"class.llvm::LLVMContextImpl"* } 24 %"class.llvm::LLVMContextImpl" = type opaque 25 %"class.llvm::Use" = type { %"class.llvm::Value"*, %"class.llvm::Use"*, %"class.llvm::PointerIntPair" } 26 %"class.llvm::PointerIntPair" = type { i64 } 27 %"class.llvm::StringMapEntry" = type opaque 28 %"class.llvm::MDNode" = type { %"class.llvm::Value", %"class.llvm::FoldingSetImpl::Node", i32, i32 } 29 %"class.llvm::FoldingSetImpl::Node" = type { i8* } 30 %"class.llvm::MachineInstr" = type { %"class.llvm::ilist_node", %"class.llvm::MCInstrDesc"*, %"class.llvm::MachineBasicBlock"*, %"class.llvm::MachineOperand"*, i32, %"class.llvm::ArrayRecycler<llvm::MachineOperand, 8>::Capacity", i8, i8, i8, %"class.llvm::MachineMemOperand"**, %"class.llvm::DebugLoc" } 31 %"class.llvm::ilist_node" = type { %"class.llvm::ilist_half_node", %"class.llvm::MachineInstr"* } 32 %"class.llvm::ilist_half_node" = type { %"class.llvm::MachineInstr"* } 33 %"class.llvm::MCInstrDesc" = type { i16, i16, i16, i16, i16, i32, i64, i16*, i16*, %"class.llvm::MCOperandInfo"* } 34 %"class.llvm::MCOperandInfo" = type { i16, i8, i8, i32 } 35 %"class.llvm::MachineBasicBlock" = type { %"class.llvm::ilist_node.0", %"struct.llvm::ilist", %"class.llvm::BasicBlock"*, i32, %"class.llvm::MachineFunction"*, %"class.std::vector.163", %"class.std::vector.163", %"class.std::vector.123", %"class.std::vector.123", i32, i8, i8 } 36 %"class.llvm::ilist_node.0" = type { %"class.llvm::ilist_half_node.1", %"class.llvm::MachineBasicBlock"* } 37 %"class.llvm::ilist_half_node.1" = type { %"class.llvm::MachineBasicBlock"* } 38 %"struct.llvm::ilist" = type { %"class.llvm::iplist" } 39 %"class.llvm::iplist" = type { %"struct.llvm::ilist_traits", %"class.llvm::MachineInstr"* } 40 %"struct.llvm::ilist_traits" = type { %"class.llvm::ilist_half_node", %"class.llvm::MachineBasicBlock"* } 41 %"class.llvm::BasicBlock" = type { %"class.llvm::Value", %"class.llvm::ilist_node.2", %"class.llvm::iplist.4", %"class.llvm::Function"* } 42 %"class.llvm::ilist_node.2" = type { %"class.llvm::ilist_half_node.3", %"class.llvm::BasicBlock"* } 43 %"class.llvm::ilist_half_node.3" = type { %"class.llvm::BasicBlock"* } 44 %"class.llvm::iplist.4" = type { %"struct.llvm::ilist_traits.5", %"class.llvm::Instruction"* } 45 %"struct.llvm::ilist_traits.5" = type { %"class.llvm::ilist_half_node.10" } 46 %"class.llvm::ilist_half_node.10" = type { %"class.llvm::Instruction"* } 47 %"class.llvm::Instruction" = type { %"class.llvm::User", %"class.llvm::ilist_node.193", %"class.llvm::BasicBlock"*, %"class.llvm::DebugLoc" } 48 %"class.llvm::User" = type { %"class.llvm::Value", %"class.llvm::Use"*, i32 } 49 %"class.llvm::ilist_node.193" = type { %"class.llvm::ilist_half_node.10", %"class.llvm::Instruction"* } 50 %"class.llvm::DebugLoc" = type { i32, i32 } 51 %"class.llvm::Function" = type { %"class.llvm::GlobalValue", %"class.llvm::ilist_node.27", %"class.llvm::iplist.47", %"class.llvm::iplist.54", %"class.llvm::ValueSymbolTable"*, %"class.llvm::AttributeSet" } 52 %"class.llvm::GlobalValue" = type { [52 x i8], [4 x i8], %"class.llvm::Module"*, %"class.std::basic_string" } 53 %"class.llvm::Module" = type { %"class.llvm::LLVMContext"*, %"class.llvm::iplist.11", %"class.llvm::iplist.20", %"class.llvm::iplist.29", %"struct.llvm::ilist.38", %"class.std::basic_string", %"class.llvm::ValueSymbolTable"*, %"class.llvm::OwningPtr", %"class.std::basic_string", %"class.std::basic_string", %"class.std::basic_string", i8* } 54 %"class.llvm::iplist.11" = type { %"struct.llvm::ilist_traits.12", %"class.llvm::GlobalVariable"* } 55 %"struct.llvm::ilist_traits.12" = type { %"class.llvm::ilist_node.18" } 56 %"class.llvm::ilist_node.18" = type { %"class.llvm::ilist_half_node.19", %"class.llvm::GlobalVariable"* } 57 %"class.llvm::ilist_half_node.19" = type { %"class.llvm::GlobalVariable"* } 58 %"class.llvm::GlobalVariable" = type { %"class.llvm::GlobalValue", %"class.llvm::ilist_node.18", i8 } 59 %"class.llvm::iplist.20" = type { %"struct.llvm::ilist_traits.21", %"class.llvm::Function"* } 60 %"struct.llvm::ilist_traits.21" = type { %"class.llvm::ilist_node.27" } 61 %"class.llvm::ilist_node.27" = type { %"class.llvm::ilist_half_node.28", %"class.llvm::Function"* } 62 %"class.llvm::ilist_half_node.28" = type { %"class.llvm::Function"* } 63 %"class.llvm::iplist.29" = type { %"struct.llvm::ilist_traits.30", %"class.llvm::GlobalAlias"* } 64 %"struct.llvm::ilist_traits.30" = type { %"class.llvm::ilist_node.36" } 65 %"class.llvm::ilist_node.36" = type { %"class.llvm::ilist_half_node.37", %"class.llvm::GlobalAlias"* } 66 %"class.llvm::ilist_half_node.37" = type { %"class.llvm::GlobalAlias"* } 67 %"class.llvm::GlobalAlias" = type { %"class.llvm::GlobalValue", %"class.llvm::ilist_node.36" } 68 %"struct.llvm::ilist.38" = type { %"class.llvm::iplist.39" } 69 %"class.llvm::iplist.39" = type { %"struct.llvm::ilist_traits.40", %"class.llvm::NamedMDNode"* } 70 %"struct.llvm::ilist_traits.40" = type { %"class.llvm::ilist_node.45" } 71 %"class.llvm::ilist_node.45" = type { %"class.llvm::ilist_half_node.46", %"class.llvm::NamedMDNode"* } 72 %"class.llvm::ilist_half_node.46" = type { %"class.llvm::NamedMDNode"* } 73 %"class.llvm::NamedMDNode" = type { %"class.llvm::ilist_node.45", %"class.std::basic_string", %"class.llvm::Module"*, i8* } 74 %"class.std::basic_string" = type { %"struct.std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Alloc_hider" } 75 %"struct.std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Alloc_hider" = type { i8* } 76 %"class.llvm::ValueSymbolTable" = type opaque 77 %"class.llvm::OwningPtr" = type { %"class.llvm::GVMaterializer"* } 78 %"class.llvm::GVMaterializer" = type opaque 79 %"class.llvm::iplist.47" = type { %"struct.llvm::ilist_traits.48", %"class.llvm::BasicBlock"* } 80 %"struct.llvm::ilist_traits.48" = type { %"class.llvm::ilist_half_node.3" } 81 %"class.llvm::iplist.54" = type { %"struct.llvm::ilist_traits.55", %"class.llvm::Argument"* } 82 %"struct.llvm::ilist_traits.55" = type { %"class.llvm::ilist_half_node.61" } 83 %"class.llvm::ilist_half_node.61" = type { %"class.llvm::Argument"* } 84 %"class.llvm::Argument" = type { %"class.llvm::Value", %"class.llvm::ilist_node.192", %"class.llvm::Function"* } 85 %"class.llvm::ilist_node.192" = type { %"class.llvm::ilist_half_node.61", %"class.llvm::Argument"* } 86 %"class.llvm::AttributeSet" = type { %"class.llvm::AttributeSetImpl"* } 87 %"class.llvm::AttributeSetImpl" = type opaque 88 %"class.llvm::MachineFunction" = type { %"class.llvm::Function"*, %"class.llvm::TargetMachine"*, %"class.llvm::MCContext"*, %"class.llvm::MachineModuleInfo"*, %"class.llvm::GCModuleInfo"*, %"class.llvm::MachineRegisterInfo"*, %"struct.llvm::MachineFunctionInfo"*, %"class.llvm::MachineFrameInfo"*, %"class.llvm::MachineConstantPool"*, %"class.llvm::MachineJumpTableInfo"*, %"class.std::vector.163", %"class.llvm::BumpPtrAllocator", %"class.llvm::Recycler", %"class.llvm::ArrayRecycler", %"class.llvm::Recycler.180", %"struct.llvm::ilist.181", i32, i32, i8 } 89 %"class.llvm::TargetMachine" = type { i32 (...)**, %"class.llvm::Target"*, %"class.std::basic_string", %"class.std::basic_string", %"class.std::basic_string", %"class.llvm::MCCodeGenInfo"*, %"class.llvm::MCAsmInfo"*, i8, %"class.llvm::TargetOptions" } 90 %"class.llvm::Target" = type opaque 91 %"class.llvm::MCCodeGenInfo" = type opaque 92 %"class.llvm::MCAsmInfo" = type opaque 93 %"class.llvm::TargetOptions" = type { [2 x i8], i32, i8, i32, i8, %"class.std::basic_string", i32, i32 } 94 %"class.llvm::MCContext" = type { %"class.llvm::SourceMgr"*, %"class.llvm::MCAsmInfo"*, %"class.llvm::MCRegisterInfo"*, %"class.llvm::MCObjectFileInfo"*, %"class.llvm::BumpPtrAllocator", %"class.llvm::StringMap", %"class.llvm::StringMap.62", i32, %"class.llvm::DenseMap.63", i8*, %"class.llvm::raw_ostream"*, i8, %"class.std::basic_string", %"class.std::basic_string", %"class.std::vector", %"class.std::vector.70", %"class.llvm::MCDwarfLoc", i8, i8, i32, %"class.llvm::MCSection"*, %"class.llvm::MCSymbol"*, %"class.llvm::MCSymbol"*, %"class.std::vector.75", %"class.llvm::StringRef", %"class.llvm::StringRef", i8, %"class.llvm::DenseMap.80", %"class.std::vector.84", i8*, i8*, i8*, i8 } 95 %"class.llvm::SourceMgr" = type opaque 96 %"class.llvm::MCRegisterInfo" = type { %"struct.llvm::MCRegisterDesc"*, i32, i32, i32, %"class.llvm::MCRegisterClass"*, i32, i32, [2 x i16]*, i16*, i8*, i16*, i32, i16*, i32, i32, i32, i32, %"struct.llvm::MCRegisterInfo::DwarfLLVMRegPair"*, %"struct.llvm::MCRegisterInfo::DwarfLLVMRegPair"*, %"struct.llvm::MCRegisterInfo::DwarfLLVMRegPair"*, %"struct.llvm::MCRegisterInfo::DwarfLLVMRegPair"*, %"class.llvm::DenseMap" } 97 %"struct.llvm::MCRegisterDesc" = type { i32, i32, i32, i32, i32, i32 } 98 %"class.llvm::MCRegisterClass" = type { i8*, i16*, i8*, i16, i16, i16, i16, i16, i8, i8 } 99 %"struct.llvm::MCRegisterInfo::DwarfLLVMRegPair" = type { i32, i32 } 100 %"class.llvm::DenseMap" = type { %"struct.std::pair"*, i32, i32, i32 } 101 %"struct.std::pair" = type { i32, i32 } 102 %"class.llvm::MCObjectFileInfo" = type opaque 103 %"class.llvm::BumpPtrAllocator" = type { i64, i64, %"class.llvm::SlabAllocator"*, %"class.llvm::MemSlab"*, i8*, i8*, i64 } 104 %"class.llvm::SlabAllocator" = type { i32 (...)** } 105 %"class.llvm::MemSlab" = type { i64, %"class.llvm::MemSlab"* } 106 %"class.llvm::StringMap" = type { %"class.llvm::StringMapImpl", %"class.llvm::BumpPtrAllocator"* } 107 %"class.llvm::StringMapImpl" = type { %"class.llvm::StringMapEntryBase"**, i32, i32, i32, i32 } 108 %"class.llvm::StringMapEntryBase" = type { i32 } 109 %"class.llvm::StringMap.62" = type { %"class.llvm::StringMapImpl", %"class.llvm::BumpPtrAllocator"* } 110 %"class.llvm::DenseMap.63" = type { %"struct.std::pair.66"*, i32, i32, i32 } 111 %"struct.std::pair.66" = type opaque 112 %"class.llvm::raw_ostream" = type { i32 (...)**, i8*, i8*, i8*, i32 } 113 %"class.std::vector" = type { %"struct.std::_Vector_base" } 114 %"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<llvm::MCDwarfFile *, std::allocator<llvm::MCDwarfFile *> >::_Vector_impl" } 115 %"struct.std::_Vector_base<llvm::MCDwarfFile *, std::allocator<llvm::MCDwarfFile *> >::_Vector_impl" = type { %"class.llvm::MCDwarfFile"**, %"class.llvm::MCDwarfFile"**, %"class.llvm::MCDwarfFile"** } 116 %"class.llvm::MCDwarfFile" = type { %"class.llvm::StringRef", i32 } 117 %"class.llvm::StringRef" = type { i8*, i64 } 118 %"class.std::vector.70" = type { %"struct.std::_Vector_base.71" } 119 %"struct.std::_Vector_base.71" = type { %"struct.std::_Vector_base<llvm::StringRef, std::allocator<llvm::StringRef> >::_Vector_impl" } 120 %"struct.std::_Vector_base<llvm::StringRef, std::allocator<llvm::StringRef> >::_Vector_impl" = type { %"class.llvm::StringRef"*, %"class.llvm::StringRef"*, %"class.llvm::StringRef"* } 121 %"class.llvm::MCDwarfLoc" = type { i32, i32, i32, i32, i32, i32 } 122 %"class.llvm::MCSection" = type opaque 123 %"class.llvm::MCSymbol" = type { %"class.llvm::StringRef", %"class.llvm::MCSection"*, %"class.llvm::MCExpr"*, i8 } 124 %"class.llvm::MCExpr" = type opaque 125 %"class.std::vector.75" = type { %"struct.std::_Vector_base.76" } 126 %"struct.std::_Vector_base.76" = type { %"struct.std::_Vector_base<const llvm::MCGenDwarfLabelEntry *, std::allocator<const llvm::MCGenDwarfLabelEntry *> >::_Vector_impl" } 127 %"struct.std::_Vector_base<const llvm::MCGenDwarfLabelEntry *, std::allocator<const llvm::MCGenDwarfLabelEntry *> >::_Vector_impl" = type { %"class.llvm::MCGenDwarfLabelEntry"**, %"class.llvm::MCGenDwarfLabelEntry"**, %"class.llvm::MCGenDwarfLabelEntry"** } 128 %"class.llvm::MCGenDwarfLabelEntry" = type { %"class.llvm::StringRef", i32, i32, %"class.llvm::MCSymbol"* } 129 %"class.llvm::DenseMap.80" = type { %"struct.std::pair.83"*, i32, i32, i32 } 130 %"struct.std::pair.83" = type { %"class.llvm::MCSection"*, %"class.llvm::MCLineSection"* } 131 %"class.llvm::MCLineSection" = type { %"class.std::vector.215" } 132 %"class.std::vector.215" = type { %"struct.std::_Vector_base.216" } 133 %"struct.std::_Vector_base.216" = type { %"struct.std::_Vector_base<llvm::MCLineEntry, std::allocator<llvm::MCLineEntry> >::_Vector_impl" } 134 %"struct.std::_Vector_base<llvm::MCLineEntry, std::allocator<llvm::MCLineEntry> >::_Vector_impl" = type { %"class.llvm::MCLineEntry"*, %"class.llvm::MCLineEntry"*, %"class.llvm::MCLineEntry"* } 135 %"class.llvm::MCLineEntry" = type { %"class.llvm::MCDwarfLoc", %"class.llvm::MCSymbol"* } 136 %"class.std::vector.84" = type { %"struct.std::_Vector_base.85" } 137 %"struct.std::_Vector_base.85" = type { %"struct.std::_Vector_base<const llvm::MCSection *, std::allocator<const llvm::MCSection *> >::_Vector_impl" } 138 %"struct.std::_Vector_base<const llvm::MCSection *, std::allocator<const llvm::MCSection *> >::_Vector_impl" = type { %"class.llvm::MCSection"**, %"class.llvm::MCSection"**, %"class.llvm::MCSection"** } 139 %"class.llvm::MachineModuleInfo" = type { %"class.llvm::ImmutablePass", %"class.llvm::MCContext", %"class.llvm::Module"*, %"class.llvm::MachineModuleInfoImpl"*, %"class.std::vector.95", i32, %"class.std::vector.100", %"class.llvm::DenseMap.110", %"class.llvm::DenseMap.114", i32, %"class.std::vector.118", %"class.std::vector.123", %"class.std::vector.123", %"class.std::vector.128", %"class.llvm::SmallPtrSet", %"class.llvm::MMIAddrLabelMap"*, i8, i8, i8, i8, %"class.llvm::SmallVector.133" } 140 %"class.llvm::ImmutablePass" = type { %"class.llvm::ModulePass" } 141 %"class.llvm::ModulePass" = type { %"class.llvm::Pass" } 142 %"class.llvm::Pass" = type { i32 (...)**, %"class.llvm::AnalysisResolver"*, i8*, i32 } 143 %"class.llvm::AnalysisResolver" = type { %"class.std::vector.89", %"class.llvm::PMDataManager"* } 144 %"class.std::vector.89" = type { %"struct.std::_Vector_base.90" } 145 %"struct.std::_Vector_base.90" = type { %"struct.std::_Vector_base<std::pair<const void *, llvm::Pass *>, std::allocator<std::pair<const void *, llvm::Pass *> > >::_Vector_impl" } 146 %"struct.std::_Vector_base<std::pair<const void *, llvm::Pass *>, std::allocator<std::pair<const void *, llvm::Pass *> > >::_Vector_impl" = type { %"struct.std::pair.94"*, %"struct.std::pair.94"*, %"struct.std::pair.94"* } 147 %"struct.std::pair.94" = type { i8*, %"class.llvm::Pass"* } 148 %"class.llvm::PMDataManager" = type opaque 149 %"class.llvm::MachineModuleInfoImpl" = type { i32 (...)** } 150 %"class.std::vector.95" = type { %"struct.std::_Vector_base.96" } 151 %"struct.std::_Vector_base.96" = type { %"struct.std::_Vector_base<llvm::MachineMove, std::allocator<llvm::MachineMove> >::_Vector_impl" } 152 %"struct.std::_Vector_base<llvm::MachineMove, std::allocator<llvm::MachineMove> >::_Vector_impl" = type { %"class.llvm::MachineMove"*, %"class.llvm::MachineMove"*, %"class.llvm::MachineMove"* } 153 %"class.llvm::MachineMove" = type { %"class.llvm::MCSymbol"*, %"class.llvm::MachineLocation", %"class.llvm::MachineLocation" } 154 %"class.llvm::MachineLocation" = type { i8, i32, i32 } 155 %"class.std::vector.100" = type { %"struct.std::_Vector_base.101" } 156 %"struct.std::_Vector_base.101" = type { %"struct.std::_Vector_base<llvm::LandingPadInfo, std::allocator<llvm::LandingPadInfo> >::_Vector_impl" } 157 %"struct.std::_Vector_base<llvm::LandingPadInfo, std::allocator<llvm::LandingPadInfo> >::_Vector_impl" = type { %"struct.llvm::LandingPadInfo"*, %"struct.llvm::LandingPadInfo"*, %"struct.llvm::LandingPadInfo"* } 158 %"struct.llvm::LandingPadInfo" = type { %"class.llvm::MachineBasicBlock"*, %"class.llvm::SmallVector", %"class.llvm::SmallVector", %"class.llvm::MCSymbol"*, %"class.llvm::Function"*, %"class.std::vector.105" } 159 %"class.llvm::SmallVector" = type { %"class.llvm::SmallVectorImpl", %"struct.llvm::SmallVectorStorage" } 160 %"class.llvm::SmallVectorImpl" = type { %"class.llvm::SmallVectorTemplateBase" } 161 %"class.llvm::SmallVectorTemplateBase" = type { %"class.llvm::SmallVectorTemplateCommon" } 162 %"class.llvm::SmallVectorTemplateCommon" = type { %"class.llvm::SmallVectorBase", %"struct.llvm::AlignedCharArrayUnion" } 163 %"class.llvm::SmallVectorBase" = type { i8*, i8*, i8* } 164 %"struct.llvm::AlignedCharArrayUnion" = type { %"struct.llvm::AlignedCharArray" } 165 %"struct.llvm::AlignedCharArray" = type { [8 x i8] } 166 %"struct.llvm::SmallVectorStorage" = type { i8 } 167 %"class.std::vector.105" = type { %"struct.std::_Vector_base.106" } 168 %"struct.std::_Vector_base.106" = type { %"struct.std::_Vector_base<int, std::allocator<int> >::_Vector_impl" } 169 %"struct.std::_Vector_base<int, std::allocator<int> >::_Vector_impl" = type { i32*, i32*, i32* } 170 %"class.llvm::DenseMap.110" = type { %"struct.std::pair.113"*, i32, i32, i32 } 171 %"struct.std::pair.113" = type { %"class.llvm::MCSymbol"*, %"class.llvm::SmallVector.206" } 172 %"class.llvm::SmallVector.206" = type { [28 x i8], %"struct.llvm::SmallVectorStorage.207" } 173 %"struct.llvm::SmallVectorStorage.207" = type { [3 x %"struct.llvm::AlignedCharArrayUnion.198"] } 174 %"struct.llvm::AlignedCharArrayUnion.198" = type { %"struct.llvm::AlignedCharArray.199" } 175 %"struct.llvm::AlignedCharArray.199" = type { [4 x i8] } 176 %"class.llvm::DenseMap.114" = type { %"struct.std::pair.117"*, i32, i32, i32 } 177 %"struct.std::pair.117" = type { %"class.llvm::MCSymbol"*, i32 } 178 %"class.std::vector.118" = type { %"struct.std::_Vector_base.119" } 179 %"struct.std::_Vector_base.119" = type { %"struct.std::_Vector_base<const llvm::GlobalVariable *, std::allocator<const llvm::GlobalVariable *> >::_Vector_impl" } 180 %"struct.std::_Vector_base<const llvm::GlobalVariable *, std::allocator<const llvm::GlobalVariable *> >::_Vector_impl" = type { %"class.llvm::GlobalVariable"**, %"class.llvm::GlobalVariable"**, %"class.llvm::GlobalVariable"** } 181 %"class.std::vector.123" = type { %"struct.std::_Vector_base.124" } 182 %"struct.std::_Vector_base.124" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int> >::_Vector_impl" } 183 %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int> >::_Vector_impl" = type { i32*, i32*, i32* } 184 %"class.std::vector.128" = type { %"struct.std::_Vector_base.129" } 185 %"struct.std::_Vector_base.129" = type { %"struct.std::_Vector_base<const llvm::Function *, std::allocator<const llvm::Function *> >::_Vector_impl" } 186 %"struct.std::_Vector_base<const llvm::Function *, std::allocator<const llvm::Function *> >::_Vector_impl" = type { %"class.llvm::Function"**, %"class.llvm::Function"**, %"class.llvm::Function"** } 187 %"class.llvm::SmallPtrSet" = type { %"class.llvm::SmallPtrSetImpl", [33 x i8*] } 188 %"class.llvm::SmallPtrSetImpl" = type { i8**, i8**, i32, i32, i32 } 189 %"class.llvm::MMIAddrLabelMap" = type opaque 190 %"class.llvm::SmallVector.133" = type { %"class.llvm::SmallVectorImpl.134", %"struct.llvm::SmallVectorStorage.139" } 191 %"class.llvm::SmallVectorImpl.134" = type { %"class.llvm::SmallVectorTemplateBase.135" } 192 %"class.llvm::SmallVectorTemplateBase.135" = type { %"class.llvm::SmallVectorTemplateCommon.136" } 193 %"class.llvm::SmallVectorTemplateCommon.136" = type { %"class.llvm::SmallVectorBase", %"struct.llvm::AlignedCharArrayUnion.137" } 194 %"struct.llvm::AlignedCharArrayUnion.137" = type { %"struct.llvm::AlignedCharArray.138" } 195 %"struct.llvm::AlignedCharArray.138" = type { [40 x i8] } 196 %"struct.llvm::SmallVectorStorage.139" = type { [3 x %"struct.llvm::AlignedCharArrayUnion.137"] } 197 %"class.llvm::GCModuleInfo" = type opaque 198 %"class.llvm::MachineRegisterInfo" = type { %"class.llvm::TargetRegisterInfo"*, i8, i8, %"class.llvm::IndexedMap", %"class.llvm::IndexedMap.146", %"class.llvm::MachineOperand"**, %"class.llvm::BitVector", %"class.llvm::BitVector", %"class.llvm::BitVector", %"class.std::vector.147", %"class.std::vector.123" } 199 %"class.llvm::TargetRegisterInfo" = type { i32 (...)**, %"class.llvm::MCRegisterInfo", %"struct.llvm::TargetRegisterInfoDesc"*, i8**, i32*, %"class.llvm::TargetRegisterClass"**, %"class.llvm::TargetRegisterClass"** } 200 %"struct.llvm::TargetRegisterInfoDesc" = type { i32, i8 } 201 %"class.llvm::TargetRegisterClass" = type { %"class.llvm::MCRegisterClass"*, i32*, i32*, i16*, %"class.llvm::TargetRegisterClass"**, void (%"class.llvm::ArrayRef"*, %"class.llvm::MachineFunction"*)* } 202 %"class.llvm::ArrayRef" = type { i16*, i64 } 203 %"class.llvm::IndexedMap" = type { %"class.std::vector.140", %"struct.std::pair.145", %"struct.llvm::VirtReg2IndexFunctor" } 204 %"class.std::vector.140" = type { %"struct.std::_Vector_base.141" } 205 %"struct.std::_Vector_base.141" = type { %"struct.std::_Vector_base<std::pair<const llvm::TargetRegisterClass *, llvm::MachineOperand *>, std::allocator<std::pair<const llvm::TargetRegisterClass *, llvm::MachineOperand *> > >::_Vector_impl" } 206 %"struct.std::_Vector_base<std::pair<const llvm::TargetRegisterClass *, llvm::MachineOperand *>, std::allocator<std::pair<const llvm::TargetRegisterClass *, llvm::MachineOperand *> > >::_Vector_impl" = type { %"struct.std::pair.145"*, %"struct.std::pair.145"*, %"struct.std::pair.145"* } 207 %"struct.std::pair.145" = type { %"class.llvm::TargetRegisterClass"*, %"class.llvm::MachineOperand"* } 208 %"class.llvm::MachineOperand" = type { i8, [3 x i8], %union.anon, %"class.llvm::MachineInstr"*, %union.anon.188 } 209 %union.anon = type { i32 } 210 %union.anon.188 = type { %struct.anon } 211 %struct.anon = type { %"class.llvm::MachineOperand"*, %"class.llvm::MachineOperand"* } 212 %"struct.llvm::VirtReg2IndexFunctor" = type { i8 } 213 %"class.llvm::IndexedMap.146" = type { %"class.std::vector.147", %"struct.std::pair.152", %"struct.llvm::VirtReg2IndexFunctor" } 214 %"class.std::vector.147" = type { %"struct.std::_Vector_base.148" } 215 %"struct.std::_Vector_base.148" = type { %"struct.std::_Vector_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int> > >::_Vector_impl" } 216 %"struct.std::_Vector_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int> > >::_Vector_impl" = type { %"struct.std::pair.152"*, %"struct.std::pair.152"*, %"struct.std::pair.152"* } 217 %"struct.std::pair.152" = type { i32, i32 } 218 %"class.llvm::BitVector" = type { i64*, i32, i32 } 219 %"struct.llvm::MachineFunctionInfo" = type { i32 (...)** } 220 %"class.llvm::MachineFrameInfo" = type opaque 221 %"class.llvm::MachineConstantPool" = type { %"class.llvm::DataLayout"*, i32, %"class.std::vector.153", %"class.llvm::DenseSet" } 222 %"class.llvm::DataLayout" = type opaque 223 %"class.std::vector.153" = type { %"struct.std::_Vector_base.154" } 224 %"struct.std::_Vector_base.154" = type { %"struct.std::_Vector_base<llvm::MachineConstantPoolEntry, std::allocator<llvm::MachineConstantPoolEntry> >::_Vector_impl" } 225 %"struct.std::_Vector_base<llvm::MachineConstantPoolEntry, std::allocator<llvm::MachineConstantPoolEntry> >::_Vector_impl" = type { %"class.llvm::MachineConstantPoolEntry"*, %"class.llvm::MachineConstantPoolEntry"*, %"class.llvm::MachineConstantPoolEntry"* } 226 %"class.llvm::MachineConstantPoolEntry" = type { %union.anon.158, i32 } 227 %union.anon.158 = type { %"class.llvm::Constant"* } 228 %"class.llvm::Constant" = type { %"class.llvm::User" } 229 %"class.llvm::DenseSet" = type { %"class.llvm::DenseMap.159" } 230 %"class.llvm::DenseMap.159" = type { %"struct.std::pair.162"*, i32, i32, i32 } 231 %"struct.std::pair.162" = type { %"class.llvm::MachineConstantPoolValue"*, i8 } 232 %"class.llvm::MachineConstantPoolValue" = type { i32 (...)**, %"class.llvm::Type"* } 233 %"class.llvm::MachineJumpTableInfo" = type opaque 234 %"class.std::vector.163" = type { %"struct.std::_Vector_base.164" } 235 %"struct.std::_Vector_base.164" = type { %"struct.std::_Vector_base<llvm::MachineBasicBlock *, std::allocator<llvm::MachineBasicBlock *> >::_Vector_impl" } 236 %"struct.std::_Vector_base<llvm::MachineBasicBlock *, std::allocator<llvm::MachineBasicBlock *> >::_Vector_impl" = type { %"class.llvm::MachineBasicBlock"**, %"class.llvm::MachineBasicBlock"**, %"class.llvm::MachineBasicBlock"** } 237 %"class.llvm::Recycler" = type { %"class.llvm::iplist.168" } 238 %"class.llvm::iplist.168" = type { %"struct.llvm::ilist_traits.169", %"struct.llvm::RecyclerStruct"* } 239 %"struct.llvm::ilist_traits.169" = type { %"struct.llvm::RecyclerStruct" } 240 %"struct.llvm::RecyclerStruct" = type { %"struct.llvm::RecyclerStruct"*, %"struct.llvm::RecyclerStruct"* } 241 %"class.llvm::ArrayRecycler" = type { %"class.llvm::SmallVector.174" } 242 %"class.llvm::SmallVector.174" = type { %"class.llvm::SmallVectorImpl.175", %"struct.llvm::SmallVectorStorage.179" } 243 %"class.llvm::SmallVectorImpl.175" = type { %"class.llvm::SmallVectorTemplateBase.176" } 244 %"class.llvm::SmallVectorTemplateBase.176" = type { %"class.llvm::SmallVectorTemplateCommon.177" } 245 %"class.llvm::SmallVectorTemplateCommon.177" = type { %"class.llvm::SmallVectorBase", %"struct.llvm::AlignedCharArrayUnion.178" } 246 %"struct.llvm::AlignedCharArrayUnion.178" = type { %"struct.llvm::AlignedCharArray" } 247 %"struct.llvm::SmallVectorStorage.179" = type { [7 x %"struct.llvm::AlignedCharArrayUnion.178"] } 248 %"class.llvm::Recycler.180" = type { %"class.llvm::iplist.168" } 249 %"struct.llvm::ilist.181" = type { %"class.llvm::iplist.182" } 250 %"class.llvm::iplist.182" = type { %"struct.llvm::ilist_traits.183", %"class.llvm::MachineBasicBlock"* } 251 %"struct.llvm::ilist_traits.183" = type { %"class.llvm::ilist_half_node.1" } 252 %"class.llvm::ArrayRecycler<llvm::MachineOperand, 8>::Capacity" = type { i8 } 253 %"class.llvm::ConstantInt" = type { %"class.llvm::Constant", %"class.llvm::APInt" } 254 %"class.llvm::APInt" = type { i32, %union.anon.189 } 255 %union.anon.189 = type { i64 } 256 %"class.llvm::ConstantFP" = type { %"class.llvm::Constant", %"class.llvm::APFloat" } 257 %"class.llvm::APFloat" = type { %"struct.llvm::fltSemantics"*, %"union.llvm::APFloat::Significand", i16, i8 } 258 %"struct.llvm::fltSemantics" = type opaque 259 %"union.llvm::APFloat::Significand" = type { i64 } 260 %"class.llvm::BlockAddress" = type { %"class.llvm::Constant" } 261 %"class.llvm::hash_code" = type { i64 } 262 %"struct.llvm::hashing::detail::hash_combine_recursive_helper" = type { [64 x i8], %"struct.llvm::hashing::detail::hash_state", i64 } 263 %"struct.llvm::hashing::detail::hash_state" = type { i64, i64, i64, i64, i64, i64, i64, i64 } 264 %"class.llvm::PrintReg" = type { %"class.llvm::TargetRegisterInfo"*, i32, i32 } 265 %"class.llvm::PseudoSourceValue" = type { %"class.llvm::Value" } 266 %"class.llvm::FoldingSetNodeID" = type { %"class.llvm::SmallVector.194" } 267 %"class.llvm::SmallVector.194" = type { [28 x i8], %"struct.llvm::SmallVectorStorage.200" } 268 %"struct.llvm::SmallVectorStorage.200" = type { [31 x %"struct.llvm::AlignedCharArrayUnion.198"] } 269 %"struct.llvm::ArrayRecycler<llvm::MachineOperand, 8>::FreeList" = type { %"struct.llvm::ArrayRecycler<llvm::MachineOperand, 8>::FreeList"* } 270 %"class.llvm::ilist_iterator.202" = type { %"class.llvm::MachineInstr"* } 271 %"class.llvm::TargetInstrInfo" = type { i32 (...)**, [28 x i8], i32, i32 } 272 %"struct.std::pair.203" = type { i8, i8 } 273 %"class.llvm::SmallVectorImpl.195" = type { %"class.llvm::SmallVectorTemplateBase.196" } 274 %"class.llvm::SmallVectorTemplateBase.196" = type { %"class.llvm::SmallVectorTemplateCommon.197" } 275 %"class.llvm::SmallVectorTemplateCommon.197" = type { %"class.llvm::SmallVectorBase", %"struct.llvm::AlignedCharArrayUnion.198" } 276 %"class.llvm::AliasAnalysis" = type { i32 (...)**, %"class.llvm::DataLayout"*, %"class.llvm::TargetLibraryInfo"*, %"class.llvm::AliasAnalysis"* } 277 %"class.llvm::TargetLibraryInfo" = type opaque 278 %"struct.llvm::AliasAnalysis::Location" = type { %"class.llvm::Value"*, i64, %"class.llvm::MDNode"* } 279 %"class.llvm::DIVariable" = type { %"class.llvm::DIDescriptor" } 280 %"class.llvm::DIDescriptor" = type { %"class.llvm::MDNode"* } 281 %"class.llvm::DIScope" = type { %"class.llvm::DIDescriptor" } 282 %"class.llvm::ArrayRef.208" = type { i32*, i64 } 283 %"class.llvm::SmallVector.209" = type { %"class.llvm::SmallVectorImpl.210", %"struct.llvm::SmallVectorStorage.214" } 284 %"class.llvm::SmallVectorImpl.210" = type { %"class.llvm::SmallVectorTemplateBase.211" } 285 %"class.llvm::SmallVectorTemplateBase.211" = type { %"class.llvm::SmallVectorTemplateCommon.212" } 286 %"class.llvm::SmallVectorTemplateCommon.212" = type { %"class.llvm::SmallVectorBase", %"struct.llvm::AlignedCharArrayUnion.213" } 287 %"struct.llvm::AlignedCharArrayUnion.213" = type { %"struct.llvm::AlignedCharArray" } 288 %"struct.llvm::SmallVectorStorage.214" = type { [7 x %"struct.llvm::AlignedCharArrayUnion.213"] } 289 %"class.llvm::Twine" = type { %"union.llvm::Twine::Child", %"union.llvm::Twine::Child", i8, i8 } 290 %"union.llvm::Twine::Child" = type { %"class.llvm::Twine"* } 291 %"struct.std::random_access_iterator_tag" = type { i8 } 292 293 declare void @_ZN4llvm19MachineRegisterInfo27removeRegOperandFromUseListEPNS_14MachineOperandE(%"class.llvm::MachineRegisterInfo"*, %"class.llvm::MachineOperand"*) 294 295 declare void @_ZN4llvm19MachineRegisterInfo22addRegOperandToUseListEPNS_14MachineOperandE(%"class.llvm::MachineRegisterInfo"*, %"class.llvm::MachineOperand"*) 296 297 declare zeroext i32 @_ZNK4llvm14MCRegisterInfo9getSubRegEjj(%"class.llvm::MCRegisterInfo"*, i32 zeroext, i32 zeroext) 298 299 define void @_ZN4llvm14MachineOperand12substPhysRegEjRKNS_18TargetRegisterInfoE(%"class.llvm::MachineOperand"* %this, i32 zeroext %Reg, %"class.llvm::TargetRegisterInfo"* %TRI) align 2 { 300 entry: 301 %SubReg_TargetFlags.i = getelementptr inbounds %"class.llvm::MachineOperand"* %this, i64 0, i32 1 302 %0 = bitcast [3 x i8]* %SubReg_TargetFlags.i to i24* 303 %bf.load.i = load i24* %0, align 1 304 %bf.lshr.i = lshr i24 %bf.load.i, 12 305 %tobool = icmp eq i24 %bf.lshr.i, 0 306 br i1 %tobool, label %if.end, label %if.then 307 308 if.then: ; preds = %entry 309 %bf.cast.i = zext i24 %bf.lshr.i to i32 310 %add.ptr = getelementptr inbounds %"class.llvm::TargetRegisterInfo"* %TRI, i64 0, i32 1 311 %call3 = tail call zeroext i32 @_ZNK4llvm14MCRegisterInfo9getSubRegEjj(%"class.llvm::MCRegisterInfo"* %add.ptr, i32 zeroext %Reg, i32 zeroext %bf.cast.i) 312 %bf.load.i10 = load i24* %0, align 1 313 %bf.clear.i = and i24 %bf.load.i10, 4095 314 store i24 %bf.clear.i, i24* %0, align 1 315 br label %if.end 316 317 if.end: ; preds = %entry, %if.then 318 %Reg.addr.0 = phi i32 [ %call3, %if.then ], [ %Reg, %entry ] 319 %RegNo.i.i = getelementptr inbounds %"class.llvm::MachineOperand"* %this, i64 0, i32 2, i32 0 320 %1 = load i32* %RegNo.i.i, align 4, !tbaa !0 321 %cmp.i = icmp eq i32 %1, %Reg.addr.0 322 br i1 %cmp.i, label %_ZN4llvm14MachineOperand6setRegEj.exit, label %if.end.i 323 324 if.end.i: ; preds = %if.end 325 %ParentMI.i.i = getelementptr inbounds %"class.llvm::MachineOperand"* %this, i64 0, i32 3 326 %2 = load %"class.llvm::MachineInstr"** %ParentMI.i.i, align 8, !tbaa !3 327 %tobool.i = icmp eq %"class.llvm::MachineInstr"* %2, null 328 br i1 %tobool.i, label %if.end13.i, label %if.then3.i 329 330 if.then3.i: ; preds = %if.end.i 331 %Parent.i.i = getelementptr inbounds %"class.llvm::MachineInstr"* %2, i64 0, i32 2 332 %3 = load %"class.llvm::MachineBasicBlock"** %Parent.i.i, align 8, !tbaa !3 333 %tobool5.i = icmp eq %"class.llvm::MachineBasicBlock"* %3, null 334 br i1 %tobool5.i, label %if.end13.i, label %if.then6.i 335 336 if.then6.i: ; preds = %if.then3.i 337 %xParent.i.i = getelementptr inbounds %"class.llvm::MachineBasicBlock"* %3, i64 0, i32 4 338 %4 = load %"class.llvm::MachineFunction"** %xParent.i.i, align 8, !tbaa !3 339 %tobool8.i = icmp eq %"class.llvm::MachineFunction"* %4, null 340 br i1 %tobool8.i, label %if.end13.i, label %if.then9.i 341 342 if.then9.i: ; preds = %if.then6.i 343 %RegInfo.i.i = getelementptr inbounds %"class.llvm::MachineFunction"* %4, i64 0, i32 5 344 %5 = load %"class.llvm::MachineRegisterInfo"** %RegInfo.i.i, align 8, !tbaa !3 345 tail call void @_ZN4llvm19MachineRegisterInfo27removeRegOperandFromUseListEPNS_14MachineOperandE(%"class.llvm::MachineRegisterInfo"* %5, %"class.llvm::MachineOperand"* %this) 346 store i32 %Reg.addr.0, i32* %RegNo.i.i, align 4, !tbaa !0 347 tail call void @_ZN4llvm19MachineRegisterInfo22addRegOperandToUseListEPNS_14MachineOperandE(%"class.llvm::MachineRegisterInfo"* %5, %"class.llvm::MachineOperand"* %this) 348 br label %_ZN4llvm14MachineOperand6setRegEj.exit 349 350 if.end13.i: ; preds = %if.then6.i, %if.then3.i, %if.end.i 351 store i32 %Reg.addr.0, i32* %RegNo.i.i, align 4, !tbaa !0 352 br label %_ZN4llvm14MachineOperand6setRegEj.exit 353 354 _ZN4llvm14MachineOperand6setRegEj.exit: ; preds = %if.end, %if.then9.i, %if.end13.i 355 ret void 356 } 357 358 !0 = metadata !{metadata !"int", metadata !1} 359 !1 = metadata !{metadata !"omnipotent char", metadata !2} 360 !2 = metadata !{metadata !"Simple C/C++ TBAA"} 361 !3 = metadata !{metadata !"any pointer", metadata !1} 362 !4 = metadata !{metadata !"vtable pointer", metadata !2} 363 !5 = metadata !{metadata !"long", metadata !1} 364 !6 = metadata !{i64 0, i64 8, metadata !3, i64 8, i64 8, metadata !5} 365 !7 = metadata !{metadata !"short", metadata !1} 366 !8 = metadata !{i64 0, i64 1, metadata !1, i64 1, i64 4, metadata !0, i64 2, i64 1, metadata !1, i64 3, i64 1, metadata !9, i64 3, i64 1, metadata !9, i64 3, i64 1, metadata !9, i64 3, i64 1, metadata !9, i64 3, i64 1, metadata !9, i64 3, i64 1, metadata !9, i64 3, i64 1, metadata !9, i64 3, i64 1, metadata !9, i64 4, i64 4, metadata !0, i64 4, i64 4, metadata !0, i64 8, i64 8, metadata !3, i64 16, i64 8, metadata !3, i64 16, i64 8, metadata !3, i64 16, i64 8, metadata !3, i64 16, i64 8, metadata !5, i64 16, i64 8, metadata !3, i64 16, i64 8, metadata !3, i64 16, i64 8, metadata !3, i64 16, i64 8, metadata !3, i64 24, i64 8, metadata !3, i64 16, i64 4, metadata !0, i64 16, i64 8, metadata !3, i64 16, i64 8, metadata !3, i64 16, i64 8, metadata !3, i64 24, i64 4, metadata !0} 367 !9 = metadata !{metadata !"bool", metadata !1} 368 !10 = metadata !{i8 0, i8 2} 369 370 ; CHECK-NOT: lbzu 3, 1(3) 371