diff --git a/llvm/lib/Target/PowerPC/CMakeLists.txt b/llvm/lib/Target/PowerPC/CMakeLists.txt --- a/llvm/lib/Target/PowerPC/CMakeLists.txt +++ b/llvm/lib/Target/PowerPC/CMakeLists.txt @@ -41,6 +41,7 @@ PPCMachineFunctionInfo.cpp PPCMachineScheduler.cpp PPCMacroFusion.cpp + PPCMergeStringPool.cpp PPCMIPeephole.cpp PPCRegisterInfo.cpp PPCSubtarget.cpp diff --git a/llvm/lib/Target/PowerPC/PPC.h b/llvm/lib/Target/PowerPC/PPC.h --- a/llvm/lib/Target/PowerPC/PPC.h +++ b/llvm/lib/Target/PowerPC/PPC.h @@ -53,6 +53,7 @@ FunctionPass *createPPCPreEmitPeepholePass(); FunctionPass *createPPCExpandAtomicPseudoPass(); FunctionPass *createPPCCTRLoopsPass(); + ModulePass *createPPCMergeStringPoolPass(); void LowerPPCMachineInstrToMCInst(const MachineInstr *MI, MCInst &OutMI, AsmPrinter &AP); bool LowerPPCMachineOperandToMCOperand(const MachineOperand &MO, @@ -78,6 +79,7 @@ void initializePPCExpandAtomicPseudoPass(PassRegistry &); void initializePPCCTRLoopsPass(PassRegistry &); void initializePPCDAGToDAGISelPass(PassRegistry &); + void initializePPCMergeStringPoolPass(PassRegistry &); extern char &PPCVSXFMAMutateID; diff --git a/llvm/lib/Target/PowerPC/PPCMergeStringPool.cpp b/llvm/lib/Target/PowerPC/PPCMergeStringPool.cpp new file mode 100644 --- /dev/null +++ b/llvm/lib/Target/PowerPC/PPCMergeStringPool.cpp @@ -0,0 +1,351 @@ +//===-- PPCMergeStringPool.cpp -------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// +// This transformation tries to merge the strings in the module into one pool +// of strings. The idea is to reduce the number of TOC entries in the module so +// that instead of having one TOC entry for each string there is only one global +// TOC entry and all of the strings are referenced off of that one entry plus +// an offset. +// +//===----------------------------------------------------------------------===// + +#include "PPC.h" +#include "llvm/ADT/SetVector.h" +#include "llvm/ADT/SmallSet.h" +#include "llvm/ADT/Statistic.h" +#include "llvm/Analysis/DomTreeUpdater.h" +#include "llvm/Analysis/LoopInfo.h" +#include "llvm/Analysis/LoopIterator.h" +#include "llvm/Analysis/ScalarEvolution.h" +#include "llvm/Analysis/ScalarEvolutionAliasAnalysis.h" +#include "llvm/IR/Constants.h" +#include "llvm/IR/Instructions.h" +#include "llvm/IR/Module.h" +#include "llvm/IR/ValueSymbolTable.h" +#include "llvm/Pass.h" +#include "llvm/Support/CommandLine.h" + +#define DEBUG_TYPE "ppc-merge-strings" + +STATISTIC(NumPooledStrings, "Number of Strings Pooled"); + +using namespace llvm; + +static cl::opt + MaxStringsPooled("ppc-max-strings-pooled", cl::Hidden, cl::init(-1), + cl::desc("Maximum Number of Strings to Pool.")); + +namespace { +struct { + bool operator()(const GlobalVariable *LHS, const GlobalVariable *RHS) const { + // First priority is alignment. + // If elements are sorted in terms of alignment then there won't be an + // issue with incorrect alignment that would require padding. + Align LHSAlign = LHS->getAlign().valueOrOne(); + Align RHSAlign = RHS->getAlign().valueOrOne(); + if (LHSAlign > RHSAlign) + return true; + else if (LHSAlign < RHSAlign) + return false; + + // Next priority is the number of uses. + // Smaller offsets are easier to materialize because materializing a large + // offset may require more than one instruction. (ie addis, addi). + if (LHS->getNumUses() > RHS->getNumUses()) + return true; + else if (LHS->getNumUses() < RHS->getNumUses()) + return false; + + const Constant *ConstLHS = LHS->getInitializer(); + const ConstantDataSequential *ConstDataLHS = + dyn_cast(ConstLHS); + unsigned LHSSize = + ConstDataLHS->getNumElements() * ConstDataLHS->getElementByteSize(); + const Constant *ConstRHS = RHS->getInitializer(); + const ConstantDataSequential *ConstDataRHS = + dyn_cast(ConstRHS); + unsigned RHSSize = + ConstDataRHS->getNumElements() * ConstDataRHS->getElementByteSize(); + + // Finally smaller constants should go first. This is, again, trying to + // minimize the offsets into the final struct. + return LHSSize < RHSSize; + } +} CompareConstants; + +class PPCMergeStringPool : public ModulePass { +public: + static char ID; + PPCMergeStringPool() : ModulePass(ID) {} + + bool runOnModule(Module &M) override { return mergeModuleStringPool(M); } + + StringRef getPassName() const override { return "PPC Merge String Pool"; } + + void getAnalysisUsage(AnalysisUsage &AU) const override { + AU.addPreserved(); + AU.addPreserved(); + AU.addPreserved(); + AU.addPreserved(); + } + +private: + // Globals in a Module are already unique so a set is not required and a + // vector will do. + std::vector MergeableStrings; + Align MaxAlignment; + Type *PooledStructType; + LLVMContext *Context; + void collectCandidateConstants(Module &M); + bool mergeModuleStringPool(Module &M); + void insertGEPBeforeUsers(GlobalVariable *GToReplace, GlobalVariable *GPool, + unsigned ElementIndex); +}; + + +// In order for a constant to be pooled we need to be able to replace all of +// the uses for that constant. This function checks all of the uses to make +// sure that they can be replaced. +static bool hasReplaceableUsers(GlobalVariable &GV) { + for (User *CurrentUser : GV.users()) { + // Instruction users are always valid. + if (isa(CurrentUser)) + continue; + + // We cannot replace GlobalValue users because they are not just nodes + // in IR. To replace a user like this we would need to create a new + // GlobalValue with the replacement and then try to delete the original + // GlobalValue. Deleting the original would only happen if it has no other + // uses. + if (isa(CurrentUser)) + return false; + + // We only support Instruction and Constant users. + if (!isa(CurrentUser)) + return false; + } + + return true; +} + +// Run through all of the constants in the module and determine if they are +// valid candidates to be merged into the string pool. Valid candidates will +// be added to MergeableStrings. +void PPCMergeStringPool::collectCandidateConstants(Module &M) { + for (GlobalVariable &Global : M.globals()) { + LLVM_DEBUG(dbgs() << "Looking at global:"); + LLVM_DEBUG(Global.dump()); + LLVM_DEBUG(dbgs() << "isConstant() " << Global.isConstant() << "\n"); + LLVM_DEBUG(dbgs() << "hasInitializer() " << Global.hasInitializer() + << "\n"); + + // We can only pool constants. + if (!Global.isConstant() || !Global.hasInitializer()) + continue; + + // If a global constant has a section we do not try to pool it because + // there is no guarantee that other constants will also be in the same + // section. Trying to pool constants from different sections (or no + // section) means that the pool has to be in multiple sections at the same + // time. + if (Global.hasSection()) + continue; + + // Do not pool constants with metadata because we should not add metadata + // to the pool when that metadata refers to a single constant in the pool. + if (Global.hasMetadata()) + continue; + + ConstantDataSequential *ConstData = + dyn_cast(Global.getInitializer()); + + // If the constant is undef then ConstData will be null. + if (!ConstData) + continue; + + if (!hasReplaceableUsers(Global)) + continue; + + Align AlignOfGlobal = Global.getAlign().valueOrOne(); + + // TODO: At this point do not allow over-aligned types. Adding a type + // with larger alignment may lose the larger alignment once it is + // added to the struct. + // Fix this in a future patch. + if (AlignOfGlobal.value() > ConstData->getElementByteSize()) + continue; + + // Make sure that the global is only visible inside the compilation unit. + if (Global.getLinkage() != GlobalValue::PrivateLinkage && + Global.getLinkage() != GlobalValue::InternalLinkage) + continue; + + LLVM_DEBUG(dbgs() << "Constant data of Global: "); + LLVM_DEBUG(ConstData->dump()); + LLVM_DEBUG(dbgs() << "\n\n"); + + MergeableStrings.push_back(&Global); + if (MaxAlignment < AlignOfGlobal) + MaxAlignment = AlignOfGlobal; + + // If we have already reached the maximum number of pooled strings then + // there is no point in looking for more. + if (MergeableStrings.size() >= MaxStringsPooled) + break; + } +} + +bool PPCMergeStringPool::mergeModuleStringPool(Module &M) { + + LLVM_DEBUG(dbgs() << "Merging string pool for module: " << M.getName() + << "\n"); + LLVM_DEBUG(dbgs() << "Number of globals is: " << M.global_size() << "\n"); + + collectCandidateConstants(M); + + // If we only have one (or fewer) constants in the module that are merge + // candidates we can skip doing the merging. + if (MergeableStrings.size() <= 1) + return false; + + // Sort the global constants to make access more efficient. + std::sort(MergeableStrings.begin(), MergeableStrings.end(), CompareConstants); + + SmallVector ConstantsInStruct; + for (GlobalVariable *GV : MergeableStrings) { + ConstantsInStruct.push_back(GV->getInitializer()); + } + + // Use an anonymous struct to pool the strings. + // TODO: This pass uses a single anonymous struct for all of the pooled + // entries. This may cause a performance issue in the situation where + // computing the offset requires two instructions (addis, addi). For the + // future we may want to split this into multiple structs. + Constant *ConstantPool = ConstantStruct::getAnon(ConstantsInStruct); + PooledStructType = ConstantPool->getType(); + + // The GlobalVariable constructor calls + // MM->insertGlobalVariable(PooledGlobal). + GlobalVariable *PooledGlobal = + new GlobalVariable(M, ConstantPool->getType(), + /* isConstant */ true, GlobalValue::PrivateLinkage, + ConstantPool, "__ModuleStringPool"); + PooledGlobal->setAlignment(MaxAlignment); + + LLVM_DEBUG(dbgs() << "Constructing global variable for string pool: "); + LLVM_DEBUG(PooledGlobal->dump()); + + Context = &M.getContext(); + size_t ElementIndex = 0; + for (GlobalVariable *GV : MergeableStrings) { + + LLVM_DEBUG(dbgs() << "The global:\n"); + LLVM_DEBUG(GV->dump()); + LLVM_DEBUG(dbgs() << "Has " << GV->getNumUses() << " uses.\n"); + + // Access to the pooled constant strings require an offset. Add a GEP + // before every use in order to compute this offset. + insertGEPBeforeUsers(GV, PooledGlobal, ElementIndex); + + // This GV has no more uses so we can erase it. + if (GV->use_empty()) + GV->eraseFromParent(); + + NumPooledStrings++; + ElementIndex++; + } + return true; +} + +static bool userHasOperand(User *TheUser, GlobalVariable *GVOperand) { + for (Value *Op : TheUser->operands()) + if (Op == GVOperand) + return true; + return false; +} + +// For pooled strings we need to add the offset into the pool for each string. +// This is done by adding a Get Element Pointer (GEP) before each user. This +// function adds the GEP. +void PPCMergeStringPool::insertGEPBeforeUsers(GlobalVariable *GToReplace, + GlobalVariable *GPool, + unsigned ElementIndex) { + ConstantInt *Zero = ConstantInt::get(Type::getInt32Ty(*Context), 0); + ConstantInt *Index = + ConstantInt::get(Type::getInt32Ty(*Context), ElementIndex); + SmallVector Indices; + Indices.push_back(Zero); + Indices.push_back(Index); + + // Need to save a temporary copy of each use list because we remove uses + // as we replace them. + SmallVector UsersList; + for (User *CurrentUser : GToReplace->users()) + UsersList.push_back(CurrentUser); + + for (User *CurrentUser : UsersList) { + Instruction *UseInstruction = dyn_cast(CurrentUser); + + // The user is a valid instruction. + if (UseInstruction) { + // GEP instructions cannot be added before PHI nodes. + if (PHINode *UsePHI = dyn_cast(UseInstruction)) { + Constant *ConstGEP = ConstantExpr::getInBoundsGetElementPtr( + PooledStructType, GPool, Indices); + UsePHI->replaceUsesOfWith(GToReplace, ConstGEP); + continue; + } + + GetElementPtrInst *GEPInst = + GetElementPtrInst::Create(PooledStructType, GPool, Indices); + GEPInst->insertBefore(UseInstruction); + + LLVM_DEBUG(dbgs() << "Inserting GEP before:\n"); + LLVM_DEBUG(UseInstruction->dump()); + + LLVM_DEBUG(dbgs() << "Replacing this global:\n"); + LLVM_DEBUG(GToReplace->dump()); + LLVM_DEBUG(dbgs() << "with this:\n"); + LLVM_DEBUG(GEPInst->dump()); + + // After the GEP is inserted the GV can be replaced. + CurrentUser->replaceUsesOfWith(GToReplace, GEPInst); + continue; + } + + Constant *ConstGEP = ConstantExpr::getInBoundsGetElementPtr( + PooledStructType, GPool, Indices); + Constant *UserConstant = dyn_cast(CurrentUser); + + // At this point we expect that the user is either an instruction or a + // constant. + assert(UserConstant && + "Expected the user to be an instruction or a constant."); + + // We cannot replace operands in globals so we ignore those. + if (dyn_cast(UserConstant)) + continue; + + // The user was not found so it must have been replaced earlier. + if (!userHasOperand(UserConstant, GToReplace)) + continue; + + UserConstant->handleOperandChange(GToReplace, ConstGEP); + } +} + +} // namespace + +char PPCMergeStringPool::ID = 0; + +INITIALIZE_PASS(PPCMergeStringPool, DEBUG_TYPE, "PPC Merge String Pool", false, + false) + +ModulePass *llvm::createPPCMergeStringPoolPass() { + return new PPCMergeStringPool(); +} diff --git a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp --- a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp +++ b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp @@ -100,6 +100,11 @@ cl::desc("Expand eligible cr-logical binary ops to branches"), cl::init(true), cl::Hidden); +static cl::opt MergeStringPool( + "ppc-merge-string-pool", + cl::desc("Merge all of the strings in a module into one pool"), + cl::init(true), cl::Hidden); + static cl::opt EnablePPCGenScalarMASSEntries( "enable-ppc-gen-scalar-mass", cl::init(false), cl::desc("Enable lowering math functions to their corresponding MASS " @@ -137,6 +142,7 @@ initializeGlobalISel(PR); initializePPCCTRLoopsPass(PR); initializePPCDAGToDAGISelPass(PR); + initializePPCMergeStringPoolPass(PR); } static bool isLittleEndianTriple(const Triple &T) { @@ -484,6 +490,9 @@ } bool PPCPassConfig::addPreISel() { + if (MergeStringPool && getOptLevel() != CodeGenOpt::None) + addPass(createPPCMergeStringPoolPass()); + if (!DisableInstrFormPrep && getOptLevel() != CodeGenOpt::None) addPass(createPPCLoopInstrFormPrepPass(getPPCTargetMachine())); diff --git a/llvm/test/CodeGen/PowerPC/O3-pipeline.ll b/llvm/test/CodeGen/PowerPC/O3-pipeline.ll --- a/llvm/test/CodeGen/PowerPC/O3-pipeline.ll +++ b/llvm/test/CodeGen/PowerPC/O3-pipeline.ll @@ -71,6 +71,9 @@ ; CHECK-NEXT: CodeGen Prepare ; CHECK-NEXT: Dominator Tree Construction ; CHECK-NEXT: Exception handling preparation +; CHECK-NEXT: PPC Merge String Pool +; CHECK-NEXT: FunctionPass Manager +; CHECK-NEXT: Dominator Tree Construction ; CHECK-NEXT: Natural Loop Information ; CHECK-NEXT: Scalar Evolution Analysis ; CHECK-NEXT: Prepare loop for ppc preferred instruction forms diff --git a/llvm/test/CodeGen/PowerPC/PR35812-neg-cmpxchg.ll b/llvm/test/CodeGen/PowerPC/PR35812-neg-cmpxchg.ll --- a/llvm/test/CodeGen/PowerPC/PR35812-neg-cmpxchg.ll +++ b/llvm/test/CodeGen/PowerPC/PR35812-neg-cmpxchg.ll @@ -39,19 +39,21 @@ ; CHECK-NEXT: cmplwi 3, 234 ; CHECK-NEXT: bne 0, .LBB0_7 ; CHECK-NEXT: # %bb.5: # %L.B0001 -; CHECK-NEXT: addis 3, 2, .Lstr.2@toc@ha -; CHECK-NEXT: addi 3, 3, .Lstr.2@toc@l +; CHECK-NEXT: addis 3, 2, .L__ModuleStringPool@toc@ha +; CHECK-NEXT: addi 3, 3, .L__ModuleStringPool@toc@l ; CHECK-NEXT: bl puts ; CHECK-NEXT: nop ; CHECK-NEXT: li 3, 0 ; CHECK-NEXT: b .LBB0_9 ; CHECK-NEXT: .LBB0_6: # %L.B0003 -; CHECK-NEXT: addis 3, 2, .Lstr@toc@ha -; CHECK-NEXT: addi 3, 3, .Lstr@toc@l +; CHECK-NEXT: addis 3, 2, .L__ModuleStringPool@toc@ha +; CHECK-NEXT: addi 3, 3, .L__ModuleStringPool@toc@l +; CHECK-NEXT: addi 3, 3, 7 ; CHECK-NEXT: b .LBB0_8 ; CHECK-NEXT: .LBB0_7: # %L.B0005 -; CHECK-NEXT: addis 3, 2, .Lstr.1@toc@ha -; CHECK-NEXT: addi 3, 3, .Lstr.1@toc@l +; CHECK-NEXT: addis 3, 2, .L__ModuleStringPool@toc@ha +; CHECK-NEXT: addi 3, 3, .L__ModuleStringPool@toc@l +; CHECK-NEXT: addi 3, 3, 53 ; CHECK-NEXT: .LBB0_8: # %L.B0003 ; CHECK-NEXT: bl puts ; CHECK-NEXT: nop @@ -105,19 +107,21 @@ ; CHECK-P7-NEXT: cmplwi 3, 234 ; CHECK-P7-NEXT: bne 0, .LBB0_7 ; CHECK-P7-NEXT: # %bb.5: # %L.B0001 -; CHECK-P7-NEXT: addis 3, 2, .Lstr.2@toc@ha -; CHECK-P7-NEXT: addi 3, 3, .Lstr.2@toc@l +; CHECK-P7-NEXT: addis 3, 2, .L__ModuleStringPool@toc@ha +; CHECK-P7-NEXT: addi 3, 3, .L__ModuleStringPool@toc@l ; CHECK-P7-NEXT: bl puts ; CHECK-P7-NEXT: nop ; CHECK-P7-NEXT: li 3, 0 ; CHECK-P7-NEXT: b .LBB0_9 ; CHECK-P7-NEXT: .LBB0_6: # %L.B0003 -; CHECK-P7-NEXT: addis 3, 2, .Lstr@toc@ha -; CHECK-P7-NEXT: addi 3, 3, .Lstr@toc@l +; CHECK-P7-NEXT: addis 3, 2, .L__ModuleStringPool@toc@ha +; CHECK-P7-NEXT: addi 3, 3, .L__ModuleStringPool@toc@l +; CHECK-P7-NEXT: addi 3, 3, 7 ; CHECK-P7-NEXT: b .LBB0_8 ; CHECK-P7-NEXT: .LBB0_7: # %L.B0005 -; CHECK-P7-NEXT: addis 3, 2, .Lstr.1@toc@ha -; CHECK-P7-NEXT: addi 3, 3, .Lstr.1@toc@l +; CHECK-P7-NEXT: addis 3, 2, .L__ModuleStringPool@toc@ha +; CHECK-P7-NEXT: addi 3, 3, .L__ModuleStringPool@toc@l +; CHECK-P7-NEXT: addi 3, 3, 53 ; CHECK-P7-NEXT: .LBB0_8: # %L.B0003 ; CHECK-P7-NEXT: bl puts ; CHECK-P7-NEXT: nop diff --git a/llvm/test/CodeGen/PowerPC/aix-xcoff-mergeable-str.ll b/llvm/test/CodeGen/PowerPC/aix-xcoff-mergeable-str.ll --- a/llvm/test/CodeGen/PowerPC/aix-xcoff-mergeable-str.ll +++ b/llvm/test/CodeGen/PowerPC/aix-xcoff-mergeable-str.ll @@ -4,12 +4,12 @@ ; tests for XCOFF object files. ; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mattr=-altivec -xcoff-traceback-table=false \ -; RUN: -mtriple powerpc-ibm-aix-xcoff -data-sections=false < %s | FileCheck %s +; RUN: -mtriple powerpc-ibm-aix-xcoff -data-sections=false -ppc-merge-string-pool=false < %s | FileCheck %s ; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mattr=-altivec -xcoff-traceback-table=false \ -; RUN: -mtriple powerpc64-ibm-aix-xcoff -data-sections=false < %s | FileCheck %s +; RUN: -mtriple powerpc64-ibm-aix-xcoff -data-sections=false -ppc-merge-string-pool=false < %s | FileCheck %s ; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mattr=-altivec -mtriple powerpc-ibm-aix-xcoff \ -; RUN: -xcoff-traceback-table=false -data-sections=false -filetype=obj -o %t.o < %s +; RUN: -xcoff-traceback-table=false -data-sections=false -ppc-merge-string-pool=false -filetype=obj -o %t.o < %s ; RUN: llvm-objdump -D %t.o | FileCheck --check-prefix=CHECKOBJ %s @magic16 = private unnamed_addr constant [4 x i16] [i16 264, i16 272, i16 213, i16 0], align 2 diff --git a/llvm/test/CodeGen/PowerPC/aix-xcoff-rodata.ll b/llvm/test/CodeGen/PowerPC/aix-xcoff-rodata.ll --- a/llvm/test/CodeGen/PowerPC/aix-xcoff-rodata.ll +++ b/llvm/test/CodeGen/PowerPC/aix-xcoff-rodata.ll @@ -1,16 +1,16 @@ -; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mtriple powerpc-ibm-aix-xcoff -data-sections=false < %s | \ +; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mtriple powerpc-ibm-aix-xcoff -data-sections=false -ppc-merge-string-pool=false < %s | \ ; RUN: FileCheck --check-prefixes=CHECK,CHECK32 %s -; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mtriple powerpc64-ibm-aix-xcoff -data-sections=false < %s | \ +; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mtriple powerpc64-ibm-aix-xcoff -data-sections=false -ppc-merge-string-pool=false < %s | \ ; RUN: FileCheck --check-prefixes=CHECK,CHECK64 %s -; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mtriple powerpc-ibm-aix-xcoff -data-sections=false \ +; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mtriple powerpc-ibm-aix-xcoff -data-sections=false -ppc-merge-string-pool=false \ ; RUN: -filetype=obj -o %t.o < %s ; RUN: llvm-readobj --section-headers --file-header %t.o | \ ; RUN: FileCheck --check-prefixes=OBJ,OBJ32 %s ; RUN: llvm-readobj --syms %t.o | FileCheck --check-prefixes=SYMS,SYMS32 %s ; RUN: llvm-objdump -D %t.o | FileCheck --check-prefix=DIS %s -; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mtriple powerpc64-ibm-aix-xcoff -data-sections=false \ +; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mtriple powerpc64-ibm-aix-xcoff -data-sections=false -ppc-merge-string-pool=false \ ; RUN: -filetype=obj -o %t64.o < %s ; RUN: llvm-readobj --section-headers --file-header %t64.o | \ ; RUN: FileCheck --check-prefixes=OBJ,OBJ64 %s diff --git a/llvm/test/CodeGen/PowerPC/licm-remat.ll b/llvm/test/CodeGen/PowerPC/licm-remat.ll --- a/llvm/test/CodeGen/PowerPC/licm-remat.ll +++ b/llvm/test/CodeGen/PowerPC/licm-remat.ll @@ -20,13 +20,10 @@ define linkonce_odr void @ZN6snappyDecompressor_(ptr %this, ptr %writer) { ; CHECK-LABEL: ZN6snappyDecompressor_: ; CHECK: # %bb.0: # %entry -; CHECK: addis 3, 2, _ZN6snappy8internalL8wordmaskE@toc@ha -; CHECK-DAG: addi 25, 3, _ZN6snappy8internalL8wordmaskE@toc@l -; CHECK-DAG: addis 5, 2, _ZN6snappy8internalL10char_tableE@toc@ha -; CHECK-DAG: addi 24, 5, _ZN6snappy8internalL10char_tableE@toc@l +; CHECK: addis 3, 2, .L__ModuleStringPool@toc@ha +; CHECK: addi 25, 3, .L__ModuleStringPool@toc@l ; CHECK: .LBB0_2: # %for.cond -; CHECK-NOT: addis {{[0-9]+}}, 2, _ZN6snappy8internalL8wordmaskE@toc@ha -; CHECK-NOT: addis {{[0-9]+}}, 2, _ZN6snappy8internalL10char_tableE@toc@ha +; CHECK-NOT: addis {{[0-9]+}}, 2, .L__ModuleStringPool@toc@ha ; CHECK: bctrl entry: %ip_limit_ = getelementptr inbounds %"class.snappy::SnappyDecompressor", ptr %this, i64 0, i32 2 diff --git a/llvm/test/CodeGen/PowerPC/mergeable-string-pool-large.ll b/llvm/test/CodeGen/PowerPC/mergeable-string-pool-large.ll new file mode 100644 --- /dev/null +++ b/llvm/test/CodeGen/PowerPC/mergeable-string-pool-large.ll @@ -0,0 +1,936 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2 +; RUN: llc -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff -mcpu=pwr8 \ +; RUN: -ppc-asm-full-reg-names < %s | FileCheck %s --check-prefixes=AIX32 +; RUN: llc -verify-machineinstrs -mtriple powerpc64-ibm-aix-xcoff -mcpu=pwr8 \ +; RUN: -ppc-asm-full-reg-names < %s | FileCheck %s --check-prefixes=AIX64 +; RUN: llc -verify-machineinstrs -mtriple powerpc64-unknown-linux -mcpu=pwr8 \ +; RUN: -ppc-asm-full-reg-names < %s | FileCheck %s --check-prefixes=LINUX64BE +; RUN: llc -verify-machineinstrs -mtriple powerpc64le-unknown-linux -mcpu=pwr8 \ +; RUN: -ppc-asm-full-reg-names < %s | FileCheck %s --check-prefixes=LINUX64LE + +@.str.1 = private unnamed_addr constant [12 x i8] c"str1_STRING\00", align 1 +@__const.IntArray0 = private unnamed_addr constant [7 x i32] [i32 5, i32 7, i32 9, i32 11, i32 17, i32 1235, i32 32], align 4 +@__const.IntArray1 = private unnamed_addr constant [14 x i64] [i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281], align 8 +@__const.IntArray2 = private unnamed_addr constant [14 x i64] [i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281], align 8 +@__const.IntArray3 = private unnamed_addr constant [20 x i64] [i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51], align 8 + + +;; Use this very large array to produce a very large string pool. +@__const.IntArray4 = private unnamed_addr constant [4400 x i64] [i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51, + i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67, i64 62, i64 81, i64 51], align 8 + +define dso_local signext i32 @str1() local_unnamed_addr #0 { +; AIX32-LABEL: str1: +; AIX32: # %bb.0: # %entry +; AIX32-NEXT: mflr r0 +; AIX32-NEXT: stwu r1, -64(r1) +; AIX32-NEXT: lwz r3, L..C0(r2) # @__ModuleStringPool +; AIX32-NEXT: stw r0, 72(r1) +; AIX32-NEXT: addi r3, r3, -29924 +; AIX32-NEXT: addis r3, r3, 1 +; AIX32-NEXT: bl .callee[PR] +; AIX32-NEXT: nop +; AIX32-NEXT: addi r1, r1, 64 +; AIX32-NEXT: lwz r0, 8(r1) +; AIX32-NEXT: mtlr r0 +; AIX32-NEXT: blr +; +; AIX64-LABEL: str1: +; AIX64: # %bb.0: # %entry +; AIX64-NEXT: mflr r0 +; AIX64-NEXT: stdu r1, -112(r1) +; AIX64-NEXT: ld r3, L..C0(r2) # @__ModuleStringPool +; AIX64-NEXT: li r4, 0 +; AIX64-NEXT: std r0, 128(r1) +; AIX64-NEXT: ori r4, r4, 35612 +; AIX64-NEXT: add r3, r3, r4 +; AIX64-NEXT: bl .callee[PR] +; AIX64-NEXT: nop +; AIX64-NEXT: addi r1, r1, 112 +; AIX64-NEXT: ld r0, 16(r1) +; AIX64-NEXT: mtlr r0 +; AIX64-NEXT: blr +; +; LINUX64BE-LABEL: str1: +; LINUX64BE: # %bb.0: # %entry +; LINUX64BE-NEXT: mflr r0 +; LINUX64BE-NEXT: stdu r1, -112(r1) +; LINUX64BE-NEXT: addis r3, r2, .L__ModuleStringPool@toc@ha +; LINUX64BE-NEXT: li r4, 0 +; LINUX64BE-NEXT: std r0, 128(r1) +; LINUX64BE-NEXT: addi r3, r3, .L__ModuleStringPool@toc@l +; LINUX64BE-NEXT: ori r4, r4, 35612 +; LINUX64BE-NEXT: add r3, r3, r4 +; LINUX64BE-NEXT: bl callee +; LINUX64BE-NEXT: nop +; LINUX64BE-NEXT: addi r1, r1, 112 +; LINUX64BE-NEXT: ld r0, 16(r1) +; LINUX64BE-NEXT: mtlr r0 +; LINUX64BE-NEXT: blr +; +; LINUX64LE-LABEL: str1: +; LINUX64LE: # %bb.0: # %entry +; LINUX64LE-NEXT: mflr r0 +; LINUX64LE-NEXT: stdu r1, -32(r1) +; LINUX64LE-NEXT: addis r3, r2, .L__ModuleStringPool@toc@ha +; LINUX64LE-NEXT: li r4, 0 +; LINUX64LE-NEXT: std r0, 48(r1) +; LINUX64LE-NEXT: addi r3, r3, .L__ModuleStringPool@toc@l +; LINUX64LE-NEXT: ori r4, r4, 35612 +; LINUX64LE-NEXT: add r3, r3, r4 +; LINUX64LE-NEXT: bl callee +; LINUX64LE-NEXT: nop +; LINUX64LE-NEXT: addi r1, r1, 32 +; LINUX64LE-NEXT: ld r0, 16(r1) +; LINUX64LE-NEXT: mtlr r0 +; LINUX64LE-NEXT: blr +entry: + %call = tail call signext i32 @callee(ptr noundef nonnull @.str.1) + ret i32 %call +} + +declare signext i32 @callee(ptr noundef) local_unnamed_addr +declare signext i32 @calleeInt(ptr noundef) local_unnamed_addr +declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) +declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) +declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) + +define dso_local signext i32 @array0() local_unnamed_addr #0 { +; AIX32-LABEL: array0: +; AIX32: # %bb.0: # %entry +; AIX32-NEXT: mflr r0 +; AIX32-NEXT: stwu r1, -96(r1) +; AIX32-NEXT: lwz r3, L..C0(r2) # @__ModuleStringPool +; AIX32-NEXT: lis r4, 0 +; AIX32-NEXT: stw r0, 104(r1) +; AIX32-NEXT: ori r5, r4, 35596 +; AIX32-NEXT: ori r4, r4, 35584 +; AIX32-NEXT: lxvw4x vs0, r3, r5 +; AIX32-NEXT: lxvw4x vs1, r3, r4 +; AIX32-NEXT: li r4, 12 +; AIX32-NEXT: addi r3, r1, 64 +; AIX32-NEXT: rlwimi r4, r3, 0, 30, 27 +; AIX32-NEXT: stxvw4x vs0, 0, r4 +; AIX32-NEXT: stxvw4x vs1, 0, r3 +; AIX32-NEXT: bl .calleeInt[PR] +; AIX32-NEXT: nop +; AIX32-NEXT: addi r1, r1, 96 +; AIX32-NEXT: lwz r0, 8(r1) +; AIX32-NEXT: mtlr r0 +; AIX32-NEXT: blr +; +; AIX64-LABEL: array0: +; AIX64: # %bb.0: # %entry +; AIX64-NEXT: mflr r0 +; AIX64-NEXT: stdu r1, -144(r1) +; AIX64-NEXT: ld r3, L..C0(r2) # @__ModuleStringPool +; AIX64-NEXT: li r4, 0 +; AIX64-NEXT: std r0, 160(r1) +; AIX64-NEXT: ori r5, r4, 35596 +; AIX64-NEXT: ori r4, r4, 35584 +; AIX64-NEXT: lxvw4x vs0, r3, r5 +; AIX64-NEXT: lxvw4x vs1, r3, r4 +; AIX64-NEXT: addi r4, r1, 124 +; AIX64-NEXT: addi r3, r1, 112 +; AIX64-NEXT: stxvw4x vs0, 0, r4 +; AIX64-NEXT: stxvw4x vs1, 0, r3 +; AIX64-NEXT: bl .calleeInt[PR] +; AIX64-NEXT: nop +; AIX64-NEXT: addi r1, r1, 144 +; AIX64-NEXT: ld r0, 16(r1) +; AIX64-NEXT: mtlr r0 +; AIX64-NEXT: blr +; +; LINUX64BE-LABEL: array0: +; LINUX64BE: # %bb.0: # %entry +; LINUX64BE-NEXT: mflr r0 +; LINUX64BE-NEXT: stdu r1, -144(r1) +; LINUX64BE-NEXT: addis r3, r2, .L__ModuleStringPool@toc@ha +; LINUX64BE-NEXT: li r4, 0 +; LINUX64BE-NEXT: std r0, 160(r1) +; LINUX64BE-NEXT: addi r3, r3, .L__ModuleStringPool@toc@l +; LINUX64BE-NEXT: ori r5, r4, 35596 +; LINUX64BE-NEXT: ori r4, r4, 35584 +; LINUX64BE-NEXT: lxvw4x vs0, r3, r5 +; LINUX64BE-NEXT: lxvw4x vs1, r3, r4 +; LINUX64BE-NEXT: addi r4, r1, 124 +; LINUX64BE-NEXT: addi r3, r1, 112 +; LINUX64BE-NEXT: stxvw4x vs0, 0, r4 +; LINUX64BE-NEXT: stxvw4x vs1, 0, r3 +; LINUX64BE-NEXT: bl calleeInt +; LINUX64BE-NEXT: nop +; LINUX64BE-NEXT: addi r1, r1, 144 +; LINUX64BE-NEXT: ld r0, 16(r1) +; LINUX64BE-NEXT: mtlr r0 +; LINUX64BE-NEXT: blr +; +; LINUX64LE-LABEL: array0: +; LINUX64LE: # %bb.0: # %entry +; LINUX64LE-NEXT: mflr r0 +; LINUX64LE-NEXT: stdu r1, -64(r1) +; LINUX64LE-NEXT: addis r3, r2, .L__ModuleStringPool@toc@ha +; LINUX64LE-NEXT: li r4, 0 +; LINUX64LE-NEXT: std r0, 80(r1) +; LINUX64LE-NEXT: addi r3, r3, .L__ModuleStringPool@toc@l +; LINUX64LE-NEXT: ori r5, r4, 35596 +; LINUX64LE-NEXT: ori r4, r4, 35584 +; LINUX64LE-NEXT: lxvd2x vs0, r3, r5 +; LINUX64LE-NEXT: lxvd2x vs1, r3, r4 +; LINUX64LE-NEXT: addi r4, r1, 44 +; LINUX64LE-NEXT: addi r3, r1, 32 +; LINUX64LE-NEXT: stxvd2x vs0, 0, r4 +; LINUX64LE-NEXT: stxvd2x vs1, 0, r3 +; LINUX64LE-NEXT: bl calleeInt +; LINUX64LE-NEXT: nop +; LINUX64LE-NEXT: addi r1, r1, 64 +; LINUX64LE-NEXT: ld r0, 16(r1) +; LINUX64LE-NEXT: mtlr r0 +; LINUX64LE-NEXT: blr +entry: + %IntArray = alloca [7 x i32], align 4 + call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %IntArray) + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(28) %IntArray, ptr noundef nonnull align 4 dereferenceable(28) @__const.IntArray0, i64 28, i1 false) + %call = call signext i32 @calleeInt(ptr noundef nonnull %IntArray) + call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %IntArray) + ret i32 %call +} + +define dso_local signext i32 @array1() local_unnamed_addr #0 { +; AIX32-LABEL: array1: +; AIX32: # %bb.0: # %entry +; AIX32-NEXT: mflr r0 +; AIX32-NEXT: stwu r1, -176(r1) +; AIX32-NEXT: lwz r4, L..C0(r2) # @__ModuleStringPool +; AIX32-NEXT: li r5, 96 +; AIX32-NEXT: li r6, 80 +; AIX32-NEXT: li r7, 64 +; AIX32-NEXT: li r8, 48 +; AIX32-NEXT: li r9, 32 +; AIX32-NEXT: li r10, 16 +; AIX32-NEXT: addi r3, r1, 64 +; AIX32-NEXT: stw r0, 184(r1) +; AIX32-NEXT: lxvw4x vs0, r4, r5 +; AIX32-NEXT: lxvw4x vs1, r4, r6 +; AIX32-NEXT: lxvw4x vs2, r4, r7 +; AIX32-NEXT: lxvw4x vs3, r4, r8 +; AIX32-NEXT: lxvw4x vs4, r4, r9 +; AIX32-NEXT: lxvw4x vs5, r4, r10 +; AIX32-NEXT: lxvw4x vs6, 0, r4 +; AIX32-NEXT: stxvw4x vs0, r3, r5 +; AIX32-NEXT: stxvw4x vs1, r3, r6 +; AIX32-NEXT: stxvw4x vs2, r3, r7 +; AIX32-NEXT: stxvw4x vs3, r3, r8 +; AIX32-NEXT: stxvw4x vs4, r3, r9 +; AIX32-NEXT: stxvw4x vs5, r3, r10 +; AIX32-NEXT: stxvw4x vs6, 0, r3 +; AIX32-NEXT: bl .calleeInt[PR] +; AIX32-NEXT: nop +; AIX32-NEXT: addi r1, r1, 176 +; AIX32-NEXT: lwz r0, 8(r1) +; AIX32-NEXT: mtlr r0 +; AIX32-NEXT: blr +; +; AIX64-LABEL: array1: +; AIX64: # %bb.0: # %entry +; AIX64-NEXT: mflr r0 +; AIX64-NEXT: stdu r1, -224(r1) +; AIX64-NEXT: ld r4, L..C0(r2) # @__ModuleStringPool +; AIX64-NEXT: li r5, 96 +; AIX64-NEXT: li r6, 80 +; AIX64-NEXT: li r7, 64 +; AIX64-NEXT: li r8, 48 +; AIX64-NEXT: li r9, 32 +; AIX64-NEXT: li r10, 16 +; AIX64-NEXT: addi r3, r1, 112 +; AIX64-NEXT: std r0, 240(r1) +; AIX64-NEXT: lxvw4x vs0, r4, r5 +; AIX64-NEXT: lxvw4x vs1, r4, r6 +; AIX64-NEXT: lxvw4x vs2, r4, r7 +; AIX64-NEXT: lxvw4x vs3, r4, r8 +; AIX64-NEXT: lxvw4x vs4, r4, r9 +; AIX64-NEXT: lxvw4x vs5, r4, r10 +; AIX64-NEXT: lxvw4x vs6, 0, r4 +; AIX64-NEXT: stxvw4x vs0, r3, r5 +; AIX64-NEXT: stxvw4x vs1, r3, r6 +; AIX64-NEXT: stxvw4x vs2, r3, r7 +; AIX64-NEXT: stxvw4x vs3, r3, r8 +; AIX64-NEXT: stxvw4x vs4, r3, r9 +; AIX64-NEXT: stxvw4x vs5, r3, r10 +; AIX64-NEXT: stxvw4x vs6, 0, r3 +; AIX64-NEXT: bl .calleeInt[PR] +; AIX64-NEXT: nop +; AIX64-NEXT: addi r1, r1, 224 +; AIX64-NEXT: ld r0, 16(r1) +; AIX64-NEXT: mtlr r0 +; AIX64-NEXT: blr +; +; LINUX64BE-LABEL: array1: +; LINUX64BE: # %bb.0: # %entry +; LINUX64BE-NEXT: mflr r0 +; LINUX64BE-NEXT: stdu r1, -224(r1) +; LINUX64BE-NEXT: addis r3, r2, .L__ModuleStringPool@toc@ha +; LINUX64BE-NEXT: li r4, 96 +; LINUX64BE-NEXT: li r6, 80 +; LINUX64BE-NEXT: li r7, 64 +; LINUX64BE-NEXT: li r8, 48 +; LINUX64BE-NEXT: li r9, 32 +; LINUX64BE-NEXT: li r10, 16 +; LINUX64BE-NEXT: addi r5, r3, .L__ModuleStringPool@toc@l +; LINUX64BE-NEXT: addi r3, r1, 112 +; LINUX64BE-NEXT: std r0, 240(r1) +; LINUX64BE-NEXT: lxvw4x vs0, r5, r4 +; LINUX64BE-NEXT: lxvw4x vs1, r5, r6 +; LINUX64BE-NEXT: lxvw4x vs2, r5, r7 +; LINUX64BE-NEXT: lxvw4x vs3, r5, r8 +; LINUX64BE-NEXT: lxvw4x vs4, r5, r9 +; LINUX64BE-NEXT: lxvw4x vs5, r5, r10 +; LINUX64BE-NEXT: lxvw4x vs6, 0, r5 +; LINUX64BE-NEXT: stxvw4x vs0, r3, r4 +; LINUX64BE-NEXT: stxvw4x vs1, r3, r6 +; LINUX64BE-NEXT: stxvw4x vs2, r3, r7 +; LINUX64BE-NEXT: stxvw4x vs3, r3, r8 +; LINUX64BE-NEXT: stxvw4x vs4, r3, r9 +; LINUX64BE-NEXT: stxvw4x vs5, r3, r10 +; LINUX64BE-NEXT: stxvw4x vs6, 0, r3 +; LINUX64BE-NEXT: bl calleeInt +; LINUX64BE-NEXT: nop +; LINUX64BE-NEXT: addi r1, r1, 224 +; LINUX64BE-NEXT: ld r0, 16(r1) +; LINUX64BE-NEXT: mtlr r0 +; LINUX64BE-NEXT: blr +; +; LINUX64LE-LABEL: array1: +; LINUX64LE: # %bb.0: # %entry +; LINUX64LE-NEXT: mflr r0 +; LINUX64LE-NEXT: stdu r1, -144(r1) +; LINUX64LE-NEXT: addis r3, r2, .L__ModuleStringPool@toc@ha +; LINUX64LE-NEXT: li r4, 96 +; LINUX64LE-NEXT: li r6, 80 +; LINUX64LE-NEXT: li r7, 64 +; LINUX64LE-NEXT: li r8, 48 +; LINUX64LE-NEXT: li r9, 32 +; LINUX64LE-NEXT: li r10, 16 +; LINUX64LE-NEXT: addi r5, r3, .L__ModuleStringPool@toc@l +; LINUX64LE-NEXT: addi r3, r1, 32 +; LINUX64LE-NEXT: std r0, 160(r1) +; LINUX64LE-NEXT: lxvd2x vs0, r5, r4 +; LINUX64LE-NEXT: lxvd2x vs1, r5, r6 +; LINUX64LE-NEXT: lxvd2x vs2, r5, r7 +; LINUX64LE-NEXT: lxvd2x vs3, r5, r8 +; LINUX64LE-NEXT: lxvd2x vs4, r5, r9 +; LINUX64LE-NEXT: lxvd2x vs5, r5, r10 +; LINUX64LE-NEXT: lxvd2x vs6, 0, r5 +; LINUX64LE-NEXT: stxvd2x vs0, r3, r4 +; LINUX64LE-NEXT: stxvd2x vs1, r3, r6 +; LINUX64LE-NEXT: stxvd2x vs2, r3, r7 +; LINUX64LE-NEXT: stxvd2x vs3, r3, r8 +; LINUX64LE-NEXT: stxvd2x vs4, r3, r9 +; LINUX64LE-NEXT: stxvd2x vs5, r3, r10 +; LINUX64LE-NEXT: stxvd2x vs6, 0, r3 +; LINUX64LE-NEXT: bl calleeInt +; LINUX64LE-NEXT: nop +; LINUX64LE-NEXT: addi r1, r1, 144 +; LINUX64LE-NEXT: ld r0, 16(r1) +; LINUX64LE-NEXT: mtlr r0 +; LINUX64LE-NEXT: blr +entry: + %IntArray = alloca [14 x i64], align 8 + call void @llvm.lifetime.start.p0(i64 112, ptr nonnull %IntArray) + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(112) %IntArray, ptr noundef nonnull align 8 dereferenceable(112) @__const.IntArray1, i64 112, i1 false) + %call = call signext i32 @calleeInt(ptr noundef nonnull %IntArray) + call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %IntArray) + ret i32 %call +} + +define dso_local signext i32 @array2() local_unnamed_addr #0 { +; AIX32-LABEL: array2: +; AIX32: # %bb.0: # %entry +; AIX32-NEXT: mflr r0 +; AIX32-NEXT: stwu r1, -176(r1) +; AIX32-NEXT: lwz r4, L..C0(r2) # @__ModuleStringPool +; AIX32-NEXT: li r3, 208 +; AIX32-NEXT: li r5, 192 +; AIX32-NEXT: li r6, 176 +; AIX32-NEXT: li r7, 160 +; AIX32-NEXT: li r8, 144 +; AIX32-NEXT: stw r0, 184(r1) +; AIX32-NEXT: lxvw4x vs0, r4, r3 +; AIX32-NEXT: lxvw4x vs1, r4, r5 +; AIX32-NEXT: li r5, 96 +; AIX32-NEXT: addi r3, r1, 64 +; AIX32-NEXT: lxvw4x vs2, r4, r6 +; AIX32-NEXT: lxvw4x vs3, r4, r7 +; AIX32-NEXT: li r6, 128 +; AIX32-NEXT: li r7, 112 +; AIX32-NEXT: lxvw4x vs4, r4, r8 +; AIX32-NEXT: lxvw4x vs5, r4, r6 +; AIX32-NEXT: stxvw4x vs0, r3, r5 +; AIX32-NEXT: lxvw4x vs0, r4, r7 +; AIX32-NEXT: li r4, 80 +; AIX32-NEXT: li r5, 64 +; AIX32-NEXT: stxvw4x vs1, r3, r4 +; AIX32-NEXT: li r4, 48 +; AIX32-NEXT: stxvw4x vs2, r3, r5 +; AIX32-NEXT: li r5, 32 +; AIX32-NEXT: stxvw4x vs3, r3, r4 +; AIX32-NEXT: li r4, 16 +; AIX32-NEXT: stxvw4x vs4, r3, r5 +; AIX32-NEXT: stxvw4x vs5, r3, r4 +; AIX32-NEXT: stxvw4x vs0, 0, r3 +; AIX32-NEXT: bl .calleeInt[PR] +; AIX32-NEXT: nop +; AIX32-NEXT: addi r1, r1, 176 +; AIX32-NEXT: lwz r0, 8(r1) +; AIX32-NEXT: mtlr r0 +; AIX32-NEXT: blr +; +; AIX64-LABEL: array2: +; AIX64: # %bb.0: # %entry +; AIX64-NEXT: mflr r0 +; AIX64-NEXT: stdu r1, -224(r1) +; AIX64-NEXT: ld r4, L..C0(r2) # @__ModuleStringPool +; AIX64-NEXT: li r3, 208 +; AIX64-NEXT: li r5, 192 +; AIX64-NEXT: li r6, 176 +; AIX64-NEXT: li r7, 160 +; AIX64-NEXT: li r8, 144 +; AIX64-NEXT: std r0, 240(r1) +; AIX64-NEXT: lxvw4x vs0, r4, r3 +; AIX64-NEXT: lxvw4x vs1, r4, r5 +; AIX64-NEXT: li r5, 96 +; AIX64-NEXT: addi r3, r1, 112 +; AIX64-NEXT: lxvw4x vs2, r4, r6 +; AIX64-NEXT: lxvw4x vs3, r4, r7 +; AIX64-NEXT: li r6, 128 +; AIX64-NEXT: li r7, 112 +; AIX64-NEXT: lxvw4x vs4, r4, r8 +; AIX64-NEXT: lxvw4x vs5, r4, r6 +; AIX64-NEXT: stxvw4x vs0, r3, r5 +; AIX64-NEXT: lxvw4x vs0, r4, r7 +; AIX64-NEXT: li r4, 80 +; AIX64-NEXT: li r5, 64 +; AIX64-NEXT: stxvw4x vs1, r3, r4 +; AIX64-NEXT: li r4, 48 +; AIX64-NEXT: stxvw4x vs2, r3, r5 +; AIX64-NEXT: li r5, 32 +; AIX64-NEXT: stxvw4x vs3, r3, r4 +; AIX64-NEXT: li r4, 16 +; AIX64-NEXT: stxvw4x vs4, r3, r5 +; AIX64-NEXT: stxvw4x vs5, r3, r4 +; AIX64-NEXT: stxvw4x vs0, 0, r3 +; AIX64-NEXT: bl .calleeInt[PR] +; AIX64-NEXT: nop +; AIX64-NEXT: addi r1, r1, 224 +; AIX64-NEXT: ld r0, 16(r1) +; AIX64-NEXT: mtlr r0 +; AIX64-NEXT: blr +; +; LINUX64BE-LABEL: array2: +; LINUX64BE: # %bb.0: # %entry +; LINUX64BE-NEXT: mflr r0 +; LINUX64BE-NEXT: stdu r1, -224(r1) +; LINUX64BE-NEXT: addis r3, r2, .L__ModuleStringPool@toc@ha +; LINUX64BE-NEXT: li r4, 208 +; LINUX64BE-NEXT: li r6, 176 +; LINUX64BE-NEXT: li r7, 144 +; LINUX64BE-NEXT: std r0, 240(r1) +; LINUX64BE-NEXT: addi r5, r3, .L__ModuleStringPool@toc@l +; LINUX64BE-NEXT: li r3, 192 +; LINUX64BE-NEXT: lxvw4x vs0, r5, r4 +; LINUX64BE-NEXT: li r4, 160 +; LINUX64BE-NEXT: lxvw4x vs1, r5, r3 +; LINUX64BE-NEXT: addi r3, r1, 112 +; LINUX64BE-NEXT: lxvw4x vs2, r5, r6 +; LINUX64BE-NEXT: li r6, 96 +; LINUX64BE-NEXT: lxvw4x vs3, r5, r4 +; LINUX64BE-NEXT: li r4, 128 +; LINUX64BE-NEXT: lxvw4x vs4, r5, r7 +; LINUX64BE-NEXT: li r7, 112 +; LINUX64BE-NEXT: lxvw4x vs5, r5, r4 +; LINUX64BE-NEXT: li r4, 80 +; LINUX64BE-NEXT: stxvw4x vs0, r3, r6 +; LINUX64BE-NEXT: lxvw4x vs0, r5, r7 +; LINUX64BE-NEXT: li r5, 64 +; LINUX64BE-NEXT: stxvw4x vs1, r3, r4 +; LINUX64BE-NEXT: li r4, 48 +; LINUX64BE-NEXT: stxvw4x vs2, r3, r5 +; LINUX64BE-NEXT: li r5, 32 +; LINUX64BE-NEXT: stxvw4x vs3, r3, r4 +; LINUX64BE-NEXT: li r4, 16 +; LINUX64BE-NEXT: stxvw4x vs4, r3, r5 +; LINUX64BE-NEXT: stxvw4x vs5, r3, r4 +; LINUX64BE-NEXT: stxvw4x vs0, 0, r3 +; LINUX64BE-NEXT: bl calleeInt +; LINUX64BE-NEXT: nop +; LINUX64BE-NEXT: addi r1, r1, 224 +; LINUX64BE-NEXT: ld r0, 16(r1) +; LINUX64BE-NEXT: mtlr r0 +; LINUX64BE-NEXT: blr +; +; LINUX64LE-LABEL: array2: +; LINUX64LE: # %bb.0: # %entry +; LINUX64LE-NEXT: mflr r0 +; LINUX64LE-NEXT: stdu r1, -144(r1) +; LINUX64LE-NEXT: addis r3, r2, .L__ModuleStringPool@toc@ha +; LINUX64LE-NEXT: li r4, 208 +; LINUX64LE-NEXT: li r6, 176 +; LINUX64LE-NEXT: li r7, 144 +; LINUX64LE-NEXT: std r0, 160(r1) +; LINUX64LE-NEXT: addi r5, r3, .L__ModuleStringPool@toc@l +; LINUX64LE-NEXT: li r3, 192 +; LINUX64LE-NEXT: lxvd2x vs0, r5, r4 +; LINUX64LE-NEXT: li r4, 160 +; LINUX64LE-NEXT: lxvd2x vs1, r5, r3 +; LINUX64LE-NEXT: addi r3, r1, 32 +; LINUX64LE-NEXT: lxvd2x vs2, r5, r6 +; LINUX64LE-NEXT: li r6, 96 +; LINUX64LE-NEXT: lxvd2x vs3, r5, r4 +; LINUX64LE-NEXT: li r4, 128 +; LINUX64LE-NEXT: lxvd2x vs4, r5, r7 +; LINUX64LE-NEXT: li r7, 112 +; LINUX64LE-NEXT: lxvd2x vs5, r5, r4 +; LINUX64LE-NEXT: li r4, 80 +; LINUX64LE-NEXT: stxvd2x vs0, r3, r6 +; LINUX64LE-NEXT: lxvd2x vs0, r5, r7 +; LINUX64LE-NEXT: li r5, 64 +; LINUX64LE-NEXT: stxvd2x vs1, r3, r4 +; LINUX64LE-NEXT: li r4, 48 +; LINUX64LE-NEXT: stxvd2x vs2, r3, r5 +; LINUX64LE-NEXT: li r5, 32 +; LINUX64LE-NEXT: stxvd2x vs3, r3, r4 +; LINUX64LE-NEXT: li r4, 16 +; LINUX64LE-NEXT: stxvd2x vs4, r3, r5 +; LINUX64LE-NEXT: stxvd2x vs5, r3, r4 +; LINUX64LE-NEXT: stxvd2x vs0, 0, r3 +; LINUX64LE-NEXT: bl calleeInt +; LINUX64LE-NEXT: nop +; LINUX64LE-NEXT: addi r1, r1, 144 +; LINUX64LE-NEXT: ld r0, 16(r1) +; LINUX64LE-NEXT: mtlr r0 +; LINUX64LE-NEXT: blr +entry: + %IntArray = alloca [14 x i64], align 8 + call void @llvm.lifetime.start.p0(i64 112, ptr nonnull %IntArray) + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(112) %IntArray, ptr noundef nonnull align 8 dereferenceable(112) @__const.IntArray2, i64 112, i1 false) + %call = call signext i32 @calleeInt(ptr noundef nonnull %IntArray) + call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %IntArray) + ret i32 %call +} + +define dso_local signext i32 @array3() local_unnamed_addr #0 { +; AIX32-LABEL: array3: +; AIX32: # %bb.0: # %entry +; AIX32-NEXT: mflr r0 +; AIX32-NEXT: stwu r1, -224(r1) +; AIX32-NEXT: lwz r3, L..C0(r2) # @__ModuleStringPool +; AIX32-NEXT: stw r0, 232(r1) +; AIX32-NEXT: stw r31, 220(r1) # 4-byte Folded Spill +; AIX32-NEXT: addi r31, r1, 56 +; AIX32-NEXT: li r5, 160 +; AIX32-NEXT: addi r4, r3, 224 +; AIX32-NEXT: mr r3, r31 +; AIX32-NEXT: bl .___memmove[PR] +; AIX32-NEXT: nop +; AIX32-NEXT: mr r3, r31 +; AIX32-NEXT: bl .calleeInt[PR] +; AIX32-NEXT: nop +; AIX32-NEXT: lwz r31, 220(r1) # 4-byte Folded Reload +; AIX32-NEXT: addi r1, r1, 224 +; AIX32-NEXT: lwz r0, 8(r1) +; AIX32-NEXT: mtlr r0 +; AIX32-NEXT: blr +; +; AIX64-LABEL: array3: +; AIX64: # %bb.0: # %entry +; AIX64-NEXT: mflr r0 +; AIX64-NEXT: stdu r1, -288(r1) +; AIX64-NEXT: ld r3, L..C0(r2) # @__ModuleStringPool +; AIX64-NEXT: std r0, 304(r1) +; AIX64-NEXT: std r31, 280(r1) # 8-byte Folded Spill +; AIX64-NEXT: addi r31, r1, 120 +; AIX64-NEXT: li r5, 160 +; AIX64-NEXT: addi r4, r3, 224 +; AIX64-NEXT: mr r3, r31 +; AIX64-NEXT: bl .___memmove64[PR] +; AIX64-NEXT: nop +; AIX64-NEXT: mr r3, r31 +; AIX64-NEXT: bl .calleeInt[PR] +; AIX64-NEXT: nop +; AIX64-NEXT: ld r31, 280(r1) # 8-byte Folded Reload +; AIX64-NEXT: addi r1, r1, 288 +; AIX64-NEXT: ld r0, 16(r1) +; AIX64-NEXT: mtlr r0 +; AIX64-NEXT: blr +; +; LINUX64BE-LABEL: array3: +; LINUX64BE: # %bb.0: # %entry +; LINUX64BE-NEXT: mflr r0 +; LINUX64BE-NEXT: stdu r1, -288(r1) +; LINUX64BE-NEXT: addis r3, r2, .L__ModuleStringPool@toc@ha +; LINUX64BE-NEXT: std r0, 304(r1) +; LINUX64BE-NEXT: std r30, 272(r1) # 8-byte Folded Spill +; LINUX64BE-NEXT: addi r30, r1, 112 +; LINUX64BE-NEXT: li r5, 160 +; LINUX64BE-NEXT: addi r3, r3, .L__ModuleStringPool@toc@l +; LINUX64BE-NEXT: addi r4, r3, 224 +; LINUX64BE-NEXT: mr r3, r30 +; LINUX64BE-NEXT: bl memcpy +; LINUX64BE-NEXT: nop +; LINUX64BE-NEXT: mr r3, r30 +; LINUX64BE-NEXT: bl calleeInt +; LINUX64BE-NEXT: nop +; LINUX64BE-NEXT: ld r30, 272(r1) # 8-byte Folded Reload +; LINUX64BE-NEXT: addi r1, r1, 288 +; LINUX64BE-NEXT: ld r0, 16(r1) +; LINUX64BE-NEXT: mtlr r0 +; LINUX64BE-NEXT: blr +; +; LINUX64LE-LABEL: array3: +; LINUX64LE: # %bb.0: # %entry +; LINUX64LE-NEXT: mflr r0 +; LINUX64LE-NEXT: std r30, -16(r1) # 8-byte Folded Spill +; LINUX64LE-NEXT: stdu r1, -208(r1) +; LINUX64LE-NEXT: addis r3, r2, .L__ModuleStringPool@toc@ha +; LINUX64LE-NEXT: addi r30, r1, 32 +; LINUX64LE-NEXT: li r5, 160 +; LINUX64LE-NEXT: std r0, 224(r1) +; LINUX64LE-NEXT: addi r3, r3, .L__ModuleStringPool@toc@l +; LINUX64LE-NEXT: addi r4, r3, 224 +; LINUX64LE-NEXT: mr r3, r30 +; LINUX64LE-NEXT: bl memcpy +; LINUX64LE-NEXT: nop +; LINUX64LE-NEXT: mr r3, r30 +; LINUX64LE-NEXT: bl calleeInt +; LINUX64LE-NEXT: nop +; LINUX64LE-NEXT: addi r1, r1, 208 +; LINUX64LE-NEXT: ld r0, 16(r1) +; LINUX64LE-NEXT: ld r30, -16(r1) # 8-byte Folded Reload +; LINUX64LE-NEXT: mtlr r0 +; LINUX64LE-NEXT: blr +entry: + %IntArray = alloca [20 x i64], align 8 + call void @llvm.lifetime.start.p0(i64 160, ptr nonnull %IntArray) + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(160) %IntArray, ptr noundef nonnull align 8 dereferenceable(160) @__const.IntArray3, i64 160, i1 false) + %call = call signext i32 @calleeInt(ptr noundef nonnull %IntArray) + call void @llvm.lifetime.end.p0(i64 160, ptr nonnull %IntArray) + ret i32 %call +} + +define dso_local signext i32 @array4() local_unnamed_addr #0 { +; AIX32-LABEL: array4: +; AIX32: # %bb.0: # %entry +; AIX32-NEXT: mflr r0 +; AIX32-NEXT: stwu r1, -384(r1) +; AIX32-NEXT: lwz r3, L..C0(r2) # @__ModuleStringPool +; AIX32-NEXT: stw r0, 392(r1) +; AIX32-NEXT: stw r31, 380(r1) # 4-byte Folded Spill +; AIX32-NEXT: addi r31, r1, 56 +; AIX32-NEXT: li r5, 320 +; AIX32-NEXT: addi r4, r3, 384 +; AIX32-NEXT: mr r3, r31 +; AIX32-NEXT: bl .___memmove[PR] +; AIX32-NEXT: nop +; AIX32-NEXT: mr r3, r31 +; AIX32-NEXT: bl .calleeInt[PR] +; AIX32-NEXT: nop +; AIX32-NEXT: lwz r31, 380(r1) # 4-byte Folded Reload +; AIX32-NEXT: addi r1, r1, 384 +; AIX32-NEXT: lwz r0, 8(r1) +; AIX32-NEXT: mtlr r0 +; AIX32-NEXT: blr +; +; AIX64-LABEL: array4: +; AIX64: # %bb.0: # %entry +; AIX64-NEXT: mflr r0 +; AIX64-NEXT: stdu r1, -448(r1) +; AIX64-NEXT: ld r3, L..C0(r2) # @__ModuleStringPool +; AIX64-NEXT: std r0, 464(r1) +; AIX64-NEXT: std r31, 440(r1) # 8-byte Folded Spill +; AIX64-NEXT: addi r31, r1, 120 +; AIX64-NEXT: li r5, 320 +; AIX64-NEXT: addi r4, r3, 384 +; AIX64-NEXT: mr r3, r31 +; AIX64-NEXT: bl .___memmove64[PR] +; AIX64-NEXT: nop +; AIX64-NEXT: mr r3, r31 +; AIX64-NEXT: bl .calleeInt[PR] +; AIX64-NEXT: nop +; AIX64-NEXT: ld r31, 440(r1) # 8-byte Folded Reload +; AIX64-NEXT: addi r1, r1, 448 +; AIX64-NEXT: ld r0, 16(r1) +; AIX64-NEXT: mtlr r0 +; AIX64-NEXT: blr +; +; LINUX64BE-LABEL: array4: +; LINUX64BE: # %bb.0: # %entry +; LINUX64BE-NEXT: mflr r0 +; LINUX64BE-NEXT: stdu r1, -448(r1) +; LINUX64BE-NEXT: addis r3, r2, .L__ModuleStringPool@toc@ha +; LINUX64BE-NEXT: std r0, 464(r1) +; LINUX64BE-NEXT: std r30, 432(r1) # 8-byte Folded Spill +; LINUX64BE-NEXT: addi r30, r1, 112 +; LINUX64BE-NEXT: li r5, 320 +; LINUX64BE-NEXT: addi r3, r3, .L__ModuleStringPool@toc@l +; LINUX64BE-NEXT: addi r4, r3, 384 +; LINUX64BE-NEXT: mr r3, r30 +; LINUX64BE-NEXT: bl memcpy +; LINUX64BE-NEXT: nop +; LINUX64BE-NEXT: mr r3, r30 +; LINUX64BE-NEXT: bl calleeInt +; LINUX64BE-NEXT: nop +; LINUX64BE-NEXT: ld r30, 432(r1) # 8-byte Folded Reload +; LINUX64BE-NEXT: addi r1, r1, 448 +; LINUX64BE-NEXT: ld r0, 16(r1) +; LINUX64BE-NEXT: mtlr r0 +; LINUX64BE-NEXT: blr +; +; LINUX64LE-LABEL: array4: +; LINUX64LE: # %bb.0: # %entry +; LINUX64LE-NEXT: mflr r0 +; LINUX64LE-NEXT: stdu r1, -368(r1) +; LINUX64LE-NEXT: addis r3, r2, .L__ModuleStringPool@toc@ha +; LINUX64LE-NEXT: std r0, 384(r1) +; LINUX64LE-NEXT: std r30, 352(r1) # 8-byte Folded Spill +; LINUX64LE-NEXT: addi r30, r1, 32 +; LINUX64LE-NEXT: li r5, 320 +; LINUX64LE-NEXT: addi r3, r3, .L__ModuleStringPool@toc@l +; LINUX64LE-NEXT: addi r4, r3, 384 +; LINUX64LE-NEXT: mr r3, r30 +; LINUX64LE-NEXT: bl memcpy +; LINUX64LE-NEXT: nop +; LINUX64LE-NEXT: mr r3, r30 +; LINUX64LE-NEXT: bl calleeInt +; LINUX64LE-NEXT: nop +; LINUX64LE-NEXT: ld r30, 352(r1) # 8-byte Folded Reload +; LINUX64LE-NEXT: addi r1, r1, 368 +; LINUX64LE-NEXT: ld r0, 16(r1) +; LINUX64LE-NEXT: mtlr r0 +; LINUX64LE-NEXT: blr +entry: + %IntArray = alloca [40 x i64], align 8 + call void @llvm.lifetime.start.p0(i64 320, ptr nonnull %IntArray) + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(320) %IntArray, ptr noundef nonnull align 8 dereferenceable(320) @__const.IntArray4, i64 320, i1 false) + %call = call signext i32 @calleeInt(ptr noundef nonnull %IntArray) + call void @llvm.lifetime.end.p0(i64 320, ptr nonnull %IntArray) + ret i32 %call +} + +attributes #0 = { nounwind } diff --git a/llvm/test/CodeGen/PowerPC/mergeable-string-pool.ll b/llvm/test/CodeGen/PowerPC/mergeable-string-pool.ll new file mode 100644 --- /dev/null +++ b/llvm/test/CodeGen/PowerPC/mergeable-string-pool.ll @@ -0,0 +1,1196 @@ +; RUN: llc -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff -mcpu=pwr8 \ +; RUN: -ppc-asm-full-reg-names < %s | FileCheck %s --check-prefixes=AIX32,AIXDATA +; RUN: llc -verify-machineinstrs -mtriple powerpc64-ibm-aix-xcoff -mcpu=pwr8 \ +; RUN: -ppc-asm-full-reg-names < %s | FileCheck %s --check-prefixes=AIX64,AIXDATA +; RUN: llc -verify-machineinstrs -mtriple powerpc64-unknown-linux -mcpu=pwr8 \ +; RUN: -ppc-asm-full-reg-names < %s | FileCheck %s --check-prefixes=LINUX64BE,LINUXDATA +; RUN: llc -verify-machineinstrs -mtriple powerpc64le-unknown-linux -mcpu=pwr8 \ +; RUN: -ppc-asm-full-reg-names < %s | FileCheck %s --check-prefixes=LINUX64LE,LINUXDATA + +@.str = private unnamed_addr constant [47 x i8] c"This is the global string that is at the top.\0A\00", align 1 +@GLOBALSTRING = dso_local local_unnamed_addr global ptr @.str, align 8 +@IntArray2 = dso_local global [7 x i32] [i32 5, i32 7, i32 9, i32 11, i32 17, i32 1235, i32 32], align 4 +@.str.1 = private unnamed_addr constant [12 x i8] c"str1_STRING\00", align 1 +@.str.2 = private unnamed_addr constant [12 x i8] c"str2_STRING\00", align 1 +@.str.3 = private unnamed_addr constant [12 x i8] c"str3_STRING\00", align 1 +@.str.4 = private unnamed_addr constant [12 x i8] c"str4_STRING\00", align 1 +@.str.5 = private unnamed_addr constant [183 x i8] c"longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_STRING\00", align 1 +@__const.str6.TheString = private unnamed_addr constant [10 x i8] c"ABCABCABC\00", align 1 +@.str.6 = private unnamed_addr constant [12 x i8] c"MixedString\00", align 1 +@__const.mixed2.IntArray = private unnamed_addr constant [7 x i32] [i32 5, i32 7, i32 9, i32 11, i32 17, i32 1235, i32 32], align 4 +@__const.IntArray3 = private unnamed_addr constant [14 x i64] [i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281], align 8 +@__const.IntArray4 = private unnamed_addr constant [14 x i64] [i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281], align 8 +@__const.IntArray5 = private unnamed_addr constant [17 x i64] [i64 15, i64 7, i64 19, i64 11, i64 17, i64 1235, i64 72, i64 51, i64 32, i64 231, i64 86, i64 64, i64 754, i64 281, i64 61, i64 63, i64 67], align 8 +@.str.7 = private unnamed_addr constant [20 x i8] c"Different String 01\00", align 1 +@.str.8 = private unnamed_addr constant [15 x i8] c"Static Global\0A\00", align 1 + +;; Special alignment of 128 on this string will force it to go first and have padding added. +;; TODO: At the momment these will not be pooled because the extra alignment may be lost. +@.str.9 = private unnamed_addr constant [17 x i8] c"str9_STRING.....\00", align 128 +@.str.10 = private unnamed_addr constant [17 x i8] c"str10_STRING....\00", align 128 + +;; Undef constant. +@.str.11 = private unnamed_addr constant [10 x i8] undef, align 1 + +define dso_local signext i32 @str1() local_unnamed_addr #0 { +; AIX32-LABEL: str1: +; AIX32: # %bb.0: # %entry +; AIX32-NEXT: mflr r0 +; AIX32-NEXT: stwu r1, -64(r1) +; AIX32-NEXT: lwz r3, L..C0(r2) # @__ModuleStringPool +; AIX32-NEXT: stw r0, 72(r1) +; AIX32-NEXT: addi r3, r3, 422 +; AIX32-NEXT: bl .callee[PR] +; AIX32-NEXT: nop +; AIX32-NEXT: addi r1, r1, 64 +; AIX32-NEXT: lwz r0, 8(r1) +; AIX32-NEXT: mtlr r0 +; AIX32-NEXT: blr +; +; AIX64-LABEL: str1: +; AIX64: # %bb.0: # %entry +; AIX64-NEXT: mflr r0 +; AIX64-NEXT: stdu r1, -112(r1) +; AIX64-NEXT: ld r3, L..C0(r2) # @__ModuleStringPool +; AIX64-NEXT: std r0, 128(r1) +; AIX64-NEXT: addi r3, r3, 422 +; AIX64-NEXT: bl .callee[PR] +; AIX64-NEXT: nop +; AIX64-NEXT: addi r1, r1, 112 +; AIX64-NEXT: ld r0, 16(r1) +; AIX64-NEXT: mtlr r0 +; AIX64-NEXT: blr +; +; LINUX64BE-LABEL: str1: +; LINUX64BE: # %bb.0: # %entry +; LINUX64BE-NEXT: mflr r0 +; LINUX64BE-NEXT: stdu r1, -112(r1) +; LINUX64BE-NEXT: addis r3, r2, .L__ModuleStringPool@toc@ha +; LINUX64BE-NEXT: std r0, 128(r1) +; LINUX64BE-NEXT: addi r3, r3, .L__ModuleStringPool@toc@l +; LINUX64BE-NEXT: addi r3, r3, 422 +; LINUX64BE-NEXT: bl callee +; LINUX64BE-NEXT: nop +; LINUX64BE-NEXT: addi r1, r1, 112 +; LINUX64BE-NEXT: ld r0, 16(r1) +; LINUX64BE-NEXT: mtlr r0 +; LINUX64BE-NEXT: blr +; +; LINUX64LE-LABEL: str1: +; LINUX64LE: # %bb.0: # %entry +; LINUX64LE-NEXT: mflr r0 +; LINUX64LE-NEXT: stdu r1, -32(r1) +; LINUX64LE-NEXT: addis r3, r2, .L__ModuleStringPool@toc@ha +; LINUX64LE-NEXT: std r0, 48(r1) +; LINUX64LE-NEXT: addi r3, r3, .L__ModuleStringPool@toc@l +; LINUX64LE-NEXT: addi r3, r3, 422 +; LINUX64LE-NEXT: bl callee +; LINUX64LE-NEXT: nop +; LINUX64LE-NEXT: addi r1, r1, 32 +; LINUX64LE-NEXT: ld r0, 16(r1) +; LINUX64LE-NEXT: mtlr r0 +; LINUX64LE-NEXT: blr +entry: + %call = tail call signext i32 @callee(ptr noundef nonnull @.str.1) + ret i32 %call +} + +declare signext i32 @callee(ptr noundef) local_unnamed_addr + +define dso_local signext i32 @str2() local_unnamed_addr #0 { +; AIX32-LABEL: str2: +; AIX32: # %bb.0: # %entry +; AIX32-NEXT: mflr r0 +; AIX32-NEXT: stwu r1, -64(r1) +; AIX32-NEXT: lwz r3, L..C0(r2) # @__ModuleStringPool +; AIX32-NEXT: stw r0, 72(r1) +; AIX32-NEXT: addi r3, r3, 388 +; AIX32-NEXT: bl .callee[PR] +; AIX32-NEXT: nop +; AIX32-NEXT: addi r1, r1, 64 +; AIX32-NEXT: lwz r0, 8(r1) +; AIX32-NEXT: mtlr r0 +; AIX32-NEXT: blr +; +; AIX64-LABEL: str2: +; AIX64: # %bb.0: # %entry +; AIX64-NEXT: mflr r0 +; AIX64-NEXT: stdu r1, -112(r1) +; AIX64-NEXT: ld r3, L..C0(r2) # @__ModuleStringPool +; AIX64-NEXT: std r0, 128(r1) +; AIX64-NEXT: addi r3, r3, 388 +; AIX64-NEXT: bl .callee[PR] +; AIX64-NEXT: nop +; AIX64-NEXT: addi r1, r1, 112 +; AIX64-NEXT: ld r0, 16(r1) +; AIX64-NEXT: mtlr r0 +; AIX64-NEXT: blr +; +; LINUX64BE-LABEL: str2: +; LINUX64BE: # %bb.0: # %entry +; LINUX64BE-NEXT: mflr r0 +; LINUX64BE-NEXT: stdu r1, -112(r1) +; LINUX64BE-NEXT: addis r3, r2, .L__ModuleStringPool@toc@ha +; LINUX64BE-NEXT: std r0, 128(r1) +; LINUX64BE-NEXT: addi r3, r3, .L__ModuleStringPool@toc@l +; LINUX64BE-NEXT: addi r3, r3, 388 +; LINUX64BE-NEXT: bl callee +; LINUX64BE-NEXT: nop +; LINUX64BE-NEXT: addi r1, r1, 112 +; LINUX64BE-NEXT: ld r0, 16(r1) +; LINUX64BE-NEXT: mtlr r0 +; LINUX64BE-NEXT: blr +; +; LINUX64LE-LABEL: str2: +; LINUX64LE: # %bb.0: # %entry +; LINUX64LE-NEXT: mflr r0 +; LINUX64LE-NEXT: stdu r1, -32(r1) +; LINUX64LE-NEXT: addis r3, r2, .L__ModuleStringPool@toc@ha +; LINUX64LE-NEXT: std r0, 48(r1) +; LINUX64LE-NEXT: addi r3, r3, .L__ModuleStringPool@toc@l +; LINUX64LE-NEXT: addi r3, r3, 388 +; LINUX64LE-NEXT: bl callee +; LINUX64LE-NEXT: nop +; LINUX64LE-NEXT: addi r1, r1, 32 +; LINUX64LE-NEXT: ld r0, 16(r1) +; LINUX64LE-NEXT: mtlr r0 +; LINUX64LE-NEXT: blr +entry: + %call = tail call signext i32 @callee(ptr noundef nonnull @.str.2) + ret i32 %call +} + +define dso_local signext i32 @str3() local_unnamed_addr #0 { +; AIX32-LABEL: str3: +; AIX32: # %bb.0: # %entry +; AIX32-NEXT: mflr r0 +; AIX32-NEXT: stwu r1, -64(r1) +; AIX32-NEXT: stw r0, 72(r1) +; AIX32-NEXT: stw r31, 60(r1) # 4-byte Folded Spill +; AIX32-NEXT: lwz r31, L..C0(r2) # @__ModuleStringPool +; AIX32-NEXT: addi r3, r31, 434 +; AIX32-NEXT: bl .callee[PR] +; AIX32-NEXT: nop +; AIX32-NEXT: addi r4, r31, 388 +; AIX32-NEXT: mr r31, r3 +; AIX32-NEXT: mr r3, r4 +; AIX32-NEXT: bl .callee[PR] +; AIX32-NEXT: nop +; AIX32-NEXT: add r3, r3, r31 +; AIX32-NEXT: lwz r31, 60(r1) # 4-byte Folded Reload +; AIX32-NEXT: addi r1, r1, 64 +; AIX32-NEXT: lwz r0, 8(r1) +; AIX32-NEXT: mtlr r0 +; AIX32-NEXT: blr +; +; AIX64-LABEL: str3: +; AIX64: # %bb.0: # %entry +; AIX64-NEXT: mflr r0 +; AIX64-NEXT: stdu r1, -128(r1) +; AIX64-NEXT: std r0, 144(r1) +; AIX64-NEXT: std r30, 112(r1) # 8-byte Folded Spill +; AIX64-NEXT: ld r30, L..C0(r2) # @__ModuleStringPool +; AIX64-NEXT: std r31, 120(r1) # 8-byte Folded Spill +; AIX64-NEXT: addi r3, r30, 434 +; AIX64-NEXT: bl .callee[PR] +; AIX64-NEXT: nop +; AIX64-NEXT: mr r31, r3 +; AIX64-NEXT: addi r3, r30, 388 +; AIX64-NEXT: bl .callee[PR] +; AIX64-NEXT: nop +; AIX64-NEXT: add r3, r3, r31 +; AIX64-NEXT: ld r31, 120(r1) # 8-byte Folded Reload +; AIX64-NEXT: ld r30, 112(r1) # 8-byte Folded Reload +; AIX64-NEXT: extsw r3, r3 +; AIX64-NEXT: addi r1, r1, 128 +; AIX64-NEXT: ld r0, 16(r1) +; AIX64-NEXT: mtlr r0 +; AIX64-NEXT: blr +; +; LINUX64BE-LABEL: str3: +; LINUX64BE: # %bb.0: # %entry +; LINUX64BE-NEXT: mflr r0 +; LINUX64BE-NEXT: stdu r1, -144(r1) +; LINUX64BE-NEXT: addis r3, r2, .L__ModuleStringPool@toc@ha +; LINUX64BE-NEXT: std r0, 160(r1) +; LINUX64BE-NEXT: std r29, 120(r1) # 8-byte Folded Spill +; LINUX64BE-NEXT: std r30, 128(r1) # 8-byte Folded Spill +; LINUX64BE-NEXT: addi r29, r3, .L__ModuleStringPool@toc@l +; LINUX64BE-NEXT: addi r3, r29, 434 +; LINUX64BE-NEXT: bl callee +; LINUX64BE-NEXT: nop +; LINUX64BE-NEXT: mr r30, r3 +; LINUX64BE-NEXT: addi r3, r29, 388 +; LINUX64BE-NEXT: bl callee +; LINUX64BE-NEXT: nop +; LINUX64BE-NEXT: add r3, r3, r30 +; LINUX64BE-NEXT: ld r30, 128(r1) # 8-byte Folded Reload +; LINUX64BE-NEXT: ld r29, 120(r1) # 8-byte Folded Reload +; LINUX64BE-NEXT: extsw r3, r3 +; LINUX64BE-NEXT: addi r1, r1, 144 +; LINUX64BE-NEXT: ld r0, 16(r1) +; LINUX64BE-NEXT: mtlr r0 +; LINUX64BE-NEXT: blr +; +; LINUX64LE-LABEL: str3: +; LINUX64LE: # %bb.0: # %entry +; LINUX64LE-NEXT: mflr r0 +; LINUX64LE-NEXT: std r29, -24(r1) # 8-byte Folded Spill +; LINUX64LE-NEXT: std r30, -16(r1) # 8-byte Folded Spill +; LINUX64LE-NEXT: stdu r1, -64(r1) +; LINUX64LE-NEXT: addis r3, r2, .L__ModuleStringPool@toc@ha +; LINUX64LE-NEXT: std r0, 80(r1) +; LINUX64LE-NEXT: addi r29, r3, .L__ModuleStringPool@toc@l +; LINUX64LE-NEXT: addi r3, r29, 434 +; LINUX64LE-NEXT: bl callee +; LINUX64LE-NEXT: nop +; LINUX64LE-NEXT: mr r30, r3 +; LINUX64LE-NEXT: addi r3, r29, 388 +; LINUX64LE-NEXT: bl callee +; LINUX64LE-NEXT: nop +; LINUX64LE-NEXT: add r3, r3, r30 +; LINUX64LE-NEXT: extsw r3, r3 +; LINUX64LE-NEXT: addi r1, r1, 64 +; LINUX64LE-NEXT: ld r0, 16(r1) +; LINUX64LE-NEXT: ld r30, -16(r1) # 8-byte Folded Reload +; LINUX64LE-NEXT: ld r29, -24(r1) # 8-byte Folded Reload +; LINUX64LE-NEXT: mtlr r0 +; LINUX64LE-NEXT: blr +entry: + %call = tail call signext i32 @callee(ptr noundef nonnull @.str.3) + %call1 = tail call signext i32 @callee(ptr noundef nonnull @.str.2) + %add = add nsw i32 %call1, %call + ret i32 %add +} + +define dso_local signext i32 @str4() local_unnamed_addr #0 { +; AIX32-LABEL: str4: +; AIX32: # %bb.0: # %entry +; AIX32-NEXT: mflr r0 +; AIX32-NEXT: stwu r1, -64(r1) +; AIX32-NEXT: lwz r3, L..C0(r2) # @__ModuleStringPool +; AIX32-NEXT: stw r0, 72(r1) +; AIX32-NEXT: addi r3, r3, 446 +; AIX32-NEXT: bl .callee[PR] +; AIX32-NEXT: nop +; AIX32-NEXT: addi r1, r1, 64 +; AIX32-NEXT: lwz r0, 8(r1) +; AIX32-NEXT: mtlr r0 +; AIX32-NEXT: blr +; +; AIX64-LABEL: str4: +; AIX64: # %bb.0: # %entry +; AIX64-NEXT: mflr r0 +; AIX64-NEXT: stdu r1, -112(r1) +; AIX64-NEXT: ld r3, L..C0(r2) # @__ModuleStringPool +; AIX64-NEXT: std r0, 128(r1) +; AIX64-NEXT: addi r3, r3, 446 +; AIX64-NEXT: bl .callee[PR] +; AIX64-NEXT: nop +; AIX64-NEXT: addi r1, r1, 112 +; AIX64-NEXT: ld r0, 16(r1) +; AIX64-NEXT: mtlr r0 +; AIX64-NEXT: blr +; +; LINUX64BE-LABEL: str4: +; LINUX64BE: # %bb.0: # %entry +; LINUX64BE-NEXT: mflr r0 +; LINUX64BE-NEXT: stdu r1, -112(r1) +; LINUX64BE-NEXT: addis r3, r2, .L__ModuleStringPool@toc@ha +; LINUX64BE-NEXT: std r0, 128(r1) +; LINUX64BE-NEXT: addi r3, r3, .L__ModuleStringPool@toc@l +; LINUX64BE-NEXT: addi r3, r3, 446 +; LINUX64BE-NEXT: bl callee +; LINUX64BE-NEXT: nop +; LINUX64BE-NEXT: addi r1, r1, 112 +; LINUX64BE-NEXT: ld r0, 16(r1) +; LINUX64BE-NEXT: mtlr r0 +; LINUX64BE-NEXT: blr +; +; LINUX64LE-LABEL: str4: +; LINUX64LE: # %bb.0: # %entry +; LINUX64LE-NEXT: mflr r0 +; LINUX64LE-NEXT: stdu r1, -32(r1) +; LINUX64LE-NEXT: addis r3, r2, .L__ModuleStringPool@toc@ha +; LINUX64LE-NEXT: std r0, 48(r1) +; LINUX64LE-NEXT: addi r3, r3, .L__ModuleStringPool@toc@l +; LINUX64LE-NEXT: addi r3, r3, 446 +; LINUX64LE-NEXT: bl callee +; LINUX64LE-NEXT: nop +; LINUX64LE-NEXT: addi r1, r1, 32 +; LINUX64LE-NEXT: ld r0, 16(r1) +; LINUX64LE-NEXT: mtlr r0 +; LINUX64LE-NEXT: blr +entry: + %call = tail call signext i32 @callee(ptr noundef nonnull @.str.4) + ret i32 %call +} + +define dso_local signext i32 @str5() local_unnamed_addr #0 { +; AIX32-LABEL: str5: +; AIX32: # %bb.0: # %entry +; AIX32-NEXT: mflr r0 +; AIX32-NEXT: stwu r1, -64(r1) +; AIX32-NEXT: lwz r3, L..C0(r2) # @__ModuleStringPool +; AIX32-NEXT: stw r0, 72(r1) +; AIX32-NEXT: addi r3, r3, 493 +; AIX32-NEXT: bl .callee[PR] +; AIX32-NEXT: nop +; AIX32-NEXT: addi r1, r1, 64 +; AIX32-NEXT: lwz r0, 8(r1) +; AIX32-NEXT: mtlr r0 +; AIX32-NEXT: blr +; +; AIX64-LABEL: str5: +; AIX64: # %bb.0: # %entry +; AIX64-NEXT: mflr r0 +; AIX64-NEXT: stdu r1, -112(r1) +; AIX64-NEXT: ld r3, L..C0(r2) # @__ModuleStringPool +; AIX64-NEXT: std r0, 128(r1) +; AIX64-NEXT: addi r3, r3, 493 +; AIX64-NEXT: bl .callee[PR] +; AIX64-NEXT: nop +; AIX64-NEXT: addi r1, r1, 112 +; AIX64-NEXT: ld r0, 16(r1) +; AIX64-NEXT: mtlr r0 +; AIX64-NEXT: blr +; +; LINUX64BE-LABEL: str5: +; LINUX64BE: # %bb.0: # %entry +; LINUX64BE-NEXT: mflr r0 +; LINUX64BE-NEXT: stdu r1, -112(r1) +; LINUX64BE-NEXT: addis r3, r2, .L__ModuleStringPool@toc@ha +; LINUX64BE-NEXT: std r0, 128(r1) +; LINUX64BE-NEXT: addi r3, r3, .L__ModuleStringPool@toc@l +; LINUX64BE-NEXT: addi r3, r3, 493 +; LINUX64BE-NEXT: bl callee +; LINUX64BE-NEXT: nop +; LINUX64BE-NEXT: addi r1, r1, 112 +; LINUX64BE-NEXT: ld r0, 16(r1) +; LINUX64BE-NEXT: mtlr r0 +; LINUX64BE-NEXT: blr +; +; LINUX64LE-LABEL: str5: +; LINUX64LE: # %bb.0: # %entry +; LINUX64LE-NEXT: mflr r0 +; LINUX64LE-NEXT: stdu r1, -32(r1) +; LINUX64LE-NEXT: addis r3, r2, .L__ModuleStringPool@toc@ha +; LINUX64LE-NEXT: std r0, 48(r1) +; LINUX64LE-NEXT: addi r3, r3, .L__ModuleStringPool@toc@l +; LINUX64LE-NEXT: addi r3, r3, 493 +; LINUX64LE-NEXT: bl callee +; LINUX64LE-NEXT: nop +; LINUX64LE-NEXT: addi r1, r1, 32 +; LINUX64LE-NEXT: ld r0, 16(r1) +; LINUX64LE-NEXT: mtlr r0 +; LINUX64LE-NEXT: blr +entry: + %call = tail call signext i32 @callee(ptr noundef nonnull @.str.5) + ret i32 %call +} + +define dso_local signext i32 @array1() local_unnamed_addr #0 { +; AIX32-LABEL: array1: +; AIX32: # %bb.0: # %entry +; AIX32-NEXT: mflr r0 +; AIX32-NEXT: stwu r1, -96(r1) +; AIX32-NEXT: lwz r3, L..C0(r2) # @__ModuleStringPool +; AIX32-NEXT: li r4, 372 +; AIX32-NEXT: li r5, 360 +; AIX32-NEXT: stw r0, 104(r1) +; AIX32-NEXT: lxvw4x vs0, r3, r4 +; AIX32-NEXT: lxvw4x vs1, r3, r5 +; AIX32-NEXT: li r4, 12 +; AIX32-NEXT: addi r3, r1, 64 +; AIX32-NEXT: rlwimi r4, r3, 0, 30, 27 +; AIX32-NEXT: stxvw4x vs0, 0, r4 +; AIX32-NEXT: stxvw4x vs1, 0, r3 +; AIX32-NEXT: bl .calleeInt[PR] +; AIX32-NEXT: nop +; AIX32-NEXT: addi r1, r1, 96 +; AIX32-NEXT: lwz r0, 8(r1) +; AIX32-NEXT: mtlr r0 +; AIX32-NEXT: blr +; +; AIX64-LABEL: array1: +; AIX64: # %bb.0: # %entry +; AIX64-NEXT: mflr r0 +; AIX64-NEXT: stdu r1, -144(r1) +; AIX64-NEXT: ld r3, L..C0(r2) # @__ModuleStringPool +; AIX64-NEXT: li r4, 372 +; AIX64-NEXT: li r5, 360 +; AIX64-NEXT: std r0, 160(r1) +; AIX64-NEXT: lxvw4x vs0, r3, r4 +; AIX64-NEXT: lxvw4x vs1, r3, r5 +; AIX64-NEXT: addi r4, r1, 124 +; AIX64-NEXT: addi r3, r1, 112 +; AIX64-NEXT: stxvw4x vs0, 0, r4 +; AIX64-NEXT: stxvw4x vs1, 0, r3 +; AIX64-NEXT: bl .calleeInt[PR] +; AIX64-NEXT: nop +; AIX64-NEXT: addi r1, r1, 144 +; AIX64-NEXT: ld r0, 16(r1) +; AIX64-NEXT: mtlr r0 +; AIX64-NEXT: blr +; +; LINUX64BE-LABEL: array1: +; LINUX64BE: # %bb.0: # %entry +; LINUX64BE-NEXT: mflr r0 +; LINUX64BE-NEXT: stdu r1, -144(r1) +; LINUX64BE-NEXT: addis r3, r2, .L__ModuleStringPool@toc@ha +; LINUX64BE-NEXT: li r4, 372 +; LINUX64BE-NEXT: li r5, 360 +; LINUX64BE-NEXT: std r0, 160(r1) +; LINUX64BE-NEXT: addi r3, r3, .L__ModuleStringPool@toc@l +; LINUX64BE-NEXT: lxvw4x vs0, r3, r4 +; LINUX64BE-NEXT: lxvw4x vs1, r3, r5 +; LINUX64BE-NEXT: addi r4, r1, 124 +; LINUX64BE-NEXT: addi r3, r1, 112 +; LINUX64BE-NEXT: stxvw4x vs0, 0, r4 +; LINUX64BE-NEXT: stxvw4x vs1, 0, r3 +; LINUX64BE-NEXT: bl calleeInt +; LINUX64BE-NEXT: nop +; LINUX64BE-NEXT: addi r1, r1, 144 +; LINUX64BE-NEXT: ld r0, 16(r1) +; LINUX64BE-NEXT: mtlr r0 +; LINUX64BE-NEXT: blr +; +; LINUX64LE-LABEL: array1: +; LINUX64LE: # %bb.0: # %entry +; LINUX64LE-NEXT: mflr r0 +; LINUX64LE-NEXT: stdu r1, -64(r1) +; LINUX64LE-NEXT: addis r3, r2, .L__ModuleStringPool@toc@ha +; LINUX64LE-NEXT: li r4, 372 +; LINUX64LE-NEXT: li r5, 360 +; LINUX64LE-NEXT: std r0, 80(r1) +; LINUX64LE-NEXT: addi r3, r3, .L__ModuleStringPool@toc@l +; LINUX64LE-NEXT: lxvd2x vs0, r3, r4 +; LINUX64LE-NEXT: lxvd2x vs1, r3, r5 +; LINUX64LE-NEXT: addi r4, r1, 44 +; LINUX64LE-NEXT: addi r3, r1, 32 +; LINUX64LE-NEXT: stxvd2x vs0, 0, r4 +; LINUX64LE-NEXT: stxvd2x vs1, 0, r3 +; LINUX64LE-NEXT: bl calleeInt +; LINUX64LE-NEXT: nop +; LINUX64LE-NEXT: addi r1, r1, 64 +; LINUX64LE-NEXT: ld r0, 16(r1) +; LINUX64LE-NEXT: mtlr r0 +; LINUX64LE-NEXT: blr +entry: + %IntArray = alloca [7 x i32], align 4 + call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %IntArray) + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(28) %IntArray, ptr noundef nonnull align 4 dereferenceable(28) @__const.mixed2.IntArray, i64 28, i1 false) + %call = call signext i32 @calleeInt(ptr noundef nonnull %IntArray) + call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %IntArray) + ret i32 %call +} + +declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) +declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) +declare signext i32 @calleeInt(ptr noundef) local_unnamed_addr +declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) + +define dso_local double @DValue1() local_unnamed_addr #0 { +; LINUX-LABEL: DValue1: +; LINUX: # %bb.0: # %entry +; LINUX-NEXT: addis 3, 2, .LCPI6_0@toc@ha +; LINUX-NEXT: lfd 1, .LCPI6_0@toc@l(3) +; LINUX-NEXT: blr +; AIX32-LABEL: DValue1: +; AIX32: # %bb.0: # %entry +; AIX32-NEXT: lwz r3, L..C1(r2) # %const.0 +; AIX32-NEXT: lfd f1, 0(r3) +; AIX32-NEXT: blr +; +; AIX64-LABEL: DValue1: +; AIX64: # %bb.0: # %entry +; AIX64-NEXT: ld r3, L..C1(r2) # %const.0 +; AIX64-NEXT: lfd f1, 0(r3) +; AIX64-NEXT: blr +; +; LINUX64BE-LABEL: DValue1: +; LINUX64BE: # %bb.0: # %entry +; LINUX64BE-NEXT: addis r3, r2, .LCPI6_0@toc@ha +; LINUX64BE-NEXT: lfd f1, .LCPI6_0@toc@l(r3) +; LINUX64BE-NEXT: blr +; +; LINUX64LE-LABEL: DValue1: +; LINUX64LE: # %bb.0: # %entry +; LINUX64LE-NEXT: addis r3, r2, .LCPI6_0@toc@ha +; LINUX64LE-NEXT: lfd f1, .LCPI6_0@toc@l(r3) +; LINUX64LE-NEXT: blr +entry: + ret double 3.141590e+00 +} + +define dso_local signext i32 @str6() local_unnamed_addr #0 { +; AIX32-LABEL: str6: +; AIX32: # %bb.0: # %entry +; AIX32-NEXT: mflr r0 +; AIX32-NEXT: stwu r1, -80(r1) +; AIX32-NEXT: li r3, 17152 +; AIX32-NEXT: lis r4, 16963 +; AIX32-NEXT: stw r0, 88(r1) +; AIX32-NEXT: lis r5, 16706 +; AIX32-NEXT: sth r3, 72(r1) +; AIX32-NEXT: ori r3, r4, 16706 +; AIX32-NEXT: ori r4, r5, 17217 +; AIX32-NEXT: stw r31, 76(r1) # 4-byte Folded Spill +; AIX32-NEXT: stw r3, 68(r1) +; AIX32-NEXT: addi r3, r1, 64 +; AIX32-NEXT: stw r4, 64(r1) +; AIX32-NEXT: bl .callee[PR] +; AIX32-NEXT: nop +; AIX32-NEXT: addi r4, r1, 69 +; AIX32-NEXT: mr r31, r3 +; AIX32-NEXT: mr r3, r4 +; AIX32-NEXT: bl .callee[PR] +; AIX32-NEXT: nop +; AIX32-NEXT: add r3, r3, r31 +; AIX32-NEXT: lwz r31, 76(r1) # 4-byte Folded Reload +; AIX32-NEXT: addi r1, r1, 80 +; AIX32-NEXT: lwz r0, 8(r1) +; AIX32-NEXT: mtlr r0 +; AIX32-NEXT: blr +; +; AIX64-LABEL: str6: +; AIX64: # %bb.0: # %entry +; AIX64-NEXT: mflr r0 +; AIX64-NEXT: stdu r1, -144(r1) +; AIX64-NEXT: lis r3, 16706 +; AIX64-NEXT: std r0, 160(r1) +; AIX64-NEXT: li r4, 17152 +; AIX64-NEXT: std r31, 136(r1) # 8-byte Folded Spill +; AIX64-NEXT: ori r3, r3, 17217 +; AIX64-NEXT: rldic r3, r3, 32, 1 +; AIX64-NEXT: oris r3, r3, 16963 +; AIX64-NEXT: sth r4, 128(r1) +; AIX64-NEXT: ori r3, r3, 16706 +; AIX64-NEXT: std r3, 120(r1) +; AIX64-NEXT: addi r3, r1, 120 +; AIX64-NEXT: bl .callee[PR] +; AIX64-NEXT: nop +; AIX64-NEXT: mr r31, r3 +; AIX64-NEXT: addi r3, r1, 125 +; AIX64-NEXT: bl .callee[PR] +; AIX64-NEXT: nop +; AIX64-NEXT: add r3, r3, r31 +; AIX64-NEXT: ld r31, 136(r1) # 8-byte Folded Reload +; AIX64-NEXT: extsw r3, r3 +; AIX64-NEXT: addi r1, r1, 144 +; AIX64-NEXT: ld r0, 16(r1) +; AIX64-NEXT: mtlr r0 +; AIX64-NEXT: blr +; +; LINUX64BE-LABEL: str6: +; LINUX64BE: # %bb.0: # %entry +; LINUX64BE-NEXT: mflr r0 +; LINUX64BE-NEXT: stdu r1, -144(r1) +; LINUX64BE-NEXT: lis r3, 16706 +; LINUX64BE-NEXT: std r0, 160(r1) +; LINUX64BE-NEXT: li r4, 17152 +; LINUX64BE-NEXT: std r30, 128(r1) # 8-byte Folded Spill +; LINUX64BE-NEXT: ori r3, r3, 17217 +; LINUX64BE-NEXT: rldic r3, r3, 32, 1 +; LINUX64BE-NEXT: oris r3, r3, 16963 +; LINUX64BE-NEXT: sth r4, 120(r1) +; LINUX64BE-NEXT: ori r3, r3, 16706 +; LINUX64BE-NEXT: std r3, 112(r1) +; LINUX64BE-NEXT: addi r3, r1, 112 +; LINUX64BE-NEXT: bl callee +; LINUX64BE-NEXT: nop +; LINUX64BE-NEXT: mr r30, r3 +; LINUX64BE-NEXT: addi r3, r1, 117 +; LINUX64BE-NEXT: bl callee +; LINUX64BE-NEXT: nop +; LINUX64BE-NEXT: add r3, r3, r30 +; LINUX64BE-NEXT: ld r30, 128(r1) # 8-byte Folded Reload +; LINUX64BE-NEXT: extsw r3, r3 +; LINUX64BE-NEXT: addi r1, r1, 144 +; LINUX64BE-NEXT: ld r0, 16(r1) +; LINUX64BE-NEXT: mtlr r0 +; LINUX64BE-NEXT: blr +; +; LINUX64LE-LABEL: str6: +; LINUX64LE: # %bb.0: # %entry +; LINUX64LE-NEXT: mflr r0 +; LINUX64LE-NEXT: std r30, -16(r1) # 8-byte Folded Spill +; LINUX64LE-NEXT: stdu r1, -64(r1) +; LINUX64LE-NEXT: lis r3, 8480 +; LINUX64LE-NEXT: std r0, 80(r1) +; LINUX64LE-NEXT: li r4, 67 +; LINUX64LE-NEXT: ori r3, r3, 41377 +; LINUX64LE-NEXT: sth r4, 40(r1) +; LINUX64LE-NEXT: rldic r3, r3, 33, 1 +; LINUX64LE-NEXT: oris r3, r3, 16707 +; LINUX64LE-NEXT: ori r3, r3, 16961 +; LINUX64LE-NEXT: std r3, 32(r1) +; LINUX64LE-NEXT: addi r3, r1, 32 +; LINUX64LE-NEXT: bl callee +; LINUX64LE-NEXT: nop +; LINUX64LE-NEXT: mr r30, r3 +; LINUX64LE-NEXT: addi r3, r1, 37 +; LINUX64LE-NEXT: bl callee +; LINUX64LE-NEXT: nop +; LINUX64LE-NEXT: add r3, r3, r30 +; LINUX64LE-NEXT: extsw r3, r3 +; LINUX64LE-NEXT: addi r1, r1, 64 +; LINUX64LE-NEXT: ld r0, 16(r1) +; LINUX64LE-NEXT: ld r30, -16(r1) # 8-byte Folded Reload +; LINUX64LE-NEXT: mtlr r0 +; LINUX64LE-NEXT: blr +entry: + %TheString = alloca [10 x i8], align 1 + call void @llvm.lifetime.start.p0(i64 10, ptr nonnull %TheString) + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(10) %TheString, ptr noundef nonnull align 1 dereferenceable(10) @__const.str6.TheString, i64 10, i1 false) + %call = call signext i32 @callee(ptr noundef nonnull %TheString) + %add.ptr = getelementptr inbounds i8, ptr %TheString, i64 5 + %call2 = call signext i32 @callee(ptr noundef nonnull %add.ptr) + %add = add nsw i32 %call2, %call + call void @llvm.lifetime.end.p0(i64 10, ptr nonnull %TheString) + ret i32 %add +} + +define dso_local signext i32 @str7() local_unnamed_addr #0 { +; AIX32-LABEL: str7: +; AIX32: # %bb.0: # %entry +; AIX32-NEXT: mflr r0 +; AIX32-NEXT: stwu r1, -64(r1) +; AIX32-NEXT: lwz r3, L..C2(r2) # @GLOBALSTRING +; AIX32-NEXT: stw r0, 72(r1) +; AIX32-NEXT: stw r31, 60(r1) # 4-byte Folded Spill +; AIX32-NEXT: lwz r3, 0(r3) +; AIX32-NEXT: bl .callee[PR] +; AIX32-NEXT: nop +; AIX32-NEXT: lwz r4, L..C0(r2) # @__ModuleStringPool +; AIX32-NEXT: mr r31, r3 +; AIX32-NEXT: addi r4, r4, 458 +; AIX32-NEXT: mr r3, r4 +; AIX32-NEXT: bl .callee[PR] +; AIX32-NEXT: nop +; AIX32-NEXT: add r3, r3, r31 +; AIX32-NEXT: lwz r31, 60(r1) # 4-byte Folded Reload +; AIX32-NEXT: addi r1, r1, 64 +; AIX32-NEXT: lwz r0, 8(r1) +; AIX32-NEXT: mtlr r0 +; AIX32-NEXT: blr +; +; AIX64-LABEL: str7: +; AIX64: # %bb.0: # %entry +; AIX64-NEXT: mflr r0 +; AIX64-NEXT: stdu r1, -128(r1) +; AIX64-NEXT: ld r3, L..C2(r2) # @GLOBALSTRING +; AIX64-NEXT: std r0, 144(r1) +; AIX64-NEXT: std r31, 120(r1) # 8-byte Folded Spill +; AIX64-NEXT: ld r3, 0(r3) +; AIX64-NEXT: bl .callee[PR] +; AIX64-NEXT: nop +; AIX64-NEXT: mr r31, r3 +; AIX64-NEXT: ld r3, L..C0(r2) # @__ModuleStringPool +; AIX64-NEXT: addi r3, r3, 458 +; AIX64-NEXT: bl .callee[PR] +; AIX64-NEXT: nop +; AIX64-NEXT: add r3, r3, r31 +; AIX64-NEXT: ld r31, 120(r1) # 8-byte Folded Reload +; AIX64-NEXT: extsw r3, r3 +; AIX64-NEXT: addi r1, r1, 128 +; AIX64-NEXT: ld r0, 16(r1) +; AIX64-NEXT: mtlr r0 +; AIX64-NEXT: blr +; +; LINUX64BE-LABEL: str7: +; LINUX64BE: # %bb.0: # %entry +; LINUX64BE-NEXT: mflr r0 +; LINUX64BE-NEXT: stdu r1, -128(r1) +; LINUX64BE-NEXT: std r0, 144(r1) +; LINUX64BE-NEXT: addis r3, r2, GLOBALSTRING@toc@ha +; LINUX64BE-NEXT: std r30, 112(r1) # 8-byte Folded Spill +; LINUX64BE-NEXT: ld r3, GLOBALSTRING@toc@l(r3) +; LINUX64BE-NEXT: bl callee +; LINUX64BE-NEXT: nop +; LINUX64BE-NEXT: mr r30, r3 +; LINUX64BE-NEXT: addis r3, r2, .L__ModuleStringPool@toc@ha +; LINUX64BE-NEXT: addi r3, r3, .L__ModuleStringPool@toc@l +; LINUX64BE-NEXT: addi r3, r3, 458 +; LINUX64BE-NEXT: bl callee +; LINUX64BE-NEXT: nop +; LINUX64BE-NEXT: add r3, r3, r30 +; LINUX64BE-NEXT: ld r30, 112(r1) # 8-byte Folded Reload +; LINUX64BE-NEXT: extsw r3, r3 +; LINUX64BE-NEXT: addi r1, r1, 128 +; LINUX64BE-NEXT: ld r0, 16(r1) +; LINUX64BE-NEXT: mtlr r0 +; LINUX64BE-NEXT: blr +; +; LINUX64LE-LABEL: str7: +; LINUX64LE: # %bb.0: # %entry +; LINUX64LE-NEXT: mflr r0 +; LINUX64LE-NEXT: std r30, -16(r1) # 8-byte Folded Spill +; LINUX64LE-NEXT: stdu r1, -48(r1) +; LINUX64LE-NEXT: std r0, 64(r1) +; LINUX64LE-NEXT: addis r3, r2, GLOBALSTRING@toc@ha +; LINUX64LE-NEXT: ld r3, GLOBALSTRING@toc@l(r3) +; LINUX64LE-NEXT: bl callee +; LINUX64LE-NEXT: nop +; LINUX64LE-NEXT: mr r30, r3 +; LINUX64LE-NEXT: addis r3, r2, .L__ModuleStringPool@toc@ha +; LINUX64LE-NEXT: addi r3, r3, .L__ModuleStringPool@toc@l +; LINUX64LE-NEXT: addi r3, r3, 458 +; LINUX64LE-NEXT: bl callee +; LINUX64LE-NEXT: nop +; LINUX64LE-NEXT: add r3, r3, r30 +; LINUX64LE-NEXT: extsw r3, r3 +; LINUX64LE-NEXT: addi r1, r1, 48 +; LINUX64LE-NEXT: ld r0, 16(r1) +; LINUX64LE-NEXT: ld r30, -16(r1) # 8-byte Folded Reload +; LINUX64LE-NEXT: mtlr r0 +; LINUX64LE-NEXT: blr +entry: + %0 = load ptr, ptr @GLOBALSTRING, align 8 + %call = tail call signext i32 @callee(ptr noundef %0) + %call1 = tail call signext i32 @callee(ptr noundef nonnull @.str.8) + %add = add nsw i32 %call1, %call + ret i32 %add +} + +define dso_local signext i32 @mixed1() local_unnamed_addr #0 { +; AIX32-LABEL: mixed1: +; AIX32: # %bb.0: # %entry +; AIX32-NEXT: mflr r0 +; AIX32-NEXT: stwu r1, -64(r1) +; AIX32-NEXT: lwz r3, L..C3(r2) # @IntArray2 +; AIX32-NEXT: stw r0, 72(r1) +; AIX32-NEXT: stw r31, 60(r1) # 4-byte Folded Spill +; AIX32-NEXT: bl .calleeInt[PR] +; AIX32-NEXT: nop +; AIX32-NEXT: lwz r4, L..C0(r2) # @__ModuleStringPool +; AIX32-NEXT: mr r31, r3 +; AIX32-NEXT: addi r4, r4, 400 +; AIX32-NEXT: mr r3, r4 +; AIX32-NEXT: bl .callee[PR] +; AIX32-NEXT: nop +; AIX32-NEXT: add r3, r3, r31 +; AIX32-NEXT: lwz r31, 60(r1) # 4-byte Folded Reload +; AIX32-NEXT: addi r1, r1, 64 +; AIX32-NEXT: lwz r0, 8(r1) +; AIX32-NEXT: mtlr r0 +; AIX32-NEXT: blr +; +; AIX64-LABEL: mixed1: +; AIX64: # %bb.0: # %entry +; AIX64-NEXT: mflr r0 +; AIX64-NEXT: stdu r1, -128(r1) +; AIX64-NEXT: ld r3, L..C3(r2) # @IntArray2 +; AIX64-NEXT: std r0, 144(r1) +; AIX64-NEXT: std r31, 120(r1) # 8-byte Folded Spill +; AIX64-NEXT: bl .calleeInt[PR] +; AIX64-NEXT: nop +; AIX64-NEXT: mr r31, r3 +; AIX64-NEXT: ld r3, L..C0(r2) # @__ModuleStringPool +; AIX64-NEXT: addi r3, r3, 400 +; AIX64-NEXT: bl .callee[PR] +; AIX64-NEXT: nop +; AIX64-NEXT: add r3, r3, r31 +; AIX64-NEXT: ld r31, 120(r1) # 8-byte Folded Reload +; AIX64-NEXT: extsw r3, r3 +; AIX64-NEXT: addi r1, r1, 128 +; AIX64-NEXT: ld r0, 16(r1) +; AIX64-NEXT: mtlr r0 +; AIX64-NEXT: blr +; +; LINUX64BE-LABEL: mixed1: +; LINUX64BE: # %bb.0: # %entry +; LINUX64BE-NEXT: mflr r0 +; LINUX64BE-NEXT: stdu r1, -128(r1) +; LINUX64BE-NEXT: addis r3, r2, IntArray2@toc@ha +; LINUX64BE-NEXT: std r0, 144(r1) +; LINUX64BE-NEXT: std r30, 112(r1) # 8-byte Folded Spill +; LINUX64BE-NEXT: addi r3, r3, IntArray2@toc@l +; LINUX64BE-NEXT: bl calleeInt +; LINUX64BE-NEXT: nop +; LINUX64BE-NEXT: mr r30, r3 +; LINUX64BE-NEXT: addis r3, r2, .L__ModuleStringPool@toc@ha +; LINUX64BE-NEXT: addi r3, r3, .L__ModuleStringPool@toc@l +; LINUX64BE-NEXT: addi r3, r3, 400 +; LINUX64BE-NEXT: bl callee +; LINUX64BE-NEXT: nop +; LINUX64BE-NEXT: add r3, r3, r30 +; LINUX64BE-NEXT: ld r30, 112(r1) # 8-byte Folded Reload +; LINUX64BE-NEXT: extsw r3, r3 +; LINUX64BE-NEXT: addi r1, r1, 128 +; LINUX64BE-NEXT: ld r0, 16(r1) +; LINUX64BE-NEXT: mtlr r0 +; LINUX64BE-NEXT: blr +; +; LINUX64LE-LABEL: mixed1: +; LINUX64LE: # %bb.0: # %entry +; LINUX64LE-NEXT: mflr r0 +; LINUX64LE-NEXT: std r30, -16(r1) # 8-byte Folded Spill +; LINUX64LE-NEXT: stdu r1, -48(r1) +; LINUX64LE-NEXT: addis r3, r2, IntArray2@toc@ha +; LINUX64LE-NEXT: std r0, 64(r1) +; LINUX64LE-NEXT: addi r3, r3, IntArray2@toc@l +; LINUX64LE-NEXT: bl calleeInt +; LINUX64LE-NEXT: nop +; LINUX64LE-NEXT: mr r30, r3 +; LINUX64LE-NEXT: addis r3, r2, .L__ModuleStringPool@toc@ha +; LINUX64LE-NEXT: addi r3, r3, .L__ModuleStringPool@toc@l +; LINUX64LE-NEXT: addi r3, r3, 400 +; LINUX64LE-NEXT: bl callee +; LINUX64LE-NEXT: nop +; LINUX64LE-NEXT: add r3, r3, r30 +; LINUX64LE-NEXT: extsw r3, r3 +; LINUX64LE-NEXT: addi r1, r1, 48 +; LINUX64LE-NEXT: ld r0, 16(r1) +; LINUX64LE-NEXT: ld r30, -16(r1) # 8-byte Folded Reload +; LINUX64LE-NEXT: mtlr r0 +; LINUX64LE-NEXT: blr +entry: + %call = tail call signext i32 @calleeInt(ptr noundef nonnull @IntArray2) + %call1 = tail call signext i32 @callee(ptr noundef nonnull @.str.6) + %add = add nsw i32 %call1, %call + ret i32 %add +} + +define dso_local signext i32 @mixed2() local_unnamed_addr #0 { +; AIX32-LABEL: mixed2: +; AIX32: # %bb.0: # %entry +; AIX32-NEXT: mflr r0 +; AIX32-NEXT: stwu r1, -112(r1) +; AIX32-NEXT: stw r0, 120(r1) +; AIX32-NEXT: stw r30, 104(r1) # 4-byte Folded Spill +; AIX32-NEXT: lwz r30, L..C0(r2) # @__ModuleStringPool +; AIX32-NEXT: li r3, 372 +; AIX32-NEXT: li r4, 360 +; AIX32-NEXT: stw r31, 108(r1) # 4-byte Folded Spill +; AIX32-NEXT: lxvw4x vs0, r30, r3 +; AIX32-NEXT: lxvw4x vs1, r30, r4 +; AIX32-NEXT: li r4, 12 +; AIX32-NEXT: addi r3, r1, 64 +; AIX32-NEXT: rlwimi r4, r3, 0, 30, 27 +; AIX32-NEXT: stxvw4x vs0, 0, r4 +; AIX32-NEXT: stxvw4x vs1, 0, r3 +; AIX32-NEXT: bl .calleeInt[PR] +; AIX32-NEXT: nop +; AIX32-NEXT: lwz r4, L..C3(r2) # @IntArray2 +; AIX32-NEXT: mr r31, r3 +; AIX32-NEXT: mr r3, r4 +; AIX32-NEXT: bl .calleeInt[PR] +; AIX32-NEXT: nop +; AIX32-NEXT: addi r4, r30, 400 +; AIX32-NEXT: mr r5, r3 +; AIX32-NEXT: mr r3, r4 +; AIX32-NEXT: add r31, r5, r31 +; AIX32-NEXT: bl .callee[PR] +; AIX32-NEXT: nop +; AIX32-NEXT: addi r4, r30, 473 +; AIX32-NEXT: mr r5, r3 +; AIX32-NEXT: mr r3, r4 +; AIX32-NEXT: add r31, r31, r5 +; AIX32-NEXT: bl .callee[PR] +; AIX32-NEXT: nop +; AIX32-NEXT: add r3, r31, r3 +; AIX32-NEXT: lwz r31, 108(r1) # 4-byte Folded Reload +; AIX32-NEXT: lwz r30, 104(r1) # 4-byte Folded Reload +; AIX32-NEXT: addi r1, r1, 112 +; AIX32-NEXT: lwz r0, 8(r1) +; AIX32-NEXT: mtlr r0 +; AIX32-NEXT: blr +; +; AIX64-LABEL: mixed2: +; AIX64: # %bb.0: # %entry +; AIX64-NEXT: mflr r0 +; AIX64-NEXT: stdu r1, -160(r1) +; AIX64-NEXT: std r0, 176(r1) +; AIX64-NEXT: std r30, 144(r1) # 8-byte Folded Spill +; AIX64-NEXT: ld r30, L..C0(r2) # @__ModuleStringPool +; AIX64-NEXT: li r3, 372 +; AIX64-NEXT: li r4, 360 +; AIX64-NEXT: std r31, 152(r1) # 8-byte Folded Spill +; AIX64-NEXT: lxvw4x vs0, r30, r3 +; AIX64-NEXT: lxvw4x vs1, r30, r4 +; AIX64-NEXT: addi r4, r1, 124 +; AIX64-NEXT: addi r3, r1, 112 +; AIX64-NEXT: stxvw4x vs0, 0, r4 +; AIX64-NEXT: stxvw4x vs1, 0, r3 +; AIX64-NEXT: bl .calleeInt[PR] +; AIX64-NEXT: nop +; AIX64-NEXT: mr r31, r3 +; AIX64-NEXT: ld r3, L..C3(r2) # @IntArray2 +; AIX64-NEXT: bl .calleeInt[PR] +; AIX64-NEXT: nop +; AIX64-NEXT: addi r4, r30, 400 +; AIX64-NEXT: add r31, r3, r31 +; AIX64-NEXT: mr r3, r4 +; AIX64-NEXT: bl .callee[PR] +; AIX64-NEXT: nop +; AIX64-NEXT: addi r4, r30, 473 +; AIX64-NEXT: add r31, r31, r3 +; AIX64-NEXT: mr r3, r4 +; AIX64-NEXT: bl .callee[PR] +; AIX64-NEXT: nop +; AIX64-NEXT: add r3, r31, r3 +; AIX64-NEXT: ld r31, 152(r1) # 8-byte Folded Reload +; AIX64-NEXT: ld r30, 144(r1) # 8-byte Folded Reload +; AIX64-NEXT: extsw r3, r3 +; AIX64-NEXT: addi r1, r1, 160 +; AIX64-NEXT: ld r0, 16(r1) +; AIX64-NEXT: mtlr r0 +; AIX64-NEXT: blr +; +; LINUX64BE-LABEL: mixed2: +; LINUX64BE: # %bb.0: # %entry +; LINUX64BE-NEXT: mflr r0 +; LINUX64BE-NEXT: stdu r1, -176(r1) +; LINUX64BE-NEXT: addis r3, r2, .L__ModuleStringPool@toc@ha +; LINUX64BE-NEXT: std r0, 192(r1) +; LINUX64BE-NEXT: std r29, 152(r1) # 8-byte Folded Spill +; LINUX64BE-NEXT: li r4, 360 +; LINUX64BE-NEXT: std r30, 160(r1) # 8-byte Folded Spill +; LINUX64BE-NEXT: addi r29, r3, .L__ModuleStringPool@toc@l +; LINUX64BE-NEXT: li r3, 372 +; LINUX64BE-NEXT: lxvw4x vs0, r29, r3 +; LINUX64BE-NEXT: addi r3, r1, 112 +; LINUX64BE-NEXT: lxvw4x vs1, r29, r4 +; LINUX64BE-NEXT: addi r4, r1, 124 +; LINUX64BE-NEXT: stxvw4x vs0, 0, r4 +; LINUX64BE-NEXT: stxvw4x vs1, 0, r3 +; LINUX64BE-NEXT: bl calleeInt +; LINUX64BE-NEXT: nop +; LINUX64BE-NEXT: mr r30, r3 +; LINUX64BE-NEXT: addis r3, r2, IntArray2@toc@ha +; LINUX64BE-NEXT: addi r3, r3, IntArray2@toc@l +; LINUX64BE-NEXT: bl calleeInt +; LINUX64BE-NEXT: nop +; LINUX64BE-NEXT: addi r4, r29, 400 +; LINUX64BE-NEXT: add r30, r3, r30 +; LINUX64BE-NEXT: mr r3, r4 +; LINUX64BE-NEXT: bl callee +; LINUX64BE-NEXT: nop +; LINUX64BE-NEXT: addi r4, r29, 473 +; LINUX64BE-NEXT: add r30, r30, r3 +; LINUX64BE-NEXT: mr r3, r4 +; LINUX64BE-NEXT: bl callee +; LINUX64BE-NEXT: nop +; LINUX64BE-NEXT: add r3, r30, r3 +; LINUX64BE-NEXT: ld r30, 160(r1) # 8-byte Folded Reload +; LINUX64BE-NEXT: ld r29, 152(r1) # 8-byte Folded Reload +; LINUX64BE-NEXT: extsw r3, r3 +; LINUX64BE-NEXT: addi r1, r1, 176 +; LINUX64BE-NEXT: ld r0, 16(r1) +; LINUX64BE-NEXT: mtlr r0 +; LINUX64BE-NEXT: blr +; +; LINUX64LE-LABEL: mixed2: +; LINUX64LE: # %bb.0: # %entry +; LINUX64LE-NEXT: mflr r0 +; LINUX64LE-NEXT: std r29, -24(r1) # 8-byte Folded Spill +; LINUX64LE-NEXT: std r30, -16(r1) # 8-byte Folded Spill +; LINUX64LE-NEXT: stdu r1, -96(r1) +; LINUX64LE-NEXT: addis r3, r2, .L__ModuleStringPool@toc@ha +; LINUX64LE-NEXT: li r4, 360 +; LINUX64LE-NEXT: std r0, 112(r1) +; LINUX64LE-NEXT: addi r29, r3, .L__ModuleStringPool@toc@l +; LINUX64LE-NEXT: li r3, 372 +; LINUX64LE-NEXT: lxvd2x vs0, r29, r3 +; LINUX64LE-NEXT: lxvd2x vs1, r29, r4 +; LINUX64LE-NEXT: addi r4, r1, 44 +; LINUX64LE-NEXT: addi r3, r1, 32 +; LINUX64LE-NEXT: stxvd2x vs0, 0, r4 +; LINUX64LE-NEXT: stxvd2x vs1, 0, r3 +; LINUX64LE-NEXT: bl calleeInt +; LINUX64LE-NEXT: nop +; LINUX64LE-NEXT: mr r30, r3 +; LINUX64LE-NEXT: addis r3, r2, IntArray2@toc@ha +; LINUX64LE-NEXT: addi r3, r3, IntArray2@toc@l +; LINUX64LE-NEXT: bl calleeInt +; LINUX64LE-NEXT: nop +; LINUX64LE-NEXT: addi r4, r29, 400 +; LINUX64LE-NEXT: add r30, r3, r30 +; LINUX64LE-NEXT: mr r3, r4 +; LINUX64LE-NEXT: bl callee +; LINUX64LE-NEXT: nop +; LINUX64LE-NEXT: addi r4, r29, 473 +; LINUX64LE-NEXT: add r30, r30, r3 +; LINUX64LE-NEXT: mr r3, r4 +; LINUX64LE-NEXT: bl callee +; LINUX64LE-NEXT: nop +; LINUX64LE-NEXT: add r3, r30, r3 +; LINUX64LE-NEXT: extsw r3, r3 +; LINUX64LE-NEXT: addi r1, r1, 96 +; LINUX64LE-NEXT: ld r0, 16(r1) +; LINUX64LE-NEXT: ld r30, -16(r1) # 8-byte Folded Reload +; LINUX64LE-NEXT: ld r29, -24(r1) # 8-byte Folded Reload +; LINUX64LE-NEXT: mtlr r0 +; LINUX64LE-NEXT: blr +entry: + %IntArray = alloca [7 x i32], align 4 + call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %IntArray) + call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(28) %IntArray, ptr noundef nonnull align 4 dereferenceable(28) @__const.mixed2.IntArray, i64 28, i1 false) + %call = call signext i32 @calleeInt(ptr noundef nonnull %IntArray) + %call1 = call signext i32 @calleeInt(ptr noundef nonnull @IntArray2) + %add = add nsw i32 %call1, %call + %call2 = call signext i32 @callee(ptr noundef nonnull @.str.6) + %add3 = add nsw i32 %add, %call2 + %call4 = call signext i32 @callee(ptr noundef nonnull @.str.7) + %add5 = add nsw i32 %add3, %call4 + call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %IntArray) + ret i32 %add5 +} + +define dso_local signext i32 @str9() local_unnamed_addr #0 { +; AIX32-LABEL: str9: +; AIX32: # %bb.0: # %entry +; AIX32-NEXT: mflr r0 +; AIX32-NEXT: stwu r1, -64(r1) +; AIX32-NEXT: lwz r3, L..C4(r2) # @.str.9 +; AIX32-NEXT: stw r0, 72(r1) +; AIX32-NEXT: bl .callee[PR] +; AIX32-NEXT: nop +; AIX32-NEXT: addi r1, r1, 64 +; AIX32-NEXT: lwz r0, 8(r1) +; AIX32-NEXT: mtlr r0 +; AIX32-NEXT: blr +; +; AIX64-LABEL: str9: +; AIX64: # %bb.0: # %entry +; AIX64-NEXT: mflr r0 +; AIX64-NEXT: stdu r1, -112(r1) +; AIX64-NEXT: ld r3, L..C4(r2) # @.str.9 +; AIX64-NEXT: std r0, 128(r1) +; AIX64-NEXT: bl .callee[PR] +; AIX64-NEXT: nop +; AIX64-NEXT: addi r1, r1, 112 +; AIX64-NEXT: ld r0, 16(r1) +; AIX64-NEXT: mtlr r0 +; AIX64-NEXT: blr +; +; LINUX64BE-LABEL: str9: +; LINUX64BE: # %bb.0: # %entry +; LINUX64BE-NEXT: mflr r0 +; LINUX64BE-NEXT: stdu r1, -112(r1) +; LINUX64BE-NEXT: addis r3, r2, .L.str.9@toc@ha +; LINUX64BE-NEXT: std r0, 128(r1) +; LINUX64BE-NEXT: addi r3, r3, .L.str.9@toc@l +; LINUX64BE-NEXT: bl callee +; LINUX64BE-NEXT: nop +; LINUX64BE-NEXT: addi r1, r1, 112 +; LINUX64BE-NEXT: ld r0, 16(r1) +; LINUX64BE-NEXT: mtlr r0 +; LINUX64BE-NEXT: blr +; +; LINUX64LE-LABEL: str9: +; LINUX64LE: # %bb.0: # %entry +; LINUX64LE-NEXT: mflr r0 +; LINUX64LE-NEXT: stdu r1, -32(r1) +; LINUX64LE-NEXT: addis r3, r2, .L.str.9@toc@ha +; LINUX64LE-NEXT: std r0, 48(r1) +; LINUX64LE-NEXT: addi r3, r3, .L.str.9@toc@l +; LINUX64LE-NEXT: bl callee +; LINUX64LE-NEXT: nop +; LINUX64LE-NEXT: addi r1, r1, 32 +; LINUX64LE-NEXT: ld r0, 16(r1) +; LINUX64LE-NEXT: mtlr r0 +; LINUX64LE-NEXT: blr +entry: + %call = tail call signext i32 @callee(ptr noundef nonnull @.str.9) + ret i32 %call +} + +define dso_local signext i32 @str10() local_unnamed_addr #0 { +; AIX32-LABEL: str10: +; AIX32: # %bb.0: # %entry +; AIX32-NEXT: mflr r0 +; AIX32-NEXT: stwu r1, -64(r1) +; AIX32-NEXT: lwz r3, L..C5(r2) # @.str.10 +; AIX32-NEXT: stw r0, 72(r1) +; AIX32-NEXT: bl .callee[PR] +; AIX32-NEXT: nop +; AIX32-NEXT: addi r1, r1, 64 +; AIX32-NEXT: lwz r0, 8(r1) +; AIX32-NEXT: mtlr r0 +; AIX32-NEXT: blr +; +; AIX64-LABEL: str10: +; AIX64: # %bb.0: # %entry +; AIX64-NEXT: mflr r0 +; AIX64-NEXT: stdu r1, -112(r1) +; AIX64-NEXT: ld r3, L..C5(r2) # @.str.10 +; AIX64-NEXT: std r0, 128(r1) +; AIX64-NEXT: bl .callee[PR] +; AIX64-NEXT: nop +; AIX64-NEXT: addi r1, r1, 112 +; AIX64-NEXT: ld r0, 16(r1) +; AIX64-NEXT: mtlr r0 +; AIX64-NEXT: blr +; +; LINUX64BE-LABEL: str10: +; LINUX64BE: # %bb.0: # %entry +; LINUX64BE-NEXT: mflr r0 +; LINUX64BE-NEXT: stdu r1, -112(r1) +; LINUX64BE-NEXT: addis r3, r2, .L.str.10@toc@ha +; LINUX64BE-NEXT: std r0, 128(r1) +; LINUX64BE-NEXT: addi r3, r3, .L.str.10@toc@l +; LINUX64BE-NEXT: bl callee +; LINUX64BE-NEXT: nop +; LINUX64BE-NEXT: addi r1, r1, 112 +; LINUX64BE-NEXT: ld r0, 16(r1) +; LINUX64BE-NEXT: mtlr r0 +; LINUX64BE-NEXT: blr +; +; LINUX64LE-LABEL: str10: +; LINUX64LE: # %bb.0: # %entry +; LINUX64LE-NEXT: mflr r0 +; LINUX64LE-NEXT: stdu r1, -32(r1) +; LINUX64LE-NEXT: addis r3, r2, .L.str.10@toc@ha +; LINUX64LE-NEXT: std r0, 48(r1) +; LINUX64LE-NEXT: addi r3, r3, .L.str.10@toc@l +; LINUX64LE-NEXT: bl callee +; LINUX64LE-NEXT: nop +; LINUX64LE-NEXT: addi r1, r1, 32 +; LINUX64LE-NEXT: ld r0, 16(r1) +; LINUX64LE-NEXT: mtlr r0 +; LINUX64LE-NEXT: blr +entry: + %call = tail call signext i32 @callee(ptr noundef nonnull @.str.10) + ret i32 %call +} + +attributes #0 = { nounwind } + +; AIXDATA: .csect L..__ModuleStringPool[RO],2 +; AIXDATA: .align 3 # @__ModuleStringPool +; AIXDATA: .vbyte 4, 5 # 0x5 +; AIXDATA: .vbyte 4, 7 # 0x7 +; AIXDATA: .vbyte 4, 9 # 0x9 +; AIXDATA: .vbyte 4, 11 # 0xb +; AIXDATA: .vbyte 4, 17 # 0x11 +; AIXDATA: .vbyte 4, 1235 # 0x4d3 +; AIXDATA: .vbyte 4, 32 # 0x20 +; AIXDATA: .string "str2_STRING" +; AIXDATA: .string "MixedString" +; AIXDATA: .string "ABCABCABC" +; AIXDATA: .string "str1_STRING" +; AIXDATA: .string "str3_STRING" +; AIXDATA: .string "str4_STRING" +; AIXDATA: .byte 'S,'t,'a,'t,'i,'c,' ,'G,'l,'o,'b,'a,'l,0012,0000 +; AIXDATA: .string "Different String 01" +; AIXDATA: .string "longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_STRING" + +; LINUXDATA: .L__ModuleStringPool: +; LINUXDATA: .long 5 # 0x5 +; LINUXDATA: .long 7 # 0x7 +; LINUXDATA: .long 9 # 0x9 +; LINUXDATA: .long 11 # 0xb +; LINUXDATA: .long 17 # 0x11 +; LINUXDATA: .long 1235 # 0x4d3 +; LINUXDATA: .long 32 # 0x20 +; LINUXDATA: .asciz "str2_STRING" +; LINUXDATA: .asciz "MixedString" +; LINUXDATA: .asciz "ABCABCABC" +; LINUXDATA: .asciz "str1_STRING" +; LINUXDATA: .asciz "str3_STRING" +; LINUXDATA: .asciz "str4_STRING" +; LINUXDATA: .asciz "Static Global\n" +; LINUXDATA: .asciz "Different String 01" +; LINUXDATA: .asciz "longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_longerstr5_STRING" diff --git a/llvm/test/CodeGen/PowerPC/toc-load-sched-bug.ll b/llvm/test/CodeGen/PowerPC/toc-load-sched-bug.ll --- a/llvm/test/CodeGen/PowerPC/toc-load-sched-bug.ll +++ b/llvm/test/CodeGen/PowerPC/toc-load-sched-bug.ll @@ -164,8 +164,8 @@ ; CHECK: .globl _ZN4llvm11ParseIRFileERKSsRNS_12SMDiagnosticERNS_11LLVMContextE ; CHECK: bctrl ; CHECK: ld 2, 24(1) -; CHECK: addis [[REG:[0-9]+]], 2, .L.str@toc@ha -; CHECK: addi {{[0-9]+}}, [[REG]], .L.str@toc@l +; CHECK: addis [[REG:[0-9]+]], 2, .L__ModuleStringPool@toc@ha +; CHECK: addi {{[0-9]+}}, [[REG]], .L__ModuleStringPool@toc@l ; CHECK: bl _ZNSs6insertEmPKcm %.atomicdst.i.i.i.i.i46 = alloca i32, align 4 %ref.tmp.i.i47 = alloca %"class.std::allocator", align 1