[llvm] 6555558 - Revert "[Attributor] Replace AAValueSimplify with AAPotentialValues"

Johannes Doerfert via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 9 08:04:17 PDT 2022


Author: Johannes Doerfert
Date: 2022-06-09T17:04:01+02:00
New Revision: 6555558a80589d1c5a1154b92cc3af9495f8f86c

URL: https://github.com/llvm/llvm-project/commit/6555558a80589d1c5a1154b92cc3af9495f8f86c
DIFF: https://github.com/llvm/llvm-project/commit/6555558a80589d1c5a1154b92cc3af9495f8f86c.diff

LOG: Revert "[Attributor] Replace AAValueSimplify with AAPotentialValues"

This reverts commit da50dab1ae111e9e6cb0248a47a038b17f798705.

Patch broke AMD GPU OpenMP offload buildbots.
https://lab.llvm.org/buildbot/#/builders/193/builds/13246

Added: 
    

Modified: 
    llvm/include/llvm/Transforms/IPO/Attributor.h
    llvm/lib/Transforms/IPO/Attributor.cpp
    llvm/lib/Transforms/IPO/AttributorAttributes.cpp
    llvm/lib/Transforms/IPO/OpenMPOpt.cpp
    llvm/test/Transforms/Attributor/ArgumentPromotion/2008-02-01-ReturnAttrs.ll
    llvm/test/Transforms/Attributor/ArgumentPromotion/X86/min-legal-vector-width.ll
    llvm/test/Transforms/Attributor/ArgumentPromotion/X86/thiscall.ll
    llvm/test/Transforms/Attributor/ArgumentPromotion/aggregate-promote.ll
    llvm/test/Transforms/Attributor/ArgumentPromotion/alignment.ll
    llvm/test/Transforms/Attributor/ArgumentPromotion/alloca-as.ll
    llvm/test/Transforms/Attributor/ArgumentPromotion/array.ll
    llvm/test/Transforms/Attributor/ArgumentPromotion/attrs.ll
    llvm/test/Transforms/Attributor/ArgumentPromotion/basictest.ll
    llvm/test/Transforms/Attributor/ArgumentPromotion/byval-2.ll
    llvm/test/Transforms/Attributor/ArgumentPromotion/byval.ll
    llvm/test/Transforms/Attributor/ArgumentPromotion/chained.ll
    llvm/test/Transforms/Attributor/ArgumentPromotion/control-flow2.ll
    llvm/test/Transforms/Attributor/ArgumentPromotion/crash.ll
    llvm/test/Transforms/Attributor/ArgumentPromotion/musttail.ll
    llvm/test/Transforms/Attributor/ArgumentPromotion/profile.ll
    llvm/test/Transforms/Attributor/ArgumentPromotion/sret.ll
    llvm/test/Transforms/Attributor/IPConstantProp/2009-09-24-byval-ptr.ll
    llvm/test/Transforms/Attributor/IPConstantProp/PR16052.ll
    llvm/test/Transforms/Attributor/IPConstantProp/PR26044.ll
    llvm/test/Transforms/Attributor/IPConstantProp/multiple_callbacks.ll
    llvm/test/Transforms/Attributor/IPConstantProp/musttail-call.ll
    llvm/test/Transforms/Attributor/IPConstantProp/openmp_parallel_for.ll
    llvm/test/Transforms/Attributor/IPConstantProp/return-argument.ll
    llvm/test/Transforms/Attributor/IPConstantProp/return-constant.ll
    llvm/test/Transforms/Attributor/IPConstantProp/return-constants.ll
    llvm/test/Transforms/Attributor/IPConstantProp/thread_local_acs.ll
    llvm/test/Transforms/Attributor/align.ll
    llvm/test/Transforms/Attributor/allow_list.ll
    llvm/test/Transforms/Attributor/assumes_info.ll
    llvm/test/Transforms/Attributor/callbacks.ll
    llvm/test/Transforms/Attributor/cb_liveness_disabled.ll
    llvm/test/Transforms/Attributor/cb_liveness_enabled.ll
    llvm/test/Transforms/Attributor/cb_range_disabled.ll
    llvm/test/Transforms/Attributor/cb_range_enabled.ll
    llvm/test/Transforms/Attributor/cgscc_bugs.ll
    llvm/test/Transforms/Attributor/depgraph.ll
    llvm/test/Transforms/Attributor/dereferenceable-1.ll
    llvm/test/Transforms/Attributor/heap_to_stack.ll
    llvm/test/Transforms/Attributor/internal-noalias.ll
    llvm/test/Transforms/Attributor/liveness.ll
    llvm/test/Transforms/Attributor/lvi-after-jumpthreading.ll
    llvm/test/Transforms/Attributor/lvi-for-ashr.ll
    llvm/test/Transforms/Attributor/memory_locations.ll
    llvm/test/Transforms/Attributor/noalias.ll
    llvm/test/Transforms/Attributor/nocapture-1.ll
    llvm/test/Transforms/Attributor/nocapture-2.ll
    llvm/test/Transforms/Attributor/nonnull.ll
    llvm/test/Transforms/Attributor/norecurse.ll
    llvm/test/Transforms/Attributor/potential.ll
    llvm/test/Transforms/Attributor/range.ll
    llvm/test/Transforms/Attributor/read_write_returned_arguments_scc.ll
    llvm/test/Transforms/Attributor/readattrs.ll
    llvm/test/Transforms/Attributor/returned.ll
    llvm/test/Transforms/Attributor/undefined_behavior.ll
    llvm/test/Transforms/Attributor/value-simplify-dbg.ll
    llvm/test/Transforms/Attributor/value-simplify-gpu.ll
    llvm/test/Transforms/Attributor/value-simplify-instances.ll
    llvm/test/Transforms/Attributor/value-simplify-pointer-info.ll
    llvm/test/Transforms/Attributor/value-simplify.ll
    llvm/test/Transforms/Attributor/willreturn.ll
    llvm/test/Transforms/Attributor/wrapper.ll
    llvm/test/Transforms/OpenMP/icv_tracking.ll
    llvm/test/Transforms/OpenMP/is_spmd_exec_mode_fold.ll
    llvm/test/Transforms/OpenMP/parallel_deletion.ll
    llvm/test/Transforms/OpenMP/remove_globalization.ll
    llvm/test/Transforms/OpenMP/replace_globalization.ll
    llvm/test/Transforms/OpenMP/spmdization.ll

Removed: 
    llvm/test/Transforms/Attributor/value-simplify-local-remote.ll


################################################################################
diff  --git a/llvm/include/llvm/Transforms/IPO/Attributor.h b/llvm/include/llvm/Transforms/IPO/Attributor.h
index f386021355dfe..59ba92c0c3d4d 100644
--- a/llvm/include/llvm/Transforms/IPO/Attributor.h
+++ b/llvm/include/llvm/Transforms/IPO/Attributor.h
@@ -118,9 +118,7 @@
 #include "llvm/IR/ConstantRange.h"
 #include "llvm/IR/Constants.h"
 #include "llvm/IR/InstIterator.h"
-#include "llvm/IR/Instruction.h"
 #include "llvm/IR/PassManager.h"
-#include "llvm/IR/Value.h"
 #include "llvm/Support/Allocator.h"
 #include "llvm/Support/Casting.h"
 #include "llvm/Support/DOTGraphTraits.h"
@@ -156,7 +154,6 @@ namespace AA {
 enum ValueScope : uint8_t {
   Intraprocedural = 1,
   Interprocedural = 2,
-  AnyScope = Intraprocedural | Interprocedural,
 };
 
 struct ValueAndContext : public std::pair<Value *, const Instruction *> {
@@ -219,11 +216,12 @@ Constant *getInitialValueForObj(Value &Obj, Type &Ty,
 /// \returns True if \p Objects contains all assumed underlying objects, and
 ///          false if something went wrong and the objects could not be
 ///          determined.
-bool getAssumedUnderlyingObjects(
-    Attributor &A, const Value &Ptr, SmallSetVector<Value *, 8> &Objects,
-    const AbstractAttribute &QueryingAA, const Instruction *CtxI,
-    bool &UsedAssumedInformation, AA::ValueScope VS = AA::Interprocedural,
-    SmallPtrSetImpl<Value *> *SeenObjects = nullptr);
+bool getAssumedUnderlyingObjects(Attributor &A, const Value &Ptr,
+                                 SmallVectorImpl<Value *> &Objects,
+                                 const AbstractAttribute &QueryingAA,
+                                 const Instruction *CtxI,
+                                 bool &UsedAssumedInformation,
+                                 AA::ValueScope VS = Interprocedural);
 
 /// Collect all potential values \p LI could read into \p PotentialValues. That
 /// is, the only values read by \p LI are assumed to be known and all are in
@@ -306,24 +304,6 @@ struct DenseMapInfo<AA::ValueAndContext>
   }
 };
 
-template <>
-struct DenseMapInfo<AA::ValueScope> : public DenseMapInfo<unsigned char> {
-  using Base = DenseMapInfo<unsigned char>;
-  static inline AA::ValueScope getEmptyKey() {
-    return AA::ValueScope(Base::getEmptyKey());
-  }
-  static inline AA::ValueScope getTombstoneKey() {
-    return AA::ValueScope(Base::getTombstoneKey());
-  }
-  static unsigned getHashValue(const AA::ValueScope &S) {
-    return Base::getHashValue(S);
-  }
-
-  static bool isEqual(const AA::ValueScope &LHS, const AA::ValueScope &RHS) {
-    return Base::isEqual(LHS, RHS);
-  }
-};
-
 /// The value passed to the line option that defines the maximal initialization
 /// chain length.
 extern unsigned MaxInitializationChainLength;
@@ -1683,16 +1663,14 @@ struct Attributor {
   /// return None, otherwise return `nullptr`.
   Optional<Value *> getAssumedSimplified(const IRPosition &IRP,
                                          const AbstractAttribute &AA,
-                                         bool &UsedAssumedInformation,
-                                         AA::ValueScope S) {
-    return getAssumedSimplified(IRP, &AA, UsedAssumedInformation, S);
+                                         bool &UsedAssumedInformation) {
+    return getAssumedSimplified(IRP, &AA, UsedAssumedInformation);
   }
   Optional<Value *> getAssumedSimplified(const Value &V,
                                          const AbstractAttribute &AA,
-                                         bool &UsedAssumedInformation,
-                                         AA::ValueScope S) {
+                                         bool &UsedAssumedInformation) {
     return getAssumedSimplified(IRPosition::value(V), AA,
-                                UsedAssumedInformation, S);
+                                UsedAssumedInformation);
   }
 
   /// If \p V is assumed simplified, return it, if it is unclear yet,
@@ -1700,17 +1678,7 @@ struct Attributor {
   /// except that it can be used without recording dependences on any \p AA.
   Optional<Value *> getAssumedSimplified(const IRPosition &V,
                                          const AbstractAttribute *AA,
-                                         bool &UsedAssumedInformation,
-                                         AA::ValueScope S);
-
-  /// Try to simplify \p IRP and in the scope \p S. If successful, true is
-  /// returned and all potential values \p IRP can take are put into \p Values.
-  /// If false is returned no other information is valid.
-  bool getAssumedSimplifiedValues(const IRPosition &IRP,
-                                  const AbstractAttribute *AA,
-                                  SmallVectorImpl<AA::ValueAndContext> &Values,
-                                  AA::ValueScope S,
-                                  bool &UsedAssumedInformation);
+                                         bool &UsedAssumedInformation);
 
   /// Register \p CB as a simplification callback.
   /// `Attributor::getAssumedSimplified` will use these callbacks before
@@ -4440,10 +4408,6 @@ template <typename MemberTy> struct PotentialValuesState : AbstractState {
     return *this;
   }
 
-  bool contains(const MemberTy &V) const {
-    return !isValidState() ? true : Set.contains(V);
-  }
-
 protected:
   SetTy &getAssumedSet() {
     assert(isValidState() && "This set shoud not be used when it is invalid!");
@@ -4525,12 +4489,9 @@ template <typename MemberTy> struct PotentialValuesState : AbstractState {
 };
 
 using PotentialConstantIntValuesState = PotentialValuesState<APInt>;
-using PotentialLLVMValuesState =
-    PotentialValuesState<std::pair<AA::ValueAndContext, AA::ValueScope>>;
 
 raw_ostream &operator<<(raw_ostream &OS,
                         const PotentialConstantIntValuesState &R);
-raw_ostream &operator<<(raw_ostream &OS, const PotentialLLVMValuesState &R);
 
 /// An abstract interface for potential values analysis.
 ///
@@ -4546,7 +4507,7 @@ raw_ostream &operator<<(raw_ostream &OS, const PotentialLLVMValuesState &R);
 ///   2. We tried to initialize on a Value that we cannot handle (e.g. an
 ///      operator we do not currently handle).
 ///
-/// For non constant integers see AAPotentialValues.
+/// TODO: Support values other than constant integers.
 struct AAPotentialConstantValues
     : public StateWrapper<PotentialConstantIntValuesState, AbstractAttribute> {
   using Base = StateWrapper<PotentialConstantIntValuesState, AbstractAttribute>;
@@ -4600,48 +4561,6 @@ struct AAPotentialConstantValues
   static const char ID;
 };
 
-struct AAPotentialValues
-    : public StateWrapper<PotentialLLVMValuesState, AbstractAttribute> {
-  using Base = StateWrapper<PotentialLLVMValuesState, AbstractAttribute>;
-  AAPotentialValues(const IRPosition &IRP, Attributor &A) : Base(IRP) {}
-
-  /// See AbstractAttribute::getState(...).
-  PotentialLLVMValuesState &getState() override { return *this; }
-  const PotentialLLVMValuesState &getState() const override { return *this; }
-
-  /// Create an abstract attribute view for the position \p IRP.
-  static AAPotentialValues &createForPosition(const IRPosition &IRP,
-                                              Attributor &A);
-
-  /// Extract the single value in \p Values if any.
-  static Value *getSingleValue(Attributor &A, const AbstractAttribute &AA,
-                               const IRPosition &IRP,
-                               SmallVectorImpl<AA::ValueAndContext> &Values);
-
-  /// See AbstractAttribute::getName()
-  const std::string getName() const override { return "AAPotentialValues"; }
-
-  /// See AbstractAttribute::getIdAddr()
-  const char *getIdAddr() const override { return &ID; }
-
-  /// This function should return true if the type of the \p AA is
-  /// AAPotentialValues
-  static bool classof(const AbstractAttribute *AA) {
-    return (AA->getIdAddr() == &ID);
-  }
-
-  /// Unique ID (due to the unique address)
-  static const char ID;
-
-private:
-  virtual bool
-  getAssumedSimplifiedValues(Attributor &A,
-                             SmallVectorImpl<AA::ValueAndContext> &Values,
-                             AA::ValueScope) const = 0;
-
-  friend struct Attributor;
-};
-
 /// An abstract interface for all noundef attributes.
 struct AANoUndef
     : public IRAttribute<Attribute::NoUndef,

diff  --git a/llvm/lib/Transforms/IPO/Attributor.cpp b/llvm/lib/Transforms/IPO/Attributor.cpp
index 64f1f4a3ad168..ef011330b27f1 100644
--- a/llvm/lib/Transforms/IPO/Attributor.cpp
+++ b/llvm/lib/Transforms/IPO/Attributor.cpp
@@ -326,7 +326,7 @@ static bool getPotentialCopiesOfMemoryValue(
                     << " (only exact: " << OnlyExact << ")\n";);
 
   Value &Ptr = *I.getPointerOperand();
-  SmallSetVector<Value *, 8> Objects;
+  SmallVector<Value *, 8> Objects;
   if (!AA::getAssumedUnderlyingObjects(A, Ptr, Objects, QueryingAA, &I,
                                        UsedAssumedInformation)) {
     LLVM_DEBUG(
@@ -352,8 +352,8 @@ static bool getPotentialCopiesOfMemoryValue(
       // be OK. We do not try to optimize the latter.
       if (!NullPointerIsDefined(I.getFunction(),
                                 Ptr.getType()->getPointerAddressSpace()) &&
-          A.getAssumedSimplified(Ptr, QueryingAA, UsedAssumedInformation,
-                                 AA::Interprocedural) == Obj)
+          A.getAssumedSimplified(Ptr, QueryingAA, UsedAssumedInformation) ==
+              Obj)
         continue;
       LLVM_DEBUG(
           dbgs() << "Underlying object is a valid nullptr, giving up.\n";);
@@ -375,24 +375,10 @@ static bool getPotentialCopiesOfMemoryValue(
         return false;
       }
 
-    bool NullOnly = true;
-    bool NullRequired = false;
-    auto CheckForNullOnlyAndUndef = [&](Optional<Value *> V) {
-      if (!V || *V == nullptr)
-        NullOnly = false;
-      else if (isa<UndefValue>(*V))
-        /* No op */;
-      else if (isa<Constant>(*V) && cast<Constant>(*V)->isNullValue())
-        NullRequired = true;
-      else
-        NullOnly = false;
-    };
-
     if (IsLoad) {
       Value *InitialValue = AA::getInitialValueForObj(*Obj, *I.getType(), TLI);
       if (!InitialValue)
         return false;
-      CheckForNullOnlyAndUndef(InitialValue);
       NewCopies.push_back(InitialValue);
       NewCopyOrigins.push_back(nullptr);
     }
@@ -402,19 +388,12 @@ static bool getPotentialCopiesOfMemoryValue(
         return true;
       if (IsLoad && Acc.isWrittenValueYetUndetermined())
         return true;
-      CheckForNullOnlyAndUndef(Acc.getContent());
-      if (OnlyExact && !IsExact && !NullOnly &&
+      if (OnlyExact && !IsExact &&
           !isa_and_nonnull<UndefValue>(Acc.getWrittenValue())) {
         LLVM_DEBUG(dbgs() << "Non exact access " << *Acc.getRemoteInst()
                           << ", abort!\n");
         return false;
       }
-      if (NullRequired && !NullOnly) {
-        LLVM_DEBUG(dbgs() << "Required all `null` accesses due to non exact "
-                             "one, however found non-null one: "
-                          << *Acc.getRemoteInst() << ", abort!\n");
-        return false;
-      }
       if (IsLoad) {
         assert(isa<LoadInst>(I) && "Expected load or store instruction only!");
         if (!Acc.isWrittenValueUnknown()) {
@@ -1059,74 +1038,60 @@ Attributor::getAssumedConstant(const IRPosition &IRP,
   }
   if (auto *C = dyn_cast<Constant>(&IRP.getAssociatedValue()))
     return C;
-  SmallVector<AA::ValueAndContext> Values;
-  if (getAssumedSimplifiedValues(IRP, &AA, Values,
-                                 AA::ValueScope::Interprocedural,
-                                 UsedAssumedInformation)) {
-    if (Values.empty())
-      return llvm::None;
-    if (auto *C = dyn_cast_or_null<Constant>(
-            AAPotentialValues::getSingleValue(*this, AA, IRP, Values)))
-      return C;
+  const auto &ValueSimplifyAA =
+      getAAFor<AAValueSimplify>(AA, IRP, DepClassTy::NONE);
+  Optional<Value *> SimplifiedV =
+      ValueSimplifyAA.getAssumedSimplifiedValue(*this);
+  bool IsKnown = ValueSimplifyAA.isAtFixpoint();
+  UsedAssumedInformation |= !IsKnown;
+  if (!SimplifiedV.hasValue()) {
+    recordDependence(ValueSimplifyAA, AA, DepClassTy::OPTIONAL);
+    return llvm::None;
   }
-  return nullptr;
+  if (isa_and_nonnull<UndefValue>(SimplifiedV.getValue())) {
+    recordDependence(ValueSimplifyAA, AA, DepClassTy::OPTIONAL);
+    return UndefValue::get(IRP.getAssociatedType());
+  }
+  Constant *CI = dyn_cast_or_null<Constant>(SimplifiedV.getValue());
+  if (CI)
+    CI = dyn_cast_or_null<Constant>(
+        AA::getWithType(*CI, *IRP.getAssociatedType()));
+  if (CI)
+    recordDependence(ValueSimplifyAA, AA, DepClassTy::OPTIONAL);
+  return CI;
 }
 
-Optional<Value *> Attributor::getAssumedSimplified(const IRPosition &IRP,
-                                                   const AbstractAttribute *AA,
-                                                   bool &UsedAssumedInformation,
-                                                   AA::ValueScope S) {
+Optional<Value *>
+Attributor::getAssumedSimplified(const IRPosition &IRP,
+                                 const AbstractAttribute *AA,
+                                 bool &UsedAssumedInformation) {
   // First check all callbacks provided by outside AAs. If any of them returns
   // a non-null value that is 
diff erent from the associated value, or None, we
   // assume it's simplified.
   for (auto &CB : SimplificationCallbacks.lookup(IRP))
     return CB(IRP, AA, UsedAssumedInformation);
 
-  SmallVector<AA::ValueAndContext> Values;
-  if (!getAssumedSimplifiedValues(IRP, AA, Values, S, UsedAssumedInformation))
-    return &IRP.getAssociatedValue();
-  if (Values.empty())
+  // If no high-level/outside simplification occurred, use AAValueSimplify.
+  const auto &ValueSimplifyAA =
+      getOrCreateAAFor<AAValueSimplify>(IRP, AA, DepClassTy::NONE);
+  Optional<Value *> SimplifiedV =
+      ValueSimplifyAA.getAssumedSimplifiedValue(*this);
+  bool IsKnown = ValueSimplifyAA.isAtFixpoint();
+  UsedAssumedInformation |= !IsKnown;
+  if (!SimplifiedV.hasValue()) {
+    if (AA)
+      recordDependence(ValueSimplifyAA, *AA, DepClassTy::OPTIONAL);
     return llvm::None;
-  if (AA)
-    if (Value *V = AAPotentialValues::getSingleValue(*this, *AA, IRP, Values))
-      return V;
-  if (IRP.getPositionKind() == IRPosition::IRP_RETURNED ||
-      IRP.getPositionKind() == IRPosition::IRP_CALL_SITE_RETURNED)
-    return nullptr;
-  return &IRP.getAssociatedValue();
-}
-
-bool Attributor::getAssumedSimplifiedValues(
-    const IRPosition &IRP, const AbstractAttribute *AA,
-    SmallVectorImpl<AA::ValueAndContext> &Values, AA::ValueScope S,
-    bool &UsedAssumedInformation) {
-  // First check all callbacks provided by outside AAs. If any of them returns
-  // a non-null value that is 
diff erent from the associated value, or None, we
-  // assume it's simplified.
-  const auto &SimplificationCBs = SimplificationCallbacks.lookup(IRP);
-  for (auto &CB : SimplificationCBs) {
-    Optional<Value *> CBResult = CB(IRP, AA, UsedAssumedInformation);
-    if (!CBResult.hasValue())
-      continue;
-    Value *V = CBResult.getValue();
-    if (!V)
-      return false;
-    if ((S & AA::ValueScope::Interprocedural) ||
-        AA::isValidInScope(*V, IRP.getAnchorScope()))
-      Values.push_back(AA::ValueAndContext{*V, nullptr});
-    else
-      return false;
   }
-  if (!SimplificationCBs.empty())
-    return true;
-
-  // If no high-level/outside simplification occurred, use AAPotentialValues.
-  const auto &PotentialValuesAA =
-      getOrCreateAAFor<AAPotentialValues>(IRP, AA, DepClassTy::OPTIONAL);
-  if (!PotentialValuesAA.getAssumedSimplifiedValues(*this, Values, S))
-    return false;
-  UsedAssumedInformation |= !PotentialValuesAA.isAtFixpoint();
-  return true;
+  if (*SimplifiedV == nullptr)
+    return const_cast<Value *>(&IRP.getAssociatedValue());
+  if (Value *SimpleV =
+          AA::getWithType(**SimplifiedV, *IRP.getAssociatedType())) {
+    if (AA)
+      recordDependence(ValueSimplifyAA, *AA, DepClassTy::OPTIONAL);
+    return SimpleV;
+  }
+  return const_cast<Value *>(&IRP.getAssociatedValue());
 }
 
 Optional<Value *> Attributor::translateArgumentToCallSiteContent(
@@ -1141,7 +1106,7 @@ Optional<Value *> Attributor::translateArgumentToCallSiteContent(
       if (!Arg->hasPointeeInMemoryValueAttr())
         return getAssumedSimplified(
             IRPosition::callsite_argument(CB, Arg->getArgNo()), AA,
-            UsedAssumedInformation, AA::Intraprocedural);
+            UsedAssumedInformation);
   return nullptr;
 }
 
@@ -2910,8 +2875,7 @@ void Attributor::identifyDefaultAbstractAttributes(Function &F) {
 
     // Every function might be simplified.
     bool UsedAssumedInformation = false;
-    getAssumedSimplified(RetPos, nullptr, UsedAssumedInformation,
-                         AA::Intraprocedural);
+    getAssumedSimplified(RetPos, nullptr, UsedAssumedInformation);
 
     // Every returned value might be marked noundef.
     getOrCreateAAFor<AANoUndef>(RetPos);
@@ -2940,8 +2904,7 @@ void Attributor::identifyDefaultAbstractAttributes(Function &F) {
     // interface though as outside AAs can register custom simplification
     // callbacks.
     bool UsedAssumedInformation = false;
-    getAssumedSimplified(ArgPos, /* AA */ nullptr, UsedAssumedInformation,
-                         AA::Intraprocedural);
+    getAssumedSimplified(ArgPos, /* AA */ nullptr, UsedAssumedInformation);
 
     // Every argument might be dead.
     getOrCreateAAFor<AAIsDead>(ArgPos);
@@ -3005,8 +2968,7 @@ void Attributor::identifyDefaultAbstractAttributes(Function &F) {
 
       IRPosition CBRetPos = IRPosition::callsite_returned(CB);
       bool UsedAssumedInformation = false;
-      getAssumedSimplified(CBRetPos, nullptr, UsedAssumedInformation,
-                           AA::Intraprocedural);
+      getAssumedSimplified(CBRetPos, nullptr, UsedAssumedInformation);
     }
 
     for (int I = 0, E = CB.arg_size(); I < E; ++I) {
@@ -3020,8 +2982,7 @@ void Attributor::identifyDefaultAbstractAttributes(Function &F) {
       // Attributor interface though as outside AAs can register custom
       // simplification callbacks.
       bool UsedAssumedInformation = false;
-      getAssumedSimplified(CBArgPos, /* AA */ nullptr, UsedAssumedInformation,
-                           AA::Intraprocedural);
+      getAssumedSimplified(CBArgPos, /* AA */ nullptr, UsedAssumedInformation);
 
       // Every call site argument might be marked "noundef".
       getOrCreateAAFor<AANoUndef>(CBArgPos);
@@ -3071,12 +3032,12 @@ void Attributor::identifyDefaultAbstractAttributes(Function &F) {
           IRPosition::value(*cast<LoadInst>(I).getPointerOperand()));
       if (SimplifyAllLoads)
         getAssumedSimplified(IRPosition::value(I), nullptr,
-                             UsedAssumedInformation, AA::Intraprocedural);
+                             UsedAssumedInformation);
     } else {
       auto &SI = cast<StoreInst>(I);
       getOrCreateAAFor<AAIsDead>(IRPosition::inst(I));
       getAssumedSimplified(IRPosition::value(*SI.getValueOperand()), nullptr,
-                           UsedAssumedInformation, AA::Intraprocedural);
+                           UsedAssumedInformation);
       getOrCreateAAFor<AAAlign>(IRPosition::value(*SI.getPointerOperand()));
     }
     return true;
@@ -3163,26 +3124,6 @@ raw_ostream &llvm::operator<<(raw_ostream &OS,
   return OS;
 }
 
-raw_ostream &llvm::operator<<(raw_ostream &OS,
-                              const PotentialLLVMValuesState &S) {
-  OS << "set-state(< {";
-  if (!S.isValidState())
-    OS << "full-set";
-  else {
-    for (auto &It : S.getAssumedSet()) {
-      if (auto *F = dyn_cast<Function>(It.first.getValue()))
-        OS << "@" << F->getName() << "[" << int(It.second) << "], ";
-      else
-        OS << *It.first.getValue() << "[" << int(It.second) << "], ";
-    }
-    if (S.undefIsContained())
-      OS << "undef ";
-  }
-  OS << "} >)";
-
-  return OS;
-}
-
 void AbstractAttribute::print(raw_ostream &OS) const {
   OS << "[";
   OS << getName();

diff  --git a/llvm/lib/Transforms/IPO/AttributorAttributes.cpp b/llvm/lib/Transforms/IPO/AttributorAttributes.cpp
index a9062c9a44a3a..4576fa1d236a2 100644
--- a/llvm/lib/Transforms/IPO/AttributorAttributes.cpp
+++ b/llvm/lib/Transforms/IPO/AttributorAttributes.cpp
@@ -14,14 +14,12 @@
 #include "llvm/Transforms/IPO/Attributor.h"
 
 #include "llvm/ADT/APInt.h"
-#include "llvm/ADT/DenseMapInfo.h"
 #include "llvm/ADT/MapVector.h"
 #include "llvm/ADT/SCCIterator.h"
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/SetOperations.h"
 #include "llvm/ADT/SetVector.h"
 #include "llvm/ADT/SmallPtrSet.h"
-#include "llvm/ADT/SmallVector.h"
 #include "llvm/ADT/Statistic.h"
 #include "llvm/Analysis/AliasAnalysis.h"
 #include "llvm/Analysis/AssumeBundleQueries.h"
@@ -36,12 +34,10 @@
 #include "llvm/Analysis/ValueTracking.h"
 #include "llvm/IR/Argument.h"
 #include "llvm/IR/Assumptions.h"
-#include "llvm/IR/Constant.h"
 #include "llvm/IR/Constants.h"
 #include "llvm/IR/DataLayout.h"
 #include "llvm/IR/GlobalValue.h"
 #include "llvm/IR/IRBuilder.h"
-#include "llvm/IR/InstrTypes.h"
 #include "llvm/IR/Instruction.h"
 #include "llvm/IR/Instructions.h"
 #include "llvm/IR/IntrinsicInst.h"
@@ -75,8 +71,6 @@ static cl::opt<int> MaxHeapToStackSize("max-heap-to-stack-size", cl::init(128),
 template <>
 unsigned llvm::PotentialConstantIntValuesState::MaxPotentialValues = 0;
 
-template <> unsigned llvm::PotentialLLVMValuesState::MaxPotentialValues = -1;
-
 static cl::opt<unsigned, true> MaxPotentialValues(
     "attributor-max-potential-values", cl::Hidden,
     cl::desc("Maximum number of potential values to be "
@@ -84,12 +78,6 @@ static cl::opt<unsigned, true> MaxPotentialValues(
     cl::location(llvm::PotentialConstantIntValuesState::MaxPotentialValues),
     cl::init(7));
 
-static cl::opt<int> MaxPotentialValuesIterations(
-    "attributor-max-potential-values-iterations", cl::Hidden,
-    cl::desc(
-        "Maximum number of iterations we keep dismantling potential values."),
-    cl::init(64));
-
 static cl::opt<unsigned> MaxInterferingAccesses(
     "attributor-max-interfering-accesses", cl::Hidden,
     cl::desc("Maximum number of interfering accesses to "
@@ -173,7 +161,6 @@ PIPE_OPERATOR(AAValueConstantRange)
 PIPE_OPERATOR(AAPrivatizablePtr)
 PIPE_OPERATOR(AAUndefinedBehavior)
 PIPE_OPERATOR(AAPotentialConstantValues)
-PIPE_OPERATOR(AAPotentialValues)
 PIPE_OPERATOR(AANoUndef)
 PIPE_OPERATOR(AACallEdges)
 PIPE_OPERATOR(AAFunctionReachability)
@@ -266,35 +253,228 @@ static Value *constructPointer(Type *ResTy, Type *PtrElemTy, Value *Ptr,
   return Ptr;
 }
 
+/// Recursively visit all values that might become \p IRP at some point. This
+/// will be done by looking through cast instructions, selects, phis, and calls
+/// with the "returned" attribute. Once we cannot look through the value any
+/// further, the callback \p VisitValueCB is invoked and passed the current
+/// value, the \p State, and a flag to indicate if we stripped anything.
+/// Stripped means that we unpacked the value associated with \p IRP at least
+/// once. Note that the value used for the callback may still be the value
+/// associated with \p IRP (due to PHIs). To limit how much effort is invested,
+/// we will never visit more values than specified by \p MaxValues.
+/// If \p VS does not contain the Interprocedural bit, only values valid in the
+/// scope of \p CtxI will be visited and simplification into other scopes is
+/// prevented.
+template <typename StateTy>
+static bool genericValueTraversal(
+    Attributor &A, IRPosition IRP, const AbstractAttribute &QueryingAA,
+    StateTy &State,
+    function_ref<bool(Value &, const Instruction *, StateTy &, bool)>
+        VisitValueCB,
+    const Instruction *CtxI, bool &UsedAssumedInformation,
+    bool UseValueSimplify = true, int MaxValues = 16,
+    function_ref<Value *(Value *)> StripCB = nullptr,
+    AA::ValueScope VS = AA::Interprocedural) {
+
+  struct LivenessInfo {
+    const AAIsDead *LivenessAA = nullptr;
+    bool AnyDead = false;
+  };
+  SmallMapVector<const Function *, LivenessInfo, 4> LivenessAAs;
+  auto GetLivenessInfo = [&](const Function &F) -> LivenessInfo & {
+    LivenessInfo &LI = LivenessAAs[&F];
+    if (!LI.LivenessAA)
+      LI.LivenessAA = &A.getAAFor<AAIsDead>(QueryingAA, IRPosition::function(F),
+                                            DepClassTy::NONE);
+    return LI;
+  };
+
+  Value *InitialV = &IRP.getAssociatedValue();
+  using Item = std::pair<Value *, const Instruction *>;
+  SmallSet<Item, 16> Visited;
+  SmallVector<Item, 16> Worklist;
+  Worklist.push_back({InitialV, CtxI});
+
+  int Iteration = 0;
+  do {
+    Item I = Worklist.pop_back_val();
+    Value *V = I.first;
+    CtxI = I.second;
+    if (StripCB)
+      V = StripCB(V);
+
+    // Check if we should process the current value. To prevent endless
+    // recursion keep a record of the values we followed!
+    if (!Visited.insert(I).second)
+      continue;
+
+    // Make sure we limit the compile time for complex expressions.
+    if (Iteration++ >= MaxValues) {
+      LLVM_DEBUG(dbgs() << "Generic value traversal reached iteration limit: "
+                        << Iteration << "!\n");
+      return false;
+    }
+
+    // Explicitly look through calls with a "returned" attribute if we do
+    // not have a pointer as stripPointerCasts only works on them.
+    Value *NewV = nullptr;
+    if (V->getType()->isPointerTy()) {
+      NewV = V->stripPointerCasts();
+    } else {
+      auto *CB = dyn_cast<CallBase>(V);
+      if (CB && CB->getCalledFunction()) {
+        for (Argument &Arg : CB->getCalledFunction()->args())
+          if (Arg.hasReturnedAttr()) {
+            NewV = CB->getArgOperand(Arg.getArgNo());
+            break;
+          }
+      }
+    }
+    if (NewV && NewV != V) {
+      Worklist.push_back({NewV, CtxI});
+      continue;
+    }
+
+    // Look through select instructions, visit assumed potential values.
+    if (auto *SI = dyn_cast<SelectInst>(V)) {
+      Optional<Constant *> C = A.getAssumedConstant(
+          *SI->getCondition(), QueryingAA, UsedAssumedInformation);
+      bool NoValueYet = !C.hasValue();
+      if (NoValueYet || isa_and_nonnull<UndefValue>(*C))
+        continue;
+      if (auto *CI = dyn_cast_or_null<ConstantInt>(*C)) {
+        if (CI->isZero())
+          Worklist.push_back({SI->getFalseValue(), CtxI});
+        else
+          Worklist.push_back({SI->getTrueValue(), CtxI});
+        continue;
+      }
+      // We could not simplify the condition, assume both values.(
+      Worklist.push_back({SI->getTrueValue(), CtxI});
+      Worklist.push_back({SI->getFalseValue(), CtxI});
+      continue;
+    }
+
+    // Look through phi nodes, visit all live operands.
+    if (auto *PHI = dyn_cast<PHINode>(V)) {
+      LivenessInfo &LI = GetLivenessInfo(*PHI->getFunction());
+      for (unsigned u = 0, e = PHI->getNumIncomingValues(); u < e; u++) {
+        BasicBlock *IncomingBB = PHI->getIncomingBlock(u);
+        if (LI.LivenessAA->isEdgeDead(IncomingBB, PHI->getParent())) {
+          LI.AnyDead = true;
+          UsedAssumedInformation |= !LI.LivenessAA->isAtFixpoint();
+          continue;
+        }
+        Worklist.push_back(
+            {PHI->getIncomingValue(u), IncomingBB->getTerminator()});
+      }
+      continue;
+    }
+
+    if (auto *Arg = dyn_cast<Argument>(V)) {
+      if ((VS & AA::Interprocedural) && !Arg->hasPassPointeeByValueCopyAttr()) {
+        SmallVector<Item> CallSiteValues;
+        bool UsedAssumedInformation = false;
+        if (A.checkForAllCallSites(
+                [&](AbstractCallSite ACS) {
+                  // Callbacks might not have a corresponding call site operand,
+                  // stick with the argument in that case.
+                  Value *CSOp = ACS.getCallArgOperand(*Arg);
+                  if (!CSOp)
+                    return false;
+                  CallSiteValues.push_back({CSOp, ACS.getInstruction()});
+                  return true;
+                },
+                *Arg->getParent(), true, &QueryingAA, UsedAssumedInformation)) {
+          Worklist.append(CallSiteValues);
+          continue;
+        }
+      }
+    }
+
+    if (UseValueSimplify && !isa<Constant>(V)) {
+      Optional<Value *> SimpleV =
+          A.getAssumedSimplified(*V, QueryingAA, UsedAssumedInformation);
+      if (!SimpleV.hasValue())
+        continue;
+      Value *NewV = SimpleV.getValue();
+      if (NewV && NewV != V) {
+        if ((VS & AA::Interprocedural) || !CtxI ||
+            AA::isValidInScope(*NewV, CtxI->getFunction())) {
+          Worklist.push_back({NewV, CtxI});
+          continue;
+        }
+      }
+    }
+
+    if (auto *LI = dyn_cast<LoadInst>(V)) {
+      bool UsedAssumedInformation = false;
+      // If we ask for the potentially loaded values from the initial pointer we
+      // will simply end up here again. The load is as far as we can make it.
+      if (LI->getPointerOperand() != InitialV) {
+        SmallSetVector<Value *, 4> PotentialCopies;
+        SmallSetVector<Instruction *, 4> PotentialValueOrigins;
+        if (AA::getPotentiallyLoadedValues(A, *LI, PotentialCopies,
+                                           PotentialValueOrigins, QueryingAA,
+                                           UsedAssumedInformation,
+                                           /* OnlyExact */ true)) {
+          // Values have to be dynamically unique or we loose the fact that a
+          // single llvm::Value might represent two runtime values (e.g., stack
+          // locations in 
diff erent recursive calls).
+          bool DynamicallyUnique =
+              llvm::all_of(PotentialCopies, [&A, &QueryingAA](Value *PC) {
+                return AA::isDynamicallyUnique(A, QueryingAA, *PC);
+              });
+          if (DynamicallyUnique &&
+              ((VS & AA::Interprocedural) || !CtxI ||
+               llvm::all_of(PotentialCopies, [CtxI](Value *PC) {
+                 return AA::isValidInScope(*PC, CtxI->getFunction());
+               }))) {
+            for (auto *PotentialCopy : PotentialCopies)
+              Worklist.push_back({PotentialCopy, CtxI});
+            continue;
+          }
+        }
+      }
+    }
+
+    // Once a leaf is reached we inform the user through the callback.
+    if (!VisitValueCB(*V, CtxI, State, Iteration > 1)) {
+      LLVM_DEBUG(dbgs() << "Generic value traversal visit callback failed for: "
+                        << *V << "!\n");
+      return false;
+    }
+  } while (!Worklist.empty());
+
+  // If we actually used liveness information so we have to record a dependence.
+  for (auto &It : LivenessAAs)
+    if (It.second.AnyDead)
+      A.recordDependence(*It.second.LivenessAA, QueryingAA,
+                         DepClassTy::OPTIONAL);
+
+  // All values have been visited.
+  return true;
+}
+
 bool AA::getAssumedUnderlyingObjects(Attributor &A, const Value &Ptr,
-                                     SmallSetVector<Value *, 8> &Objects,
+                                     SmallVectorImpl<Value *> &Objects,
                                      const AbstractAttribute &QueryingAA,
                                      const Instruction *CtxI,
                                      bool &UsedAssumedInformation,
-                                     AA::ValueScope S,
-                                     SmallPtrSetImpl<Value *> *SeenObjects) {
-  SmallPtrSet<Value *, 8> LocalSeenObjects;
-  if (!SeenObjects)
-    SeenObjects = &LocalSeenObjects;
-
-  SmallVector<AA::ValueAndContext> Values;
-  if (!A.getAssumedSimplifiedValues(IRPosition::value(Ptr), &QueryingAA, Values,
-                                    S, UsedAssumedInformation)) {
-    Objects.insert(const_cast<Value *>(&Ptr));
+                                     AA::ValueScope VS) {
+  auto StripCB = [&](Value *V) { return getUnderlyingObject(V); };
+  SmallPtrSet<Value *, 8> SeenObjects;
+  auto VisitValueCB = [&SeenObjects](Value &Val, const Instruction *,
+                                     SmallVectorImpl<Value *> &Objects,
+                                     bool) -> bool {
+    if (SeenObjects.insert(&Val).second)
+      Objects.push_back(&Val);
     return true;
-  }
-
-  for (auto &VAC : Values) {
-    Value *UO = getUnderlyingObject(VAC.getValue());
-    if (UO && UO != VAC.getValue() && SeenObjects->insert(UO).second) {
-      if (!getAssumedUnderlyingObjects(A, *UO, Objects, QueryingAA,
-                                       VAC.getCtxI(), UsedAssumedInformation, S,
-                                       SeenObjects))
-        return false;
-      continue;
-    }
-    Objects.insert(VAC.getValue());
-  }
+  };
+  if (!genericValueTraversal<decltype(Objects)>(
+          A, IRPosition::value(Ptr), QueryingAA, Objects, VisitValueCB, CtxI,
+          UsedAssumedInformation, true, 32, StripCB, VS))
+    return false;
   return true;
 }
 
@@ -1297,9 +1477,8 @@ struct AAPointerInfoFloating : public AAPointerInfoImpl {
           return false;
         }
         bool UsedAssumedInformation = false;
-        Optional<Value *> Content =
-            A.getAssumedSimplified(*StoreI->getValueOperand(), *this,
-                                   UsedAssumedInformation, AA::Interprocedural);
+        Optional<Value *> Content = A.getAssumedSimplified(
+            *StoreI->getValueOperand(), *this, UsedAssumedInformation);
         return handleAccess(A, *StoreI, *CurPtr, Content, AccessKind::AK_WRITE,
                             OffsetInfoMap[CurPtr].Offset, Changed,
                             StoreI->getValueOperand()->getType());
@@ -1731,23 +1910,23 @@ bool AAReturnedValuesImpl::checkForAllReturnedValuesAndReturnInsts(
 ChangeStatus AAReturnedValuesImpl::updateImpl(Attributor &A) {
   ChangeStatus Changed = ChangeStatus::UNCHANGED;
 
-  SmallVector<AA::ValueAndContext> Values;
+  auto ReturnValueCB = [&](Value &V, const Instruction *CtxI, ReturnInst &Ret,
+                           bool) -> bool {
+    assert(AA::isValidInScope(V, Ret.getFunction()) &&
+           "Assumed returned value should be valid in function scope!");
+    if (ReturnedValues[&V].insert(&Ret))
+      Changed = ChangeStatus::CHANGED;
+    return true;
+  };
+
   bool UsedAssumedInformation = false;
   auto ReturnInstCB = [&](Instruction &I) {
     ReturnInst &Ret = cast<ReturnInst>(I);
-    Values.clear();
-    if (!A.getAssumedSimplifiedValues(IRPosition::value(*Ret.getReturnValue()),
-                                      *this, Values, AA::Intraprocedural,
-                                      UsedAssumedInformation))
-      Values.push_back({*Ret.getReturnValue(), Ret});
-
-    for (auto &VAC : Values) {
-      assert(AA::isValidInScope(*VAC.getValue(), Ret.getFunction()) &&
-             "Assumed returned value should be valid in function scope!");
-      if (ReturnedValues[VAC.getValue()].insert(&Ret))
-        Changed = ChangeStatus::CHANGED;
-    }
-    return true;
+    return genericValueTraversal<ReturnInst>(
+        A, IRPosition::value(*Ret.getReturnValue()), *this, Ret, ReturnValueCB,
+        &I, UsedAssumedInformation, /* UseValueSimplify */ true,
+        /* MaxValues */ 16,
+        /* StripCB */ nullptr, AA::Intraprocedural);
   };
 
   // Discover returned values from all live returned instructions in the
@@ -2249,18 +2428,6 @@ struct AANonNullFloating : public AANonNullImpl {
   ChangeStatus updateImpl(Attributor &A) override {
     const DataLayout &DL = A.getDataLayout();
 
-    bool Stripped;
-    bool UsedAssumedInformation = false;
-    SmallVector<AA::ValueAndContext> Values;
-    if (!A.getAssumedSimplifiedValues(getIRPosition(), *this, Values,
-                                      AA::AnyScope, UsedAssumedInformation)) {
-      Values.push_back({getAssociatedValue(), getCtxI()});
-      Stripped = false;
-    } else {
-      Stripped = Values.size() != 1 ||
-                 Values.front().getValue() != &getAssociatedValue();
-    }
-
     DominatorTree *DT = nullptr;
     AssumptionCache *AC = nullptr;
     InformationCache &InfoCache = A.getInfoCache();
@@ -2269,8 +2436,8 @@ struct AANonNullFloating : public AANonNullImpl {
       AC = InfoCache.getAnalysisResultForFunction<AssumptionAnalysis>(*Fn);
     }
 
-    AANonNull::StateType T;
-    auto VisitValueCB = [&](Value &V, const Instruction *CtxI) -> bool {
+    auto VisitValueCB = [&](Value &V, const Instruction *CtxI,
+                            AANonNull::StateType &T, bool Stripped) -> bool {
       const auto &AA = A.getAAFor<AANonNull>(*this, IRPosition::value(V),
                                              DepClassTy::REQUIRED);
       if (!Stripped && this == &AA) {
@@ -2284,9 +2451,12 @@ struct AANonNullFloating : public AANonNullImpl {
       return T.isValidState();
     };
 
-    for (const auto &VAC : Values)
-      if (!VisitValueCB(*VAC.getValue(), VAC.getCtxI()))
-        return indicatePessimisticFixpoint();
+    StateType T;
+    bool UsedAssumedInformation = false;
+    if (!genericValueTraversal<StateType>(A, getIRPosition(), *this, T,
+                                          VisitValueCB, getCtxI(),
+                                          UsedAssumedInformation))
+      return indicatePessimisticFixpoint();
 
     return clampStateAndIndicateChange(getState(), T);
   }
@@ -2539,9 +2709,8 @@ struct AAUndefinedBehaviorImpl : public AAUndefinedBehavior {
         if (!NoUndefAA.isKnownNoUndef())
           continue;
         bool UsedAssumedInformation = false;
-        Optional<Value *> SimplifiedVal =
-            A.getAssumedSimplified(IRPosition::value(*ArgVal), *this,
-                                   UsedAssumedInformation, AA::Interprocedural);
+        Optional<Value *> SimplifiedVal = A.getAssumedSimplified(
+            IRPosition::value(*ArgVal), *this, UsedAssumedInformation);
         if (UsedAssumedInformation)
           continue;
         if (SimplifiedVal.hasValue() && !SimplifiedVal.getValue())
@@ -2713,9 +2882,8 @@ struct AAUndefinedBehaviorImpl : public AAUndefinedBehavior {
   Optional<Value *> stopOnUndefOrAssumed(Attributor &A, Value *V,
                                          Instruction *I) {
     bool UsedAssumedInformation = false;
-    Optional<Value *> SimplifiedV =
-        A.getAssumedSimplified(IRPosition::value(*V), *this,
-                               UsedAssumedInformation, AA::Interprocedural);
+    Optional<Value *> SimplifiedV = A.getAssumedSimplified(
+        IRPosition::value(*V), *this, UsedAssumedInformation);
     if (!UsedAssumedInformation) {
       // Don't depend on assumed values.
       if (!SimplifiedV.hasValue()) {
@@ -4153,23 +4321,10 @@ struct AADereferenceableFloating : AADereferenceableImpl {
 
   /// See AbstractAttribute::updateImpl(...).
   ChangeStatus updateImpl(Attributor &A) override {
-
-    bool Stripped;
-    bool UsedAssumedInformation = false;
-    SmallVector<AA::ValueAndContext> Values;
-    if (!A.getAssumedSimplifiedValues(getIRPosition(), *this, Values,
-                                      AA::AnyScope, UsedAssumedInformation)) {
-      Values.push_back({getAssociatedValue(), getCtxI()});
-      Stripped = false;
-    } else {
-      Stripped = Values.size() != 1 ||
-                 Values.front().getValue() != &getAssociatedValue();
-    }
-
     const DataLayout &DL = A.getDataLayout();
-    DerefState T;
 
-    auto VisitValueCB = [&](const Value &V) -> bool {
+    auto VisitValueCB = [&](const Value &V, const Instruction *, DerefState &T,
+                            bool Stripped) -> bool {
       unsigned IdxWidth =
           DL.getIndexSizeInBits(V.getType()->getPointerAddressSpace());
       APInt Offset(IdxWidth, 0);
@@ -4222,9 +4377,12 @@ struct AADereferenceableFloating : AADereferenceableImpl {
       return T.isValidState();
     };
 
-    for (const auto &VAC : Values)
-      if (!VisitValueCB(*VAC.getValue()))
-        return indicatePessimisticFixpoint();
+    DerefState T;
+    bool UsedAssumedInformation = false;
+    if (!genericValueTraversal<DerefState>(A, getIRPosition(), *this, T,
+                                           VisitValueCB, getCtxI(),
+                                           UsedAssumedInformation))
+      return indicatePessimisticFixpoint();
 
     return clampStateAndIndicateChange(getState(), T);
   }
@@ -4452,20 +4610,8 @@ struct AAAlignFloating : AAAlignImpl {
   ChangeStatus updateImpl(Attributor &A) override {
     const DataLayout &DL = A.getDataLayout();
 
-    bool Stripped;
-    bool UsedAssumedInformation = false;
-    SmallVector<AA::ValueAndContext> Values;
-    if (!A.getAssumedSimplifiedValues(getIRPosition(), *this, Values,
-                                      AA::AnyScope, UsedAssumedInformation)) {
-      Values.push_back({getAssociatedValue(), getCtxI()});
-      Stripped = false;
-    } else {
-      Stripped = Values.size() != 1 ||
-                 Values.front().getValue() != &getAssociatedValue();
-    }
-
-    StateType T;
-    auto VisitValueCB = [&](Value &V) -> bool {
+    auto VisitValueCB = [&](Value &V, const Instruction *,
+                            AAAlign::StateType &T, bool Stripped) -> bool {
       if (isa<UndefValue>(V) || isa<ConstantPointerNull>(V))
         return true;
       const auto &AA = A.getAAFor<AAAlign>(*this, IRPosition::value(V),
@@ -4498,13 +4644,15 @@ struct AAAlignFloating : AAAlignImpl {
       return T.isValidState();
     };
 
-    for (const auto &VAC : Values) {
-      if (!VisitValueCB(*VAC.getValue()))
-        return indicatePessimisticFixpoint();
-    }
+    StateType T;
+    bool UsedAssumedInformation = false;
+    if (!genericValueTraversal<StateType>(A, getIRPosition(), *this, T,
+                                          VisitValueCB, getCtxI(),
+                                          UsedAssumedInformation))
+      return indicatePessimisticFixpoint();
 
-    //  TODO: If we know we visited all incoming values, thus no are assumed
-    //  dead, we can take the known information from the state T.
+    // TODO: If we know we visited all incoming values, thus no are assumed
+    // dead, we can take the known information from the state T.
     return clampStateAndIndicateChange(getState(), T);
   }
 
@@ -5328,8 +5476,8 @@ struct AAValueSimplifyImpl : AAValueSimplify {
     if (const auto &NewV = VMap.lookup(&V))
       return NewV;
     bool UsedAssumedInformation = false;
-    Optional<Value *> SimpleV = A.getAssumedSimplified(
-        V, QueryingAA, UsedAssumedInformation, AA::Interprocedural);
+    Optional<Value *> SimpleV =
+        A.getAssumedSimplified(V, QueryingAA, UsedAssumedInformation);
     if (!SimpleV.hasValue())
       return PoisonValue::get(&Ty);
     Value *EffectiveV = &V;
@@ -5372,8 +5520,8 @@ struct AAValueSimplifyImpl : AAValueSimplify {
     bool UsedAssumedInformation = false;
     Optional<Value *> QueryingValueSimplified = &IRP.getAssociatedValue();
     if (Simplify)
-      QueryingValueSimplified = A.getAssumedSimplified(
-          IRP, QueryingAA, UsedAssumedInformation, AA::Interprocedural);
+      QueryingValueSimplified =
+          A.getAssumedSimplified(IRP, QueryingAA, UsedAssumedInformation);
     return unionAssumed(QueryingValueSimplified);
   }
 
@@ -5574,11 +5722,209 @@ struct AAValueSimplifyFloating : AAValueSimplifyImpl {
       indicatePessimisticFixpoint();
   }
 
+  /// Check if \p Cmp is a comparison we can simplify.
+  ///
+  /// We handle multiple cases, one in which at least one operand is an
+  /// (assumed) nullptr. If so, try to simplify it using AANonNull on the other
+  /// operand. Return true if successful, in that case SimplifiedAssociatedValue
+  /// will be updated.
+  bool handleCmp(Attributor &A, CmpInst &Cmp) {
+    auto Union = [&](Value &V) {
+      SimplifiedAssociatedValue = AA::combineOptionalValuesInAAValueLatice(
+          SimplifiedAssociatedValue, &V, V.getType());
+      return SimplifiedAssociatedValue != Optional<Value *>(nullptr);
+    };
+
+    Value *LHS = Cmp.getOperand(0);
+    Value *RHS = Cmp.getOperand(1);
+
+    // Simplify the operands first.
+    bool UsedAssumedInformation = false;
+    const auto &SimplifiedLHS =
+        A.getAssumedSimplified(IRPosition::value(*LHS, getCallBaseContext()),
+                               *this, UsedAssumedInformation);
+    if (!SimplifiedLHS.hasValue())
+      return true;
+    if (!SimplifiedLHS.getValue())
+      return false;
+    LHS = *SimplifiedLHS;
+
+    const auto &SimplifiedRHS =
+        A.getAssumedSimplified(IRPosition::value(*RHS, getCallBaseContext()),
+                               *this, UsedAssumedInformation);
+    if (!SimplifiedRHS.hasValue())
+      return true;
+    if (!SimplifiedRHS.getValue())
+      return false;
+    RHS = *SimplifiedRHS;
+
+    LLVMContext &Ctx = Cmp.getContext();
+    // Handle the trivial case first in which we don't even need to think about
+    // null or non-null.
+    if (LHS == RHS && (Cmp.isTrueWhenEqual() || Cmp.isFalseWhenEqual())) {
+      Constant *NewVal =
+          ConstantInt::get(Type::getInt1Ty(Ctx), Cmp.isTrueWhenEqual());
+      if (!Union(*NewVal))
+        return false;
+      if (!UsedAssumedInformation)
+        indicateOptimisticFixpoint();
+      return true;
+    }
+
+    // From now on we only handle equalities (==, !=).
+    ICmpInst *ICmp = dyn_cast<ICmpInst>(&Cmp);
+    if (!ICmp || !ICmp->isEquality())
+      return false;
+
+    bool LHSIsNull = isa<ConstantPointerNull>(LHS);
+    bool RHSIsNull = isa<ConstantPointerNull>(RHS);
+    if (!LHSIsNull && !RHSIsNull)
+      return false;
+
+    // Left is the nullptr ==/!= non-nullptr case. We'll use AANonNull on the
+    // non-nullptr operand and if we assume it's non-null we can conclude the
+    // result of the comparison.
+    assert((LHSIsNull || RHSIsNull) &&
+           "Expected nullptr versus non-nullptr comparison at this point");
+
+    // The index is the operand that we assume is not null.
+    unsigned PtrIdx = LHSIsNull;
+    auto &PtrNonNullAA = A.getAAFor<AANonNull>(
+        *this, IRPosition::value(*ICmp->getOperand(PtrIdx)),
+        DepClassTy::REQUIRED);
+    if (!PtrNonNullAA.isAssumedNonNull())
+      return false;
+    UsedAssumedInformation |= !PtrNonNullAA.isKnownNonNull();
+
+    // The new value depends on the predicate, true for != and false for ==.
+    Constant *NewVal = ConstantInt::get(
+        Type::getInt1Ty(Ctx), ICmp->getPredicate() == CmpInst::ICMP_NE);
+    if (!Union(*NewVal))
+      return false;
+
+    if (!UsedAssumedInformation)
+      indicateOptimisticFixpoint();
+
+    return true;
+  }
+
+  /// Use the generic, non-optimistic InstSimplfy functionality if we managed to
+  /// simplify any operand of the instruction \p I. Return true if successful,
+  /// in that case SimplifiedAssociatedValue will be updated.
+  bool handleGenericInst(Attributor &A, Instruction &I) {
+    bool SomeSimplified = false;
+    bool UsedAssumedInformation = false;
+
+    SmallVector<Value *, 8> NewOps(I.getNumOperands());
+    int Idx = 0;
+    for (Value *Op : I.operands()) {
+      const auto &SimplifiedOp =
+          A.getAssumedSimplified(IRPosition::value(*Op, getCallBaseContext()),
+                                 *this, UsedAssumedInformation);
+      // If we are not sure about any operand we are not sure about the entire
+      // instruction, we'll wait.
+      if (!SimplifiedOp.hasValue())
+        return true;
+
+      if (SimplifiedOp.getValue())
+        NewOps[Idx] = SimplifiedOp.getValue();
+      else
+        NewOps[Idx] = Op;
+
+      SomeSimplified |= (NewOps[Idx] != Op);
+      ++Idx;
+    }
+
+    // We won't bother with the InstSimplify interface if we didn't simplify any
+    // operand ourselves.
+    if (!SomeSimplified)
+      return false;
+
+    InformationCache &InfoCache = A.getInfoCache();
+    Function *F = I.getFunction();
+    const auto *DT =
+        InfoCache.getAnalysisResultForFunction<DominatorTreeAnalysis>(*F);
+    const auto *TLI = A.getInfoCache().getTargetLibraryInfoForFunction(*F);
+    auto *AC = InfoCache.getAnalysisResultForFunction<AssumptionAnalysis>(*F);
+    OptimizationRemarkEmitter *ORE = nullptr;
+
+    const DataLayout &DL = I.getModule()->getDataLayout();
+    SimplifyQuery Q(DL, TLI, DT, AC, &I);
+    if (Value *SimplifiedI =
+            simplifyInstructionWithOperands(&I, NewOps, Q, ORE)) {
+      SimplifiedAssociatedValue = AA::combineOptionalValuesInAAValueLatice(
+          SimplifiedAssociatedValue, SimplifiedI, I.getType());
+      return SimplifiedAssociatedValue != Optional<Value *>(nullptr);
+    }
+    return false;
+  }
+
   /// See AbstractAttribute::updateImpl(...).
   ChangeStatus updateImpl(Attributor &A) override {
     auto Before = SimplifiedAssociatedValue;
-    if (!askSimplifiedValueForOtherAAs(A))
-      return indicatePessimisticFixpoint();
+
+    // Do not simplify loads that are only used in llvm.assume if we cannot also
+    // remove all stores that may feed into the load. The reason is that the
+    // assume is probably worth something as long as the stores are around.
+    if (auto *LI = dyn_cast<LoadInst>(&getAssociatedValue())) {
+      InformationCache &InfoCache = A.getInfoCache();
+      if (InfoCache.isOnlyUsedByAssume(*LI)) {
+        SmallSetVector<Value *, 4> PotentialCopies;
+        SmallSetVector<Instruction *, 4> PotentialValueOrigins;
+        bool UsedAssumedInformation = false;
+        if (AA::getPotentiallyLoadedValues(A, *LI, PotentialCopies,
+                                           PotentialValueOrigins, *this,
+                                           UsedAssumedInformation,
+                                           /* OnlyExact */ true)) {
+          if (!llvm::all_of(PotentialValueOrigins, [&](Instruction *I) {
+                if (!I)
+                  return true;
+                if (auto *SI = dyn_cast<StoreInst>(I))
+                  return A.isAssumedDead(SI->getOperandUse(0), this,
+                                         /* LivenessAA */ nullptr,
+                                         UsedAssumedInformation,
+                                         /* CheckBBLivenessOnly */ false);
+                return A.isAssumedDead(*I, this, /* LivenessAA */ nullptr,
+                                       UsedAssumedInformation,
+                                       /* CheckBBLivenessOnly */ false);
+              }))
+            return indicatePessimisticFixpoint();
+        }
+      }
+    }
+
+    auto VisitValueCB = [&](Value &V, const Instruction *CtxI, bool &,
+                            bool Stripped) -> bool {
+      auto &AA = A.getAAFor<AAValueSimplify>(
+          *this, IRPosition::value(V, getCallBaseContext()),
+          DepClassTy::REQUIRED);
+      if (!Stripped && this == &AA) {
+
+        if (auto *I = dyn_cast<Instruction>(&V)) {
+          if (auto *Cmp = dyn_cast<CmpInst>(&V))
+            if (handleCmp(A, *Cmp))
+              return true;
+          if (handleGenericInst(A, *I))
+            return true;
+        }
+        // TODO: Look the instruction and check recursively.
+
+        LLVM_DEBUG(dbgs() << "[ValueSimplify] Can't be stripped more : " << V
+                          << "\n");
+        return false;
+      }
+      return checkAndUpdate(A, *this,
+                            IRPosition::value(V, getCallBaseContext()));
+    };
+
+    bool Dummy = false;
+    bool UsedAssumedInformation = false;
+    if (!genericValueTraversal<bool>(A, getIRPosition(), *this, Dummy,
+                                     VisitValueCB, getCtxI(),
+                                     UsedAssumedInformation,
+                                     /* UseValueSimplify */ false))
+      if (!askSimplifiedValueForOtherAAs(A))
+        return indicatePessimisticFixpoint();
 
     // If a candicate was found in this update, return CHANGED.
     return Before == SimplifiedAssociatedValue ? ChangeStatus::UNCHANGED
@@ -6017,36 +6363,44 @@ ChangeStatus AAHeapToStackFunction::updateImpl(Attributor &A) {
                           /* CheckBBLivenessOnly */ true))
         continue;
 
-      // Use the non-optimistic version to get the freed object.
-      Value *Obj = getUnderlyingObject(DI.CB->getArgOperand(0));
-      if (!Obj) {
-        LLVM_DEBUG(dbgs() << "[H2S] Unknown underlying object for free!\n");
+      // Use the optimistic version to get the freed objects, ignoring dead
+      // branches etc.
+      SmallVector<Value *, 8> Objects;
+      if (!AA::getAssumedUnderlyingObjects(A, *DI.CB->getArgOperand(0), Objects,
+                                           *this, DI.CB,
+                                           UsedAssumedInformation)) {
+        LLVM_DEBUG(
+            dbgs()
+            << "[H2S] Unexpected failure in getAssumedUnderlyingObjects!\n");
         DI.MightFreeUnknownObjects = true;
         continue;
       }
 
-      // Free of null and undef can be ignored as no-ops (or UB in the latter
-      // case).
-      if (isa<ConstantPointerNull>(Obj) || isa<UndefValue>(Obj))
-        continue;
+      // Check each object explicitly.
+      for (auto *Obj : Objects) {
+        // Free of null and undef can be ignored as no-ops (or UB in the latter
+        // case).
+        if (isa<ConstantPointerNull>(Obj) || isa<UndefValue>(Obj))
+          continue;
 
-      CallBase *ObjCB = dyn_cast<CallBase>(Obj);
-      if (!ObjCB) {
-        LLVM_DEBUG(dbgs() << "[H2S] Free of a non-call object: " << *Obj
-                          << "\n");
-        DI.MightFreeUnknownObjects = true;
-        continue;
-      }
+        CallBase *ObjCB = dyn_cast<CallBase>(Obj);
+        if (!ObjCB) {
+          LLVM_DEBUG(dbgs()
+                     << "[H2S] Free of a non-call object: " << *Obj << "\n");
+          DI.MightFreeUnknownObjects = true;
+          continue;
+        }
 
-      AllocationInfo *AI = AllocationInfos.lookup(ObjCB);
-      if (!AI) {
-        LLVM_DEBUG(dbgs() << "[H2S] Free of a non-allocation object: " << *Obj
-                          << "\n");
-        DI.MightFreeUnknownObjects = true;
-        continue;
-      }
+        AllocationInfo *AI = AllocationInfos.lookup(ObjCB);
+        if (!AI) {
+          LLVM_DEBUG(dbgs() << "[H2S] Free of a non-allocation object: " << *Obj
+                            << "\n");
+          DI.MightFreeUnknownObjects = true;
+          continue;
+        }
 
-      DI.PotentialAllocationCalls.insert(ObjCB);
+        DI.PotentialAllocationCalls.insert(ObjCB);
+      }
     }
   };
 
@@ -6206,14 +6560,15 @@ ChangeStatus AAHeapToStackFunction::updateImpl(Attributor &A) {
         AI.Status = AllocationInfo::INVALID;
         Changed = ChangeStatus::CHANGED;
         continue;
-      }
-      if (APAlign->ugt(llvm::Value::MaximumAlignment) ||
-          !APAlign->isPowerOf2()) {
-        LLVM_DEBUG(dbgs() << "[H2S] Invalid allocation alignment: " << APAlign
-                          << "\n");
-        AI.Status = AllocationInfo::INVALID;
-        Changed = ChangeStatus::CHANGED;
-        continue;
+      } else {
+        if (APAlign->ugt(llvm::Value::MaximumAlignment) ||
+            !APAlign->isPowerOf2()) {
+          LLVM_DEBUG(dbgs() << "[H2S] Invalid allocation alignment: " << APAlign
+                            << "\n");
+          AI.Status = AllocationInfo::INVALID;
+          Changed = ChangeStatus::CHANGED;
+          continue;
+        }
       }
     }
 
@@ -7640,7 +7995,7 @@ void AAMemoryLocationImpl::categorizePtrValue(
                     << Ptr << " ["
                     << getMemoryLocationsAsStr(State.getAssumed()) << "]\n");
 
-  SmallSetVector<Value *, 8> Objects;
+  SmallVector<Value *, 8> Objects;
   bool UsedAssumedInformation = false;
   if (!AA::getAssumedUnderlyingObjects(A, Ptr, Objects, *this, &I,
                                        UsedAssumedInformation,
@@ -8249,18 +8604,18 @@ struct AAValueConstantRangeFloating : AAValueConstantRangeImpl {
 
     // Simplify the operands first.
     bool UsedAssumedInformation = false;
-    const auto &SimplifiedLHS = A.getAssumedSimplified(
-        IRPosition::value(*LHS, getCallBaseContext()), *this,
-        UsedAssumedInformation, AA::Interprocedural);
+    const auto &SimplifiedLHS =
+        A.getAssumedSimplified(IRPosition::value(*LHS, getCallBaseContext()),
+                               *this, UsedAssumedInformation);
     if (!SimplifiedLHS.hasValue())
       return true;
     if (!SimplifiedLHS.getValue())
       return false;
     LHS = *SimplifiedLHS;
 
-    const auto &SimplifiedRHS = A.getAssumedSimplified(
-        IRPosition::value(*RHS, getCallBaseContext()), *this,
-        UsedAssumedInformation, AA::Interprocedural);
+    const auto &SimplifiedRHS =
+        A.getAssumedSimplified(IRPosition::value(*RHS, getCallBaseContext()),
+                               *this, UsedAssumedInformation);
     if (!SimplifiedRHS.hasValue())
       return true;
     if (!SimplifiedRHS.getValue())
@@ -8302,9 +8657,9 @@ struct AAValueConstantRangeFloating : AAValueConstantRangeImpl {
 
     // Simplify the operand first.
     bool UsedAssumedInformation = false;
-    const auto &SimplifiedOpV = A.getAssumedSimplified(
-        IRPosition::value(*OpV, getCallBaseContext()), *this,
-        UsedAssumedInformation, AA::Interprocedural);
+    const auto &SimplifiedOpV =
+        A.getAssumedSimplified(IRPosition::value(*OpV, getCallBaseContext()),
+                               *this, UsedAssumedInformation);
     if (!SimplifiedOpV.hasValue())
       return true;
     if (!SimplifiedOpV.getValue())
@@ -8332,18 +8687,18 @@ struct AAValueConstantRangeFloating : AAValueConstantRangeImpl {
 
     // Simplify the operands first.
     bool UsedAssumedInformation = false;
-    const auto &SimplifiedLHS = A.getAssumedSimplified(
-        IRPosition::value(*LHS, getCallBaseContext()), *this,
-        UsedAssumedInformation, AA::Interprocedural);
+    const auto &SimplifiedLHS =
+        A.getAssumedSimplified(IRPosition::value(*LHS, getCallBaseContext()),
+                               *this, UsedAssumedInformation);
     if (!SimplifiedLHS.hasValue())
       return true;
     if (!SimplifiedLHS.getValue())
       return false;
     LHS = *SimplifiedLHS;
 
-    const auto &SimplifiedRHS = A.getAssumedSimplified(
-        IRPosition::value(*RHS, getCallBaseContext()), *this,
-        UsedAssumedInformation, AA::Interprocedural);
+    const auto &SimplifiedRHS =
+        A.getAssumedSimplified(IRPosition::value(*RHS, getCallBaseContext()),
+                               *this, UsedAssumedInformation);
     if (!SimplifiedRHS.hasValue())
       return true;
     if (!SimplifiedRHS.getValue())
@@ -8399,17 +8754,16 @@ struct AAValueConstantRangeFloating : AAValueConstantRangeImpl {
 
   /// See AbstractAttribute::updateImpl(...).
   ChangeStatus updateImpl(Attributor &A) override {
-
-    IntegerRangeState T(getBitWidth());
-    auto VisitValueCB = [&](Value &V, const Instruction *CtxI) -> bool {
+    auto VisitValueCB = [&](Value &V, const Instruction *CtxI,
+                            IntegerRangeState &T, bool Stripped) -> bool {
       Instruction *I = dyn_cast<Instruction>(&V);
       if (!I || isa<CallBase>(I)) {
 
         // Simplify the operand first.
         bool UsedAssumedInformation = false;
-        const auto &SimplifiedOpV = A.getAssumedSimplified(
-            IRPosition::value(V, getCallBaseContext()), *this,
-            UsedAssumedInformation, AA::Interprocedural);
+        const auto &SimplifiedOpV =
+            A.getAssumedSimplified(IRPosition::value(V, getCallBaseContext()),
+                                   *this, UsedAssumedInformation);
         if (!SimplifiedOpV.hasValue())
           return true;
         if (!SimplifiedOpV.getValue())
@@ -8460,7 +8814,13 @@ struct AAValueConstantRangeFloating : AAValueConstantRangeImpl {
       return T.isValidState();
     };
 
-    if (!VisitValueCB(getAssociatedValue(), getCtxI()))
+    IntegerRangeState T(getBitWidth());
+
+    bool UsedAssumedInformation = false;
+    if (!genericValueTraversal<IntegerRangeState>(A, getIRPosition(), *this, T,
+                                                  VisitValueCB, getCtxI(),
+                                                  UsedAssumedInformation,
+                                                  /* UseValueSimplify */ false))
       return indicatePessimisticFixpoint();
 
     // Ensure that long def-use chains can't cause circular reasoning either by
@@ -8572,36 +8932,6 @@ struct AAPotentialConstantValuesImpl : AAPotentialConstantValues {
       AAPotentialConstantValues::initialize(A);
   }
 
-  bool fillSetWithConstantValues(Attributor &A, const IRPosition &IRP, SetTy &S,
-                                 bool &ContainsUndef) {
-    SmallVector<AA::ValueAndContext> Values;
-    bool UsedAssumedInformation = false;
-    if (!A.getAssumedSimplifiedValues(IRP, *this, Values, AA::Interprocedural,
-                                      UsedAssumedInformation)) {
-      if (!IRP.getAssociatedType()->isIntegerTy())
-        return false;
-      auto &PotentialValuesAA = A.getAAFor<AAPotentialConstantValues>(
-          *this, IRP, DepClassTy::REQUIRED);
-      if (!PotentialValuesAA.getState().isValidState())
-        return false;
-      ContainsUndef = PotentialValuesAA.getState().undefIsContained();
-      S = PotentialValuesAA.getState().getAssumedSet();
-      return true;
-    }
-
-    for (auto &It : Values) {
-      if (isa<UndefValue>(It.getValue()))
-        continue;
-      auto *CI = dyn_cast<ConstantInt>(It.getValue());
-      if (!CI)
-        return false;
-      S.insert(CI->getValue());
-    }
-    ContainsUndef = S.empty();
-
-    return true;
-  }
-
   /// See AbstractAttribute::getAsStr().
   const std::string getAsStr() const override {
     std::string Str;
@@ -8790,22 +9120,50 @@ struct AAPotentialConstantValuesFloating : AAPotentialConstantValuesImpl {
     Value *LHS = ICI->getOperand(0);
     Value *RHS = ICI->getOperand(1);
 
-    bool LHSContainsUndef = false, RHSContainsUndef = false;
-    SetTy LHSAAPVS, RHSAAPVS;
-    if (!fillSetWithConstantValues(A, IRPosition::value(*LHS), LHSAAPVS,
-                                   LHSContainsUndef) ||
-        !fillSetWithConstantValues(A, IRPosition::value(*RHS), RHSAAPVS,
-                                   RHSContainsUndef))
+    // Simplify the operands first.
+    bool UsedAssumedInformation = false;
+    const auto &SimplifiedLHS =
+        A.getAssumedSimplified(IRPosition::value(*LHS, getCallBaseContext()),
+                               *this, UsedAssumedInformation);
+    if (!SimplifiedLHS.hasValue())
+      return ChangeStatus::UNCHANGED;
+    if (!SimplifiedLHS.getValue())
+      return indicatePessimisticFixpoint();
+    LHS = *SimplifiedLHS;
+
+    const auto &SimplifiedRHS =
+        A.getAssumedSimplified(IRPosition::value(*RHS, getCallBaseContext()),
+                               *this, UsedAssumedInformation);
+    if (!SimplifiedRHS.hasValue())
+      return ChangeStatus::UNCHANGED;
+    if (!SimplifiedRHS.getValue())
+      return indicatePessimisticFixpoint();
+    RHS = *SimplifiedRHS;
+
+    if (!LHS->getType()->isIntegerTy() || !RHS->getType()->isIntegerTy())
+      return indicatePessimisticFixpoint();
+
+    auto &LHSAA = A.getAAFor<AAPotentialConstantValues>(
+        *this, IRPosition::value(*LHS), DepClassTy::REQUIRED);
+    if (!LHSAA.isValidState())
+      return indicatePessimisticFixpoint();
+
+    auto &RHSAA = A.getAAFor<AAPotentialConstantValues>(
+        *this, IRPosition::value(*RHS), DepClassTy::REQUIRED);
+    if (!RHSAA.isValidState())
       return indicatePessimisticFixpoint();
 
+    const SetTy &LHSAAPVS = LHSAA.getAssumedSet();
+    const SetTy &RHSAAPVS = RHSAA.getAssumedSet();
+
     // TODO: make use of undef flag to limit potential values aggressively.
     bool MaybeTrue = false, MaybeFalse = false;
     const APInt Zero(RHS->getType()->getIntegerBitWidth(), 0);
-    if (LHSContainsUndef && RHSContainsUndef) {
+    if (LHSAA.undefIsContained() && RHSAA.undefIsContained()) {
       // The result of any comparison between undefs can be soundly replaced
       // with undef.
       unionAssumedWithUndef();
-    } else if (LHSContainsUndef) {
+    } else if (LHSAA.undefIsContained()) {
       for (const APInt &R : RHSAAPVS) {
         bool CmpResult = calculateICmpInst(ICI, Zero, R);
         MaybeTrue |= CmpResult;
@@ -8813,7 +9171,7 @@ struct AAPotentialConstantValuesFloating : AAPotentialConstantValuesImpl {
         if (MaybeTrue & MaybeFalse)
           return indicatePessimisticFixpoint();
       }
-    } else if (RHSContainsUndef) {
+    } else if (RHSAA.undefIsContained()) {
       for (const APInt &L : LHSAAPVS) {
         bool CmpResult = calculateICmpInst(ICI, L, Zero);
         MaybeTrue |= CmpResult;
@@ -8845,7 +9203,29 @@ struct AAPotentialConstantValuesFloating : AAPotentialConstantValuesImpl {
     Value *LHS = SI->getTrueValue();
     Value *RHS = SI->getFalseValue();
 
+    // Simplify the operands first.
     bool UsedAssumedInformation = false;
+    const auto &SimplifiedLHS =
+        A.getAssumedSimplified(IRPosition::value(*LHS, getCallBaseContext()),
+                               *this, UsedAssumedInformation);
+    if (!SimplifiedLHS.hasValue())
+      return ChangeStatus::UNCHANGED;
+    if (!SimplifiedLHS.getValue())
+      return indicatePessimisticFixpoint();
+    LHS = *SimplifiedLHS;
+
+    const auto &SimplifiedRHS =
+        A.getAssumedSimplified(IRPosition::value(*RHS, getCallBaseContext()),
+                               *this, UsedAssumedInformation);
+    if (!SimplifiedRHS.hasValue())
+      return ChangeStatus::UNCHANGED;
+    if (!SimplifiedRHS.getValue())
+      return indicatePessimisticFixpoint();
+    RHS = *SimplifiedRHS;
+
+    if (!LHS->getType()->isIntegerTy() || !RHS->getType()->isIntegerTy())
+      return indicatePessimisticFixpoint();
+
     Optional<Constant *> C = A.getAssumedConstant(*SI->getCondition(), *this,
                                                   UsedAssumedInformation);
 
@@ -8856,36 +9236,35 @@ struct AAPotentialConstantValuesFloating : AAPotentialConstantValuesImpl {
     else if (C.hasValue() && *C && (*C)->isZeroValue())
       OnlyRight = true;
 
-    bool LHSContainsUndef = false, RHSContainsUndef = false;
-    SetTy LHSAAPVS, RHSAAPVS;
-    if (!OnlyRight && !fillSetWithConstantValues(A, IRPosition::value(*LHS),
-                                                 LHSAAPVS, LHSContainsUndef))
-      return indicatePessimisticFixpoint();
-
-    if (!OnlyLeft && !fillSetWithConstantValues(A, IRPosition::value(*RHS),
-                                                RHSAAPVS, RHSContainsUndef))
-      return indicatePessimisticFixpoint();
+    const AAPotentialConstantValues *LHSAA = nullptr, *RHSAA = nullptr;
+    if (!OnlyRight) {
+      LHSAA = &A.getAAFor<AAPotentialConstantValues>(
+          *this, IRPosition::value(*LHS), DepClassTy::REQUIRED);
+      if (!LHSAA->isValidState())
+        return indicatePessimisticFixpoint();
+    }
+    if (!OnlyLeft) {
+      RHSAA = &A.getAAFor<AAPotentialConstantValues>(
+          *this, IRPosition::value(*RHS), DepClassTy::REQUIRED);
+      if (!RHSAA->isValidState())
+        return indicatePessimisticFixpoint();
+    }
 
-    if (OnlyLeft || OnlyRight) {
+    if (!LHSAA || !RHSAA) {
       // select (true/false), lhs, rhs
-      auto *OpAA = OnlyLeft ? &LHSAAPVS : &RHSAAPVS;
-      auto Undef = OnlyLeft ? LHSContainsUndef : RHSContainsUndef;
+      auto *OpAA = LHSAA ? LHSAA : RHSAA;
 
-      if (Undef)
+      if (OpAA->undefIsContained())
         unionAssumedWithUndef();
-      else {
-        for (auto &It : *OpAA)
-          unionAssumed(It);
-      }
+      else
+        unionAssumed(*OpAA);
 
-    } else if (LHSContainsUndef && RHSContainsUndef) {
+    } else if (LHSAA->undefIsContained() && RHSAA->undefIsContained()) {
       // select i1 *, undef , undef => undef
       unionAssumedWithUndef();
     } else {
-      for (auto &It : LHSAAPVS)
-        unionAssumed(It);
-      for (auto &It : RHSAAPVS)
-        unionAssumed(It);
+      unionAssumed(*LHSAA);
+      unionAssumed(*RHSAA);
     }
     return AssumedBefore == getAssumed() ? ChangeStatus::UNCHANGED
                                          : ChangeStatus::CHANGED;
@@ -8899,16 +9278,26 @@ struct AAPotentialConstantValuesFloating : AAPotentialConstantValuesImpl {
     uint32_t ResultBitWidth = CI->getDestTy()->getIntegerBitWidth();
     Value *Src = CI->getOperand(0);
 
-    bool SrcContainsUndef = false;
-    SetTy SrcPVS;
-    if (!fillSetWithConstantValues(A, IRPosition::value(*Src), SrcPVS,
-                                   SrcContainsUndef))
+    // Simplify the operand first.
+    bool UsedAssumedInformation = false;
+    const auto &SimplifiedSrc =
+        A.getAssumedSimplified(IRPosition::value(*Src, getCallBaseContext()),
+                               *this, UsedAssumedInformation);
+    if (!SimplifiedSrc.hasValue())
+      return ChangeStatus::UNCHANGED;
+    if (!SimplifiedSrc.getValue())
       return indicatePessimisticFixpoint();
+    Src = *SimplifiedSrc;
 
-    if (SrcContainsUndef)
+    auto &SrcAA = A.getAAFor<AAPotentialConstantValues>(
+        *this, IRPosition::value(*Src), DepClassTy::REQUIRED);
+    if (!SrcAA.isValidState())
+      return indicatePessimisticFixpoint();
+    const SetTy &SrcAAPVS = SrcAA.getAssumedSet();
+    if (SrcAA.undefIsContained())
       unionAssumedWithUndef();
     else {
-      for (const APInt &S : SrcPVS) {
+      for (const APInt &S : SrcAAPVS) {
         APInt T = calculateCastInst(CI, S, ResultBitWidth);
         unionAssumed(T);
       }
@@ -8922,26 +9311,53 @@ struct AAPotentialConstantValuesFloating : AAPotentialConstantValuesImpl {
     Value *LHS = BinOp->getOperand(0);
     Value *RHS = BinOp->getOperand(1);
 
-    bool LHSContainsUndef = false, RHSContainsUndef = false;
-    SetTy LHSAAPVS, RHSAAPVS;
-    if (!fillSetWithConstantValues(A, IRPosition::value(*LHS), LHSAAPVS,
-                                   LHSContainsUndef) ||
-        !fillSetWithConstantValues(A, IRPosition::value(*RHS), RHSAAPVS,
-                                   RHSContainsUndef))
+    // Simplify the operands first.
+    bool UsedAssumedInformation = false;
+    const auto &SimplifiedLHS =
+        A.getAssumedSimplified(IRPosition::value(*LHS, getCallBaseContext()),
+                               *this, UsedAssumedInformation);
+    if (!SimplifiedLHS.hasValue())
+      return ChangeStatus::UNCHANGED;
+    if (!SimplifiedLHS.getValue())
+      return indicatePessimisticFixpoint();
+    LHS = *SimplifiedLHS;
+
+    const auto &SimplifiedRHS =
+        A.getAssumedSimplified(IRPosition::value(*RHS, getCallBaseContext()),
+                               *this, UsedAssumedInformation);
+    if (!SimplifiedRHS.hasValue())
+      return ChangeStatus::UNCHANGED;
+    if (!SimplifiedRHS.getValue())
+      return indicatePessimisticFixpoint();
+    RHS = *SimplifiedRHS;
+
+    if (!LHS->getType()->isIntegerTy() || !RHS->getType()->isIntegerTy())
+      return indicatePessimisticFixpoint();
+
+    auto &LHSAA = A.getAAFor<AAPotentialConstantValues>(
+        *this, IRPosition::value(*LHS), DepClassTy::REQUIRED);
+    if (!LHSAA.isValidState())
+      return indicatePessimisticFixpoint();
+
+    auto &RHSAA = A.getAAFor<AAPotentialConstantValues>(
+        *this, IRPosition::value(*RHS), DepClassTy::REQUIRED);
+    if (!RHSAA.isValidState())
       return indicatePessimisticFixpoint();
 
+    const SetTy &LHSAAPVS = LHSAA.getAssumedSet();
+    const SetTy &RHSAAPVS = RHSAA.getAssumedSet();
     const APInt Zero = APInt(LHS->getType()->getIntegerBitWidth(), 0);
 
     // TODO: make use of undef flag to limit potential values aggressively.
-    if (LHSContainsUndef && RHSContainsUndef) {
+    if (LHSAA.undefIsContained() && RHSAA.undefIsContained()) {
       if (!calculateBinaryOperatorAndTakeUnion(BinOp, Zero, Zero))
         return indicatePessimisticFixpoint();
-    } else if (LHSContainsUndef) {
+    } else if (LHSAA.undefIsContained()) {
       for (const APInt &R : RHSAAPVS) {
         if (!calculateBinaryOperatorAndTakeUnion(BinOp, Zero, R))
           return indicatePessimisticFixpoint();
       }
-    } else if (RHSContainsUndef) {
+    } else if (RHSAA.undefIsContained()) {
       for (const APInt &L : LHSAAPVS) {
         if (!calculateBinaryOperatorAndTakeUnion(BinOp, L, Zero))
           return indicatePessimisticFixpoint();
@@ -8958,6 +9374,35 @@ struct AAPotentialConstantValuesFloating : AAPotentialConstantValuesImpl {
                                          : ChangeStatus::CHANGED;
   }
 
+  ChangeStatus updateWithPHINode(Attributor &A, PHINode *PHI) {
+    auto AssumedBefore = getAssumed();
+    for (unsigned u = 0, e = PHI->getNumIncomingValues(); u < e; u++) {
+      Value *IncomingValue = PHI->getIncomingValue(u);
+
+      // Simplify the operand first.
+      bool UsedAssumedInformation = false;
+      const auto &SimplifiedIncomingValue = A.getAssumedSimplified(
+          IRPosition::value(*IncomingValue, getCallBaseContext()), *this,
+          UsedAssumedInformation);
+      if (!SimplifiedIncomingValue.hasValue())
+        continue;
+      if (!SimplifiedIncomingValue.getValue())
+        return indicatePessimisticFixpoint();
+      IncomingValue = *SimplifiedIncomingValue;
+
+      auto &PotentialValuesAA = A.getAAFor<AAPotentialConstantValues>(
+          *this, IRPosition::value(*IncomingValue), DepClassTy::REQUIRED);
+      if (!PotentialValuesAA.isValidState())
+        return indicatePessimisticFixpoint();
+      if (PotentialValuesAA.undefIsContained())
+        unionAssumedWithUndef();
+      else
+        unionAssumed(PotentialValuesAA.getAssumed());
+    }
+    return AssumedBefore == getAssumed() ? ChangeStatus::UNCHANGED
+                                         : ChangeStatus::CHANGED;
+  }
+
   /// See AbstractAttribute::updateImpl(...).
   ChangeStatus updateImpl(Attributor &A) override {
     Value &V = getAssociatedValue();
@@ -8975,6 +9420,9 @@ struct AAPotentialConstantValuesFloating : AAPotentialConstantValuesImpl {
     if (auto *BinOp = dyn_cast<BinaryOperator>(I))
       return updateWithBinaryOperator(A, BinOp);
 
+    if (auto *PHI = dyn_cast<PHINode>(I))
+      return updateWithPHINode(A, PHI);
+
     return indicatePessimisticFixpoint();
   }
 
@@ -9128,8 +9576,7 @@ struct AANoUndefImpl : AANoUndef {
     // A position whose simplified value does not have any value is
     // considered to be dead. We don't manifest noundef in such positions for
     // the same reason above.
-    if (!A.getAssumedSimplified(getIRPosition(), *this, UsedAssumedInformation,
-                                AA::Interprocedural)
+    if (!A.getAssumedSimplified(getIRPosition(), *this, UsedAssumedInformation)
              .hasValue())
       return ChangeStatus::UNCHANGED;
     return AANoUndef::manifest(A);
@@ -9150,19 +9597,11 @@ struct AANoUndefFloating : public AANoUndefImpl {
 
   /// See AbstractAttribute::updateImpl(...).
   ChangeStatus updateImpl(Attributor &A) override {
-
-    SmallVector<AA::ValueAndContext> Values;
-    bool UsedAssumedInformation = false;
-    if (!A.getAssumedSimplifiedValues(getIRPosition(), *this, Values,
-                                      AA::AnyScope, UsedAssumedInformation)) {
-      Values.push_back({getAssociatedValue(), getCtxI()});
-    }
-
-    StateType T;
-    auto VisitValueCB = [&](Value &V, const Instruction *CtxI) -> bool {
+    auto VisitValueCB = [&](Value &V, const Instruction *CtxI,
+                            AANoUndef::StateType &T, bool Stripped) -> bool {
       const auto &AA = A.getAAFor<AANoUndef>(*this, IRPosition::value(V),
                                              DepClassTy::REQUIRED);
-      if (this == &AA) {
+      if (!Stripped && this == &AA) {
         T.indicatePessimisticFixpoint();
       } else {
         const AANoUndef::StateType &S =
@@ -9172,9 +9611,12 @@ struct AANoUndefFloating : public AANoUndefImpl {
       return T.isValidState();
     };
 
-    for (const auto &VAC : Values)
-      if (!VisitValueCB(*VAC.getValue(), VAC.getCtxI()))
-        return indicatePessimisticFixpoint();
+    StateType T;
+    bool UsedAssumedInformation = false;
+    if (!genericValueTraversal<StateType>(A, getIRPosition(), *this, T,
+                                          VisitValueCB, getCtxI(),
+                                          UsedAssumedInformation))
+      return indicatePessimisticFixpoint();
 
     return clampStateAndIndicateChange(getState(), T);
   }
@@ -9274,7 +9716,8 @@ struct AACallEdgesCallSite : public AACallEdgesImpl {
   ChangeStatus updateImpl(Attributor &A) override {
     ChangeStatus Change = ChangeStatus::UNCHANGED;
 
-    auto VisitValue = [&](Value &V, const Instruction *CtxI) -> bool {
+    auto VisitValue = [&](Value &V, const Instruction *CtxI, bool &HasUnknown,
+                          bool Stripped) -> bool {
       if (Function *Fn = dyn_cast<Function>(&V)) {
         addCalledFunction(Fn, Change);
       } else {
@@ -9286,17 +9729,17 @@ struct AACallEdgesCallSite : public AACallEdgesImpl {
       return true;
     };
 
-    SmallVector<AA::ValueAndContext> Values;
     // Process any value that we might call.
-    auto ProcessCalledOperand = [&](Value *V, Instruction *CtxI) {
+    auto ProcessCalledOperand = [&](Value *V) {
+      bool DummyValue = false;
       bool UsedAssumedInformation = false;
-      Values.clear();
-      if (!A.getAssumedSimplifiedValues(IRPosition::value(*V), *this, Values,
-                                        AA::AnyScope, UsedAssumedInformation)) {
-        Values.push_back({*V, CtxI});
+      if (!genericValueTraversal<bool>(A, IRPosition::value(*V), *this,
+                                       DummyValue, VisitValue, nullptr,
+                                       UsedAssumedInformation, false)) {
+        // If we haven't gone through all values, assume that there are unknown
+        // callees.
+        setHasUnknownCallee(true, Change);
       }
-      for (auto &VAC : Values)
-        VisitValue(*VAC.getValue(), VAC.getCtxI());
     };
 
     CallBase *CB = cast<CallBase>(getCtxI());
@@ -9319,13 +9762,13 @@ struct AACallEdgesCallSite : public AACallEdgesImpl {
     }
 
     // The most simple case.
-    ProcessCalledOperand(CB->getCalledOperand(), CB);
+    ProcessCalledOperand(CB->getCalledOperand());
 
     // Process callback functions.
     SmallVector<const Use *, 4u> CallbackUses;
     AbstractCallSite::getCallbackUses(*CB, CallbackUses);
     for (const Use *U : CallbackUses)
-      ProcessCalledOperand(U->get(), CB);
+      ProcessCalledOperand(U->get());
 
     return Change;
   }
@@ -9647,802 +10090,6 @@ struct AAFunctionReachabilityFunction : public AAFunctionReachability {
 };
 } // namespace
 
-template <typename AAType>
-static Optional<Constant *>
-askForAssumedconstant(Attributor &A, const AbstractAttribute &QueryingAA,
-                      const IRPosition &IRP, Type &Ty) {
-  if (!Ty.isIntegerTy())
-    return nullptr;
-
-  // This will also pass the call base context.
-  const auto &AA = A.getAAFor<AAType>(QueryingAA, IRP, DepClassTy::NONE);
-
-  Optional<Constant *> COpt = AA.getAssumedConstant(A);
-
-  if (!COpt.hasValue()) {
-    A.recordDependence(AA, QueryingAA, DepClassTy::OPTIONAL);
-    return llvm::None;
-  }
-  if (auto *C = COpt.getValue()) {
-    A.recordDependence(AA, QueryingAA, DepClassTy::OPTIONAL);
-    return C;
-  }
-  return nullptr;
-}
-
-Value *AAPotentialValues::getSingleValue(
-    Attributor &A, const AbstractAttribute &AA, const IRPosition &IRP,
-    SmallVectorImpl<AA::ValueAndContext> &Values) {
-  Type &Ty = *IRP.getAssociatedType();
-  Optional<Value *> V;
-  for (auto &It : Values) {
-    V = AA::combineOptionalValuesInAAValueLatice(V, It.getValue(), &Ty);
-    if (V.hasValue() && !V.getValue())
-      break;
-  }
-  if (!V.hasValue())
-    return UndefValue::get(&Ty);
-  return V.getValue();
-}
-
-namespace {
-struct AAPotentialValuesImpl : AAPotentialValues {
-  using StateType = PotentialLLVMValuesState;
-
-  AAPotentialValuesImpl(const IRPosition &IRP, Attributor &A)
-      : AAPotentialValues(IRP, A) {}
-
-  /// See AbstractAttribute::initialize(..).
-  void initialize(Attributor &A) override {
-    if (A.hasSimplificationCallback(getIRPosition())) {
-      indicatePessimisticFixpoint();
-      return;
-    }
-    Value *Stripped = getAssociatedValue().stripPointerCasts();
-    if (isa<Constant>(Stripped)) {
-      addValue(A, getState(), *Stripped, getCtxI(), AA::AnyScope,
-               getAnchorScope());
-      indicateOptimisticFixpoint();
-      return;
-    }
-    AAPotentialValues::initialize(A);
-  }
-
-  /// See AbstractAttribute::getAsStr().
-  const std::string getAsStr() const override {
-    std::string Str;
-    llvm::raw_string_ostream OS(Str);
-    OS << getState();
-    return OS.str();
-  }
-
-  template <typename AAType>
-  static Optional<Value *> askOtherAA(Attributor &A,
-                                      const AbstractAttribute &AA,
-                                      const IRPosition &IRP, Type &Ty) {
-    if (isa<Constant>(IRP.getAssociatedValue()))
-      return &IRP.getAssociatedValue();
-    Optional<Constant *> C = askForAssumedconstant<AAType>(A, AA, IRP, Ty);
-    if (!C)
-      return llvm::None;
-    if (C.getValue())
-      if (auto *CC = AA::getWithType(**C, Ty))
-        return CC;
-    return nullptr;
-  }
-
-  void addValue(Attributor &A, StateType &State, Value &V,
-                const Instruction *CtxI, AA::ValueScope S,
-                Function *AnchorScope) const {
-
-    IRPosition ValIRP = IRPosition::value(V);
-    if (auto *CB = dyn_cast_or_null<CallBase>(CtxI)) {
-      for (auto &U : CB->args()) {
-        if (U.get() != &V)
-          continue;
-        ValIRP = IRPosition::callsite_argument(*CB, CB->getArgOperandNo(&U));
-        break;
-      }
-    }
-
-    Type &Ty = *getAssociatedType();
-    Optional<Value *> SimpleV =
-        askOtherAA<AAValueConstantRange>(A, *this, ValIRP, Ty);
-    if (SimpleV.hasValue() && !SimpleV.getValue()) {
-      auto &PotentialConstantsAA = A.getAAFor<AAPotentialConstantValues>(
-          *this, ValIRP, DepClassTy::OPTIONAL);
-      if (PotentialConstantsAA.isValidState()) {
-        for (auto &It : PotentialConstantsAA.getAssumedSet()) {
-          State.unionAssumed({{*ConstantInt::get(&Ty, It), nullptr}, S});
-        }
-        assert(!PotentialConstantsAA.undefIsContained() &&
-               "Undef should be an explicit value!");
-        return;
-      }
-    }
-    if (!SimpleV.hasValue())
-      return;
-
-    Value *VPtr = &V;
-    if (SimpleV.getValue())
-      VPtr = SimpleV.getValue();
-
-    if (isa<ConstantInt>(VPtr))
-      CtxI = nullptr;
-    if (!AA::isValidInScope(*VPtr, AnchorScope))
-      S = AA::ValueScope(S | AA::Interprocedural);
-
-    State.unionAssumed({{*VPtr, CtxI}, S});
-  }
-
-  /// Helper struct to tie a value+context pair together with the scope for
-  /// which this is the simplified version.
-  struct ItemInfo {
-    AA::ValueAndContext I;
-    AA::ValueScope S;
-  };
-
-  bool recurseForValue(Attributor &A, const IRPosition &IRP, AA::ValueScope S) {
-    SmallMapVector<AA::ValueAndContext, int, 8> ValueScopeMap;
-    for (auto CS : {AA::Intraprocedural, AA::Interprocedural}) {
-      if (!(CS & S))
-        continue;
-
-      bool UsedAssumedInformation = false;
-      SmallVector<AA::ValueAndContext> Values;
-      if (!A.getAssumedSimplifiedValues(IRP, this, Values, CS,
-                                        UsedAssumedInformation))
-        return false;
-
-      for (auto &It : Values)
-        ValueScopeMap[It] += CS;
-    }
-    for (auto &It : ValueScopeMap)
-      addValue(A, getState(), *It.first.getValue(), It.first.getCtxI(),
-               AA::ValueScope(It.second), getAnchorScope());
-
-    return true;
-  }
-
-  void giveUpOnIntraprocedural(Attributor &A) {
-    auto NewS = StateType::getBestState(getState());
-    for (auto &It : getAssumedSet()) {
-      if (It.second == AA::Intraprocedural)
-        continue;
-      addValue(A, NewS, *It.first.getValue(), It.first.getCtxI(),
-               AA::Interprocedural, getAnchorScope());
-    }
-    assert(!undefIsContained() && "Undef should be an explicit value!");
-    addValue(A, NewS, getAssociatedValue(), getCtxI(), AA::Intraprocedural,
-             getAnchorScope());
-    getState() = NewS;
-  }
-
-  /// See AbstractState::indicatePessimisticFixpoint(...).
-  ChangeStatus indicatePessimisticFixpoint() override {
-    getState() = StateType::getBestState(getState());
-    getState().unionAssumed({{getAssociatedValue(), getCtxI()}, AA::AnyScope});
-    AAPotentialValues::indicateOptimisticFixpoint();
-    return ChangeStatus::CHANGED;
-  }
-
-  /// See AbstractAttribute::updateImpl(...).
-  ChangeStatus updateImpl(Attributor &A) override {
-    return indicatePessimisticFixpoint();
-  }
-
-  /// See AbstractAttribute::manifest(...).
-  ChangeStatus manifest(Attributor &A) override {
-    SmallVector<AA::ValueAndContext> Values;
-    for (AA::ValueScope S : {AA::Interprocedural, AA::Intraprocedural}) {
-      Values.clear();
-      if (!getAssumedSimplifiedValues(A, Values, S))
-        continue;
-      Value &OldV = getAssociatedValue();
-      if (isa<UndefValue>(OldV))
-        continue;
-      Value *NewV = getSingleValue(A, *this, getIRPosition(), Values);
-      if (!NewV || NewV == &OldV)
-        continue;
-      if (getCtxI() &&
-          !AA::isValidAtPosition({*NewV, *getCtxI()}, A.getInfoCache()))
-        continue;
-      if (A.changeAfterManifest(getIRPosition(), *NewV))
-        return ChangeStatus::CHANGED;
-    }
-    return ChangeStatus::UNCHANGED;
-  }
-
-  bool getAssumedSimplifiedValues(Attributor &A,
-                                  SmallVectorImpl<AA::ValueAndContext> &Values,
-                                  AA::ValueScope S) const override {
-    if (!isValidState())
-      return false;
-    for (auto &It : getAssumedSet())
-      if (It.second & S)
-        Values.push_back(It.first);
-    assert(!undefIsContained() && "Undef should be an explicit value!");
-    return true;
-  }
-};
-
-struct AAPotentialValuesFloating : AAPotentialValuesImpl {
-  AAPotentialValuesFloating(const IRPosition &IRP, Attributor &A)
-      : AAPotentialValuesImpl(IRP, A) {}
-
-  /// See AbstractAttribute::updateImpl(...).
-  ChangeStatus updateImpl(Attributor &A) override {
-    auto AssumedBefore = getAssumed();
-
-    genericValueTraversal(A);
-
-    return (AssumedBefore == getAssumed()) ? ChangeStatus::UNCHANGED
-                                           : ChangeStatus::CHANGED;
-  }
-
-  /// Helper struct to remember which AAIsDead instances we actually used.
-  struct LivenessInfo {
-    const AAIsDead *LivenessAA = nullptr;
-    bool AnyDead = false;
-  };
-
-  /// Check if \p Cmp is a comparison we can simplify.
-  ///
-  /// We handle multiple cases, one in which at least one operand is an
-  /// (assumed) nullptr. If so, try to simplify it using AANonNull on the other
-  /// operand. Return true if successful, in that case Worklist will be updated.
-  bool handleCmp(Attributor &A, CmpInst &Cmp, ItemInfo II,
-                 SmallVectorImpl<ItemInfo> &Worklist) {
-    Value *LHS = Cmp.getOperand(0);
-    Value *RHS = Cmp.getOperand(1);
-
-    // Simplify the operands first.
-    bool UsedAssumedInformation = false;
-    const auto &SimplifiedLHS = A.getAssumedSimplified(
-        IRPosition::value(*LHS, getCallBaseContext()), *this,
-        UsedAssumedInformation, AA::Intraprocedural);
-    if (!SimplifiedLHS.hasValue())
-      return true;
-    if (!SimplifiedLHS.getValue())
-      return false;
-    LHS = *SimplifiedLHS;
-
-    const auto &SimplifiedRHS = A.getAssumedSimplified(
-        IRPosition::value(*RHS, getCallBaseContext()), *this,
-        UsedAssumedInformation, AA::Intraprocedural);
-    if (!SimplifiedRHS.hasValue())
-      return true;
-    if (!SimplifiedRHS.getValue())
-      return false;
-    RHS = *SimplifiedRHS;
-
-    LLVMContext &Ctx = Cmp.getContext();
-    // Handle the trivial case first in which we don't even need to think about
-    // null or non-null.
-    if (LHS == RHS && (Cmp.isTrueWhenEqual() || Cmp.isFalseWhenEqual())) {
-      Constant *NewV =
-          ConstantInt::get(Type::getInt1Ty(Ctx), Cmp.isTrueWhenEqual());
-      addValue(A, getState(), *NewV, /* CtxI */ nullptr, II.S,
-               getAnchorScope());
-      return true;
-    }
-
-    // From now on we only handle equalities (==, !=).
-    ICmpInst *ICmp = dyn_cast<ICmpInst>(&Cmp);
-    if (!ICmp || !ICmp->isEquality())
-      return false;
-
-    bool LHSIsNull = isa<ConstantPointerNull>(LHS);
-    bool RHSIsNull = isa<ConstantPointerNull>(RHS);
-    if (!LHSIsNull && !RHSIsNull)
-      return false;
-
-    // Left is the nullptr ==/!= non-nullptr case. We'll use AANonNull on the
-    // non-nullptr operand and if we assume it's non-null we can conclude the
-    // result of the comparison.
-    assert((LHSIsNull || RHSIsNull) &&
-           "Expected nullptr versus non-nullptr comparison at this point");
-
-    // The index is the operand that we assume is not null.
-    unsigned PtrIdx = LHSIsNull;
-    auto &PtrNonNullAA = A.getAAFor<AANonNull>(
-        *this, IRPosition::value(*ICmp->getOperand(PtrIdx)),
-        DepClassTy::REQUIRED);
-    if (!PtrNonNullAA.isAssumedNonNull())
-      return false;
-
-    // The new value depends on the predicate, true for != and false for ==.
-    Constant *NewV = ConstantInt::get(Type::getInt1Ty(Ctx),
-                                      ICmp->getPredicate() == CmpInst::ICMP_NE);
-    addValue(A, getState(), *NewV, /* CtxI */ nullptr, II.S, getAnchorScope());
-    return true;
-  }
-
-  bool handleSelectInst(Attributor &A, SelectInst &SI, ItemInfo II,
-                        SmallVectorImpl<ItemInfo> &Worklist) {
-    const Instruction *CtxI = II.I.getCtxI();
-    bool UsedAssumedInformation = false;
-
-    Optional<Constant *> C =
-        A.getAssumedConstant(*SI.getCondition(), *this, UsedAssumedInformation);
-    bool NoValueYet = !C.hasValue();
-    if (NoValueYet || isa_and_nonnull<UndefValue>(*C))
-      return true;
-    if (auto *CI = dyn_cast_or_null<ConstantInt>(*C)) {
-      if (CI->isZero())
-        Worklist.push_back({{*SI.getFalseValue(), CtxI}, II.S});
-      else
-        Worklist.push_back({{*SI.getTrueValue(), CtxI}, II.S});
-    } else {
-      // We could not simplify the condition, assume both values.
-      Worklist.push_back({{*SI.getTrueValue(), CtxI}, II.S});
-      Worklist.push_back({{*SI.getFalseValue(), CtxI}, II.S});
-    }
-    return true;
-  }
-
-  bool handleLoadInst(Attributor &A, LoadInst &LI, ItemInfo II,
-                      SmallVectorImpl<ItemInfo> &Worklist) {
-    SmallSetVector<Value *, 4> PotentialCopies;
-    SmallSetVector<Instruction *, 4> PotentialValueOrigins;
-    bool UsedAssumedInformation = false;
-    if (!AA::getPotentiallyLoadedValues(A, LI, PotentialCopies,
-                                        PotentialValueOrigins, *this,
-                                        UsedAssumedInformation,
-                                        /* OnlyExact */ true))
-      return false;
-
-    // Do not simplify loads that are only used in llvm.assume if we cannot also
-    // remove all stores that may feed into the load. The reason is that the
-    // assume is probably worth something as long as the stores are around.
-    InformationCache &InfoCache = A.getInfoCache();
-    if (InfoCache.isOnlyUsedByAssume(LI)) {
-      if (!llvm::all_of(PotentialValueOrigins, [&](Instruction *I) {
-            if (!I)
-              return true;
-            if (auto *SI = dyn_cast<StoreInst>(I))
-              return A.isAssumedDead(SI->getOperandUse(0), this,
-                                     /* LivenessAA */ nullptr,
-                                     UsedAssumedInformation,
-                                     /* CheckBBLivenessOnly */ false);
-            return A.isAssumedDead(*I, this, /* LivenessAA */ nullptr,
-                                   UsedAssumedInformation,
-                                   /* CheckBBLivenessOnly */ false);
-          }))
-        return false;
-    }
-
-    // Values have to be dynamically unique or we loose the fact that a
-    // single llvm::Value might represent two runtime values (e.g.,
-    // stack locations in 
diff erent recursive calls).
-    const Instruction *CtxI = II.I.getCtxI();
-    bool ScopeIsLocal = (II.S & AA::Intraprocedural);
-    bool AllLocal = ScopeIsLocal;
-    bool DynamicallyUnique = llvm::all_of(PotentialCopies, [&](Value *PC) {
-      AllLocal &= AA::isValidInScope(*PC, getAnchorScope());
-      return AA::isDynamicallyUnique(A, *this, *PC);
-    });
-    if (!DynamicallyUnique)
-      return false;
-
-    for (auto *PotentialCopy : PotentialCopies) {
-      if (AllLocal) {
-        Worklist.push_back({{*PotentialCopy, CtxI}, II.S});
-      } else {
-        Worklist.push_back({{*PotentialCopy, CtxI}, AA::Interprocedural});
-      }
-    }
-    if (!AllLocal && ScopeIsLocal)
-      addValue(A, getState(), LI, CtxI, AA::Intraprocedural, getAnchorScope());
-    return true;
-  }
-
-  bool handlePHINode(
-      Attributor &A, PHINode &PHI, ItemInfo II,
-      SmallVectorImpl<ItemInfo> &Worklist,
-      SmallMapVector<const Function *, LivenessInfo, 4> &LivenessAAs) {
-    auto GetLivenessInfo = [&](const Function &F) -> LivenessInfo & {
-      LivenessInfo &LI = LivenessAAs[&F];
-      if (!LI.LivenessAA)
-        LI.LivenessAA = &A.getAAFor<AAIsDead>(*this, IRPosition::function(F),
-                                              DepClassTy::NONE);
-      return LI;
-    };
-
-    LivenessInfo &LI = GetLivenessInfo(*PHI.getFunction());
-    for (unsigned u = 0, e = PHI.getNumIncomingValues(); u < e; u++) {
-      BasicBlock *IncomingBB = PHI.getIncomingBlock(u);
-      if (LI.LivenessAA->isEdgeDead(IncomingBB, PHI.getParent())) {
-        LI.AnyDead = true;
-        continue;
-      }
-      Worklist.push_back(
-          {{*PHI.getIncomingValue(u), IncomingBB->getTerminator()}, II.S});
-    }
-    return true;
-  }
-
-  /// Use the generic, non-optimistic InstSimplfy functionality if we managed to
-  /// simplify any operand of the instruction \p I. Return true if successful,
-  /// in that case Worklist will be updated.
-  bool handleGenericInst(Attributor &A, Instruction &I, ItemInfo II,
-                         SmallVectorImpl<ItemInfo> &Worklist) {
-    bool SomeSimplified = false;
-    bool UsedAssumedInformation = false;
-
-    SmallVector<Value *, 8> NewOps(I.getNumOperands());
-    int Idx = 0;
-    for (Value *Op : I.operands()) {
-      const auto &SimplifiedOp = A.getAssumedSimplified(
-          IRPosition::value(*Op, getCallBaseContext()), *this,
-          UsedAssumedInformation, AA::Intraprocedural);
-      // If we are not sure about any operand we are not sure about the entire
-      // instruction, we'll wait.
-      if (!SimplifiedOp.hasValue())
-        return true;
-
-      if (SimplifiedOp.getValue())
-        NewOps[Idx] = SimplifiedOp.getValue();
-      else
-        NewOps[Idx] = Op;
-
-      SomeSimplified |= (NewOps[Idx] != Op);
-      ++Idx;
-    }
-
-    // We won't bother with the InstSimplify interface if we didn't simplify any
-    // operand ourselves.
-    if (!SomeSimplified)
-      return false;
-
-    InformationCache &InfoCache = A.getInfoCache();
-    Function *F = I.getFunction();
-    const auto *DT =
-        InfoCache.getAnalysisResultForFunction<DominatorTreeAnalysis>(*F);
-    const auto *TLI = A.getInfoCache().getTargetLibraryInfoForFunction(*F);
-    auto *AC = InfoCache.getAnalysisResultForFunction<AssumptionAnalysis>(*F);
-    OptimizationRemarkEmitter *ORE = nullptr;
-
-    const DataLayout &DL = I.getModule()->getDataLayout();
-    SimplifyQuery Q(DL, TLI, DT, AC, &I);
-    Value *NewV = simplifyInstructionWithOperands(&I, NewOps, Q, ORE);
-    if (!NewV || NewV == &I)
-      return false;
-
-    LLVM_DEBUG(dbgs() << "Generic inst " << I << " assumed simplified to "
-                      << *NewV << "\n");
-    Worklist.push_back({{*NewV, II.I.getCtxI()}, II.S});
-    return true;
-  }
-
-  bool simplifyInstruction(
-      Attributor &A, Instruction &I, ItemInfo II,
-      SmallVectorImpl<ItemInfo> &Worklist,
-      SmallMapVector<const Function *, LivenessInfo, 4> &LivenessAAs) {
-    if (auto *CI = dyn_cast<CmpInst>(&I))
-      if (handleCmp(A, *CI, II, Worklist))
-        return true;
-
-    switch (I.getOpcode()) {
-    case Instruction::Select:
-      return handleSelectInst(A, cast<SelectInst>(I), II, Worklist);
-    case Instruction::PHI:
-      return handlePHINode(A, cast<PHINode>(I), II, Worklist, LivenessAAs);
-    case Instruction::Load:
-      return handleLoadInst(A, cast<LoadInst>(I), II, Worklist);
-    default:
-      return handleGenericInst(A, I, II, Worklist);
-    };
-    return false;
-  }
-
-  void genericValueTraversal(Attributor &A) {
-    SmallMapVector<const Function *, LivenessInfo, 4> LivenessAAs;
-
-    Value *InitialV = &getAssociatedValue();
-    SmallSet<AA::ValueAndContext, 16> Visited;
-    SmallVector<ItemInfo, 16> Worklist;
-    Worklist.push_back({{*InitialV, getCtxI()}, AA::AnyScope});
-
-    int Iteration = 0;
-    do {
-      ItemInfo II = Worklist.pop_back_val();
-      Value *V = II.I.getValue();
-      assert(V);
-      const Instruction *CtxI = II.I.getCtxI();
-      AA::ValueScope S = II.S;
-
-      // Check if we should process the current value. To prevent endless
-      // recursion keep a record of the values we followed!
-      if (!Visited.insert(II.I).second)
-        continue;
-
-      // Make sure we limit the compile time for complex expressions.
-      if (Iteration++ >= MaxPotentialValuesIterations) {
-        LLVM_DEBUG(dbgs() << "Generic value traversal reached iteration limit: "
-                          << Iteration << "!\n");
-        addValue(A, getState(), *V, CtxI, S, getAnchorScope());
-        continue;
-      }
-
-      // Explicitly look through calls with a "returned" attribute if we do
-      // not have a pointer as stripPointerCasts only works on them.
-      Value *NewV = nullptr;
-      if (V->getType()->isPointerTy()) {
-        NewV = AA::getWithType(*V->stripPointerCasts(), *V->getType());
-      } else {
-        auto *CB = dyn_cast<CallBase>(V);
-        if (CB && CB->getCalledFunction()) {
-          for (Argument &Arg : CB->getCalledFunction()->args())
-            if (Arg.hasReturnedAttr()) {
-              NewV = CB->getArgOperand(Arg.getArgNo());
-              break;
-            }
-        }
-      }
-      if (NewV && NewV != V) {
-        Worklist.push_back({{*NewV, CtxI}, S});
-        continue;
-      }
-
-      if (auto *I = dyn_cast<Instruction>(V)) {
-        if (simplifyInstruction(A, *I, II, Worklist, LivenessAAs))
-          continue;
-      }
-
-      if (V != InitialV || isa<Argument>(V))
-        if (recurseForValue(A, IRPosition::value(*V), II.S))
-          continue;
-
-      addValue(A, getState(), *V, CtxI, S, getAnchorScope());
-    } while (!Worklist.empty());
-
-    // If we actually used liveness information so we have to record a
-    // dependence.
-    for (auto &It : LivenessAAs)
-      if (It.second.AnyDead)
-        A.recordDependence(*It.second.LivenessAA, *this, DepClassTy::OPTIONAL);
-  }
-
-  /// See AbstractAttribute::trackStatistics()
-  void trackStatistics() const override {
-    STATS_DECLTRACK_FLOATING_ATTR(potential_values)
-  }
-};
-
-struct AAPotentialValuesArgument final : AAPotentialValuesImpl {
-  using Base = AAPotentialValuesImpl;
-  AAPotentialValuesArgument(const IRPosition &IRP, Attributor &A)
-      : Base(IRP, A) {}
-
-  /// See AbstractAttribute::initialize(..).
-  void initialize(Attributor &A) override {
-    auto &Arg = cast<Argument>(getAssociatedValue());
-    if (Arg.hasPointeeInMemoryValueAttr())
-      indicatePessimisticFixpoint();
-  }
-
-  /// See AbstractAttribute::updateImpl(...).
-  ChangeStatus updateImpl(Attributor &A) override {
-    auto AssumedBefore = getAssumed();
-
-    unsigned CSArgNo = getCallSiteArgNo();
-
-    bool UsedAssumedInformation = false;
-    SmallVector<AA::ValueAndContext> Values;
-    auto CallSitePred = [&](AbstractCallSite ACS) {
-      const auto CSArgIRP = IRPosition::callsite_argument(ACS, CSArgNo);
-      if (CSArgIRP.getPositionKind() == IRP_INVALID)
-        return false;
-
-      if (!A.getAssumedSimplifiedValues(CSArgIRP, this, Values,
-                                        AA::Interprocedural,
-                                        UsedAssumedInformation))
-        return false;
-
-      return isValidState();
-    };
-
-    if (!A.checkForAllCallSites(CallSitePred, *this,
-                                /* RequireAllCallSites */ true,
-                                UsedAssumedInformation))
-      return indicatePessimisticFixpoint();
-
-    Function *Fn = getAssociatedFunction();
-    bool AnyNonLocal = false;
-    for (auto &It : Values) {
-      if (isa<Constant>(It.getValue())) {
-        addValue(A, getState(), *It.getValue(), It.getCtxI(), AA::AnyScope,
-                 getAnchorScope());
-        continue;
-      }
-      if (!AA::isDynamicallyUnique(A, *this, *It.getValue()))
-        return indicatePessimisticFixpoint();
-
-      if (auto *Arg = dyn_cast<Argument>(It.getValue()))
-        if (Arg->getParent() == Fn) {
-          addValue(A, getState(), *It.getValue(), It.getCtxI(), AA::AnyScope,
-                   getAnchorScope());
-          continue;
-        }
-      addValue(A, getState(), *It.getValue(), It.getCtxI(), AA::Interprocedural,
-               getAnchorScope());
-      AnyNonLocal = true;
-    }
-    if (undefIsContained())
-      unionAssumedWithUndef();
-    if (AnyNonLocal)
-      giveUpOnIntraprocedural(A);
-
-    return (AssumedBefore == getAssumed()) ? ChangeStatus::UNCHANGED
-                                           : ChangeStatus::CHANGED;
-  }
-
-  /// See AbstractAttribute::trackStatistics()
-  void trackStatistics() const override {
-    STATS_DECLTRACK_ARG_ATTR(potential_values)
-  }
-};
-
-struct AAPotentialValuesReturned
-    : AAReturnedFromReturnedValues<AAPotentialValues, AAPotentialValuesImpl> {
-  using Base =
-      AAReturnedFromReturnedValues<AAPotentialValues, AAPotentialValuesImpl>;
-  AAPotentialValuesReturned(const IRPosition &IRP, Attributor &A)
-      : Base(IRP, A) {}
-
-  /// See AbstractAttribute::initialize(..).
-  void initialize(Attributor &A) override {
-    if (A.hasSimplificationCallback(getIRPosition()))
-      indicatePessimisticFixpoint();
-    else
-      AAPotentialValues::initialize(A);
-  }
-
-  ChangeStatus manifest(Attributor &A) override {
-    // We queried AAValueSimplify for the returned values so they will be
-    // replaced if a simplified form was found. Nothing to do here.
-    return ChangeStatus::UNCHANGED;
-  }
-
-  ChangeStatus indicatePessimisticFixpoint() override {
-    return AAPotentialValues::indicatePessimisticFixpoint();
-  }
-
-  /// See AbstractAttribute::trackStatistics()
-  void trackStatistics() const override {
-    STATS_DECLTRACK_FNRET_ATTR(potential_values)
-  }
-};
-
-struct AAPotentialValuesFunction : AAPotentialValuesImpl {
-  AAPotentialValuesFunction(const IRPosition &IRP, Attributor &A)
-      : AAPotentialValuesImpl(IRP, A) {}
-
-  /// See AbstractAttribute::updateImpl(...).
-  ChangeStatus updateImpl(Attributor &A) override {
-    llvm_unreachable("AAPotentialValues(Function|CallSite)::updateImpl will "
-                     "not be called");
-  }
-
-  /// See AbstractAttribute::trackStatistics()
-  void trackStatistics() const override {
-    STATS_DECLTRACK_FN_ATTR(potential_values)
-  }
-};
-
-struct AAPotentialValuesCallSite : AAPotentialValuesFunction {
-  AAPotentialValuesCallSite(const IRPosition &IRP, Attributor &A)
-      : AAPotentialValuesFunction(IRP, A) {}
-
-  /// See AbstractAttribute::trackStatistics()
-  void trackStatistics() const override {
-    STATS_DECLTRACK_CS_ATTR(potential_values)
-  }
-};
-
-struct AAPotentialValuesCallSiteReturned : AAPotentialValuesImpl {
-  AAPotentialValuesCallSiteReturned(const IRPosition &IRP, Attributor &A)
-      : AAPotentialValuesImpl(IRP, A) {}
-
-  /// See AbstractAttribute::updateImpl(...).
-  ChangeStatus updateImpl(Attributor &A) override {
-    auto AssumedBefore = getAssumed();
-
-    Function *Callee = getAssociatedFunction();
-    if (!Callee)
-      return indicatePessimisticFixpoint();
-
-    bool UsedAssumedInformation = false;
-    auto *CB = cast<CallBase>(getCtxI());
-    if (CB->isMustTailCall() &&
-        !A.isAssumedDead(IRPosition::inst(*CB), this, nullptr,
-                         UsedAssumedInformation))
-      return indicatePessimisticFixpoint();
-
-    SmallVector<AA::ValueAndContext> Values;
-    if (!A.getAssumedSimplifiedValues(IRPosition::returned(*Callee), this,
-                                      Values, AA::Intraprocedural,
-                                      UsedAssumedInformation))
-      return indicatePessimisticFixpoint();
-
-    Function *Caller = CB->getCaller();
-
-    bool AnyNonLocal = false;
-    for (auto &It : Values) {
-      Value *V = It.getValue();
-      Optional<Value *> CallerV = A.translateArgumentToCallSiteContent(
-          V, *CB, *this, UsedAssumedInformation);
-      if (!CallerV.hasValue()) {
-        // Nothing to do as long as no value was determined.
-        continue;
-      }
-      V = CallerV.getValue() ? CallerV.getValue() : V;
-      if (AA::isDynamicallyUnique(A, *this, *V) &&
-          AA::isValidInScope(*V, Caller)) {
-        if (CallerV.getValue()) {
-          SmallVector<AA::ValueAndContext> ArgValues;
-          IRPosition IRP = IRPosition::value(*V);
-          if (auto *Arg = dyn_cast<Argument>(V))
-            if (Arg->getParent() == CB->getCalledFunction())
-              IRP = IRPosition::callsite_argument(*CB, Arg->getArgNo());
-          if (recurseForValue(A, IRP, AA::AnyScope))
-            continue;
-        }
-        addValue(A, getState(), *V, CB, AA::AnyScope, getAnchorScope());
-      } else {
-        AnyNonLocal = true;
-        break;
-      }
-    }
-    if (AnyNonLocal) {
-      Values.clear();
-      if (!A.getAssumedSimplifiedValues(IRPosition::returned(*Callee), this,
-                                        Values, AA::Interprocedural,
-                                        UsedAssumedInformation))
-        return indicatePessimisticFixpoint();
-      AnyNonLocal = false;
-      getState() = PotentialLLVMValuesState::getBestState();
-      for (auto &It : Values) {
-        Value *V = It.getValue();
-        if (!AA::isDynamicallyUnique(A, *this, *V))
-          return indicatePessimisticFixpoint();
-        if (AA::isValidInScope(*V, Caller)) {
-          addValue(A, getState(), *V, CB, AA::AnyScope, getAnchorScope());
-        } else {
-          AnyNonLocal = true;
-          addValue(A, getState(), *V, CB, AA::Interprocedural,
-                   getAnchorScope());
-        }
-      }
-      if (AnyNonLocal)
-        giveUpOnIntraprocedural(A);
-    }
-    return (AssumedBefore == getAssumed()) ? ChangeStatus::UNCHANGED
-                                           : ChangeStatus::CHANGED;
-  }
-
-  ChangeStatus indicatePessimisticFixpoint() override {
-    return AAPotentialValues::indicatePessimisticFixpoint();
-  }
-
-  /// See AbstractAttribute::trackStatistics()
-  void trackStatistics() const override {
-    STATS_DECLTRACK_CSRET_ATTR(potential_values)
-  }
-};
-
-struct AAPotentialValuesCallSiteArgument : AAPotentialValuesFloating {
-  AAPotentialValuesCallSiteArgument(const IRPosition &IRP, Attributor &A)
-      : AAPotentialValuesFloating(IRP, A) {}
-
-  /// See AbstractAttribute::trackStatistics()
-  void trackStatistics() const override {
-    STATS_DECLTRACK_CSARG_ATTR(potential_values)
-  }
-};
-} // namespace
-
 /// ---------------------- Assumption Propagation ------------------------------
 namespace {
 struct AAAssumptionInfoImpl : public AAAssumptionInfo {
@@ -10610,7 +10257,6 @@ const char AAMemoryBehavior::ID = 0;
 const char AAMemoryLocation::ID = 0;
 const char AAValueConstantRange::ID = 0;
 const char AAPotentialConstantValues::ID = 0;
-const char AAPotentialValues::ID = 0;
 const char AANoUndef::ID = 0;
 const char AACallEdges::ID = 0;
 const char AAFunctionReachability::ID = 0;
@@ -10729,7 +10375,6 @@ CREATE_VALUE_ABSTRACT_ATTRIBUTE_FOR_POSITION(AAInstanceInfo)
 CREATE_VALUE_ABSTRACT_ATTRIBUTE_FOR_POSITION(AANoCapture)
 CREATE_VALUE_ABSTRACT_ATTRIBUTE_FOR_POSITION(AAValueConstantRange)
 CREATE_VALUE_ABSTRACT_ATTRIBUTE_FOR_POSITION(AAPotentialConstantValues)
-CREATE_VALUE_ABSTRACT_ATTRIBUTE_FOR_POSITION(AAPotentialValues)
 CREATE_VALUE_ABSTRACT_ATTRIBUTE_FOR_POSITION(AANoUndef)
 CREATE_VALUE_ABSTRACT_ATTRIBUTE_FOR_POSITION(AAPointerInfo)
 

diff  --git a/llvm/lib/Transforms/IPO/OpenMPOpt.cpp b/llvm/lib/Transforms/IPO/OpenMPOpt.cpp
index db8825bfca484..99b996ad57ed1 100644
--- a/llvm/lib/Transforms/IPO/OpenMPOpt.cpp
+++ b/llvm/lib/Transforms/IPO/OpenMPOpt.cpp
@@ -4803,7 +4803,7 @@ void OpenMPOpt::registerAAs(bool IsModulePass) {
       if (auto *LI = dyn_cast<LoadInst>(&I)) {
         bool UsedAssumedInformation = false;
         A.getAssumedSimplified(IRPosition::value(*LI), /* AA */ nullptr,
-                               UsedAssumedInformation, AA::Interprocedural);
+                               UsedAssumedInformation);
       } else if (auto *SI = dyn_cast<StoreInst>(&I)) {
         A.getOrCreateAAFor<AAIsDead>(IRPosition::value(*SI));
       }

diff  --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/2008-02-01-ReturnAttrs.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/2008-02-01-ReturnAttrs.ll
index 8c653b09a1e1b..5212a5c63245d 100644
--- a/llvm/test/Transforms/Attributor/ArgumentPromotion/2008-02-01-ReturnAttrs.ll
+++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/2008-02-01-ReturnAttrs.ll
@@ -5,21 +5,21 @@
 ; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM
 
 define internal i32 @deref(i32* %x) nounwind {
-; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
-; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@deref
-; IS__CGSCC_OPM-SAME: (i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[X:%.*]]) #[[ATTR0:[0-9]+]] {
-; IS__CGSCC_OPM-NEXT:  entry:
-; IS__CGSCC_OPM-NEXT:    [[TMP2:%.*]] = load i32, i32* [[X]], align 4
-; IS__CGSCC_OPM-NEXT:    ret i32 [[TMP2]]
+; IS________OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
+; IS________OPM-LABEL: define {{[^@]+}}@deref
+; IS________OPM-SAME: (i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[X:%.*]]) #[[ATTR0:[0-9]+]] {
+; IS________OPM-NEXT:  entry:
+; IS________OPM-NEXT:    [[TMP2:%.*]] = load i32, i32* [[X]], align 4
+; IS________OPM-NEXT:    ret i32 [[TMP2]]
 ;
-; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@deref
-; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]]) #[[ATTR0:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT:  entry:
-; IS__CGSCC_NPM-NEXT:    [[X_PRIV:%.*]] = alloca i32, align 4
-; IS__CGSCC_NPM-NEXT:    store i32 [[TMP0]], i32* [[X_PRIV]], align 4
-; IS__CGSCC_NPM-NEXT:    [[TMP2:%.*]] = load i32, i32* [[X_PRIV]], align 4
-; IS__CGSCC_NPM-NEXT:    ret i32 [[TMP2]]
+; IS________NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
+; IS________NPM-LABEL: define {{[^@]+}}@deref
+; IS________NPM-SAME: (i32 [[TMP0:%.*]]) #[[ATTR0:[0-9]+]] {
+; IS________NPM-NEXT:  entry:
+; IS________NPM-NEXT:    [[X_PRIV:%.*]] = alloca i32, align 4
+; IS________NPM-NEXT:    store i32 [[TMP0]], i32* [[X_PRIV]], align 4
+; IS________NPM-NEXT:    [[TMP2:%.*]] = load i32, i32* [[X_PRIV]], align 4
+; IS________NPM-NEXT:    ret i32 [[TMP2]]
 ;
 entry:
   %tmp2 = load i32, i32* %x, align 4
@@ -27,13 +27,24 @@ entry:
 }
 
 define i32 @f(i32 %x) {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@f
-; IS__TUNIT____-SAME: (i32 returned [[X:%.*]]) #[[ATTR0:[0-9]+]] {
-; IS__TUNIT____-NEXT:  entry:
-; IS__TUNIT____-NEXT:    [[X_ADDR:%.*]] = alloca i32, align 4
-; IS__TUNIT____-NEXT:    store i32 [[X]], i32* [[X_ADDR]], align 4
-; IS__TUNIT____-NEXT:    ret i32 [[X]]
+; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@f
+; IS__TUNIT_OPM-SAME: (i32 [[X:%.*]]) #[[ATTR1:[0-9]+]] {
+; IS__TUNIT_OPM-NEXT:  entry:
+; IS__TUNIT_OPM-NEXT:    [[X_ADDR:%.*]] = alloca i32, align 4
+; IS__TUNIT_OPM-NEXT:    store i32 [[X]], i32* [[X_ADDR]], align 4
+; IS__TUNIT_OPM-NEXT:    [[TMP1:%.*]] = call i32 @deref(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[X_ADDR]]) #[[ATTR2:[0-9]+]]
+; IS__TUNIT_OPM-NEXT:    ret i32 [[TMP1]]
+;
+; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@f
+; IS__TUNIT_NPM-SAME: (i32 [[X:%.*]]) #[[ATTR1:[0-9]+]] {
+; IS__TUNIT_NPM-NEXT:  entry:
+; IS__TUNIT_NPM-NEXT:    [[X_ADDR:%.*]] = alloca i32, align 4
+; IS__TUNIT_NPM-NEXT:    store i32 [[X]], i32* [[X_ADDR]], align 4
+; IS__TUNIT_NPM-NEXT:    [[TMP0:%.*]] = load i32, i32* [[X_ADDR]], align 4
+; IS__TUNIT_NPM-NEXT:    [[TMP1:%.*]] = call i32 @deref(i32 [[TMP0]]) #[[ATTR2:[0-9]+]]
+; IS__TUNIT_NPM-NEXT:    ret i32 [[TMP1]]
 ;
 ; IS__CGSCC_OPM: Function Attrs: nofree nosync nounwind readnone willreturn
 ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@f
@@ -60,7 +71,9 @@ entry:
   ret i32 %tmp1
 }
 ;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
+; IS__TUNIT____: attributes #[[ATTR0:[0-9]+]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
+; IS__TUNIT____: attributes #[[ATTR1:[0-9]+]] = { nofree norecurse nosync nounwind readnone willreturn }
+; IS__TUNIT____: attributes #[[ATTR2:[0-9]+]] = { nofree nosync nounwind readonly willreturn }
 ;.
 ; IS__CGSCC____: attributes #[[ATTR0:[0-9]+]] = { argmemonly nofree norecurse nosync nounwind readonly willreturn }
 ; IS__CGSCC____: attributes #[[ATTR1:[0-9]+]] = { nofree nosync nounwind readnone willreturn }

diff  --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/X86/min-legal-vector-width.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/X86/min-legal-vector-width.ll
index 5155c544a1b0e..2b2b1131bd4c3 100644
--- a/llvm/test/Transforms/Attributor/ArgumentPromotion/X86/min-legal-vector-width.ll
+++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/X86/min-legal-vector-width.ll
@@ -71,7 +71,7 @@ define void @avx512_legal512_prefer512_call_avx512_legal512_prefer512(<8 x i64>*
 ; IS__CGSCC_OPM-NEXT:    [[TMP:%.*]] = alloca <8 x i64>, align 32
 ; IS__CGSCC_OPM-NEXT:    [[TMP2:%.*]] = alloca <8 x i64>, align 32
 ; IS__CGSCC_OPM-NEXT:    [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8*
-; IS__CGSCC_OPM-NEXT:    call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR6:[0-9]+]]
+; IS__CGSCC_OPM-NEXT:    call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR6:[0-9]+]]
 ; IS__CGSCC_OPM-NEXT:    call fastcc void @callee_avx512_legal512_prefer512_call_avx512_legal512_prefer512(<8 x i64>* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64>* nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[TMP]]) #[[ATTR7:[0-9]+]]
 ; IS__CGSCC_OPM-NEXT:    [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64
 ; IS__CGSCC_OPM-NEXT:    store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2
@@ -84,7 +84,7 @@ define void @avx512_legal512_prefer512_call_avx512_legal512_prefer512(<8 x i64>*
 ; IS__CGSCC_NPM-NEXT:    [[TMP:%.*]] = alloca <8 x i64>, align 32
 ; IS__CGSCC_NPM-NEXT:    [[TMP2:%.*]] = alloca <8 x i64>, align 32
 ; IS__CGSCC_NPM-NEXT:    [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8*
-; IS__CGSCC_NPM-NEXT:    call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR5:[0-9]+]]
+; IS__CGSCC_NPM-NEXT:    call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR5:[0-9]+]]
 ; IS__CGSCC_NPM-NEXT:    [[TMP0:%.*]] = load <8 x i64>, <8 x i64>* [[TMP]], align 64
 ; IS__CGSCC_NPM-NEXT:    call fastcc void @callee_avx512_legal512_prefer512_call_avx512_legal512_prefer512(<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64> [[TMP0]]) #[[ATTR6:[0-9]+]]
 ; IS__CGSCC_NPM-NEXT:    [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64
@@ -165,7 +165,7 @@ define void @avx512_legal512_prefer256_call_avx512_legal512_prefer256(<8 x i64>*
 ; IS__CGSCC_OPM-NEXT:    [[TMP:%.*]] = alloca <8 x i64>, align 32
 ; IS__CGSCC_OPM-NEXT:    [[TMP2:%.*]] = alloca <8 x i64>, align 32
 ; IS__CGSCC_OPM-NEXT:    [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8*
-; IS__CGSCC_OPM-NEXT:    call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR6]]
+; IS__CGSCC_OPM-NEXT:    call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR6]]
 ; IS__CGSCC_OPM-NEXT:    call fastcc void @callee_avx512_legal512_prefer256_call_avx512_legal512_prefer256(<8 x i64>* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64>* nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[TMP]]) #[[ATTR7]]
 ; IS__CGSCC_OPM-NEXT:    [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64
 ; IS__CGSCC_OPM-NEXT:    store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2
@@ -178,7 +178,7 @@ define void @avx512_legal512_prefer256_call_avx512_legal512_prefer256(<8 x i64>*
 ; IS__CGSCC_NPM-NEXT:    [[TMP:%.*]] = alloca <8 x i64>, align 32
 ; IS__CGSCC_NPM-NEXT:    [[TMP2:%.*]] = alloca <8 x i64>, align 32
 ; IS__CGSCC_NPM-NEXT:    [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8*
-; IS__CGSCC_NPM-NEXT:    call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR5]]
+; IS__CGSCC_NPM-NEXT:    call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR5]]
 ; IS__CGSCC_NPM-NEXT:    [[TMP0:%.*]] = load <8 x i64>, <8 x i64>* [[TMP]], align 64
 ; IS__CGSCC_NPM-NEXT:    call fastcc void @callee_avx512_legal512_prefer256_call_avx512_legal512_prefer256(<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64> [[TMP0]]) #[[ATTR6]]
 ; IS__CGSCC_NPM-NEXT:    [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64
@@ -259,7 +259,7 @@ define void @avx512_legal512_prefer512_call_avx512_legal512_prefer256(<8 x i64>*
 ; IS__CGSCC_OPM-NEXT:    [[TMP:%.*]] = alloca <8 x i64>, align 32
 ; IS__CGSCC_OPM-NEXT:    [[TMP2:%.*]] = alloca <8 x i64>, align 32
 ; IS__CGSCC_OPM-NEXT:    [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8*
-; IS__CGSCC_OPM-NEXT:    call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR6]]
+; IS__CGSCC_OPM-NEXT:    call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR6]]
 ; IS__CGSCC_OPM-NEXT:    call fastcc void @callee_avx512_legal512_prefer512_call_avx512_legal512_prefer256(<8 x i64>* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64>* nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[TMP]]) #[[ATTR7]]
 ; IS__CGSCC_OPM-NEXT:    [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64
 ; IS__CGSCC_OPM-NEXT:    store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2
@@ -272,7 +272,7 @@ define void @avx512_legal512_prefer512_call_avx512_legal512_prefer256(<8 x i64>*
 ; IS__CGSCC_NPM-NEXT:    [[TMP:%.*]] = alloca <8 x i64>, align 32
 ; IS__CGSCC_NPM-NEXT:    [[TMP2:%.*]] = alloca <8 x i64>, align 32
 ; IS__CGSCC_NPM-NEXT:    [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8*
-; IS__CGSCC_NPM-NEXT:    call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR5]]
+; IS__CGSCC_NPM-NEXT:    call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR5]]
 ; IS__CGSCC_NPM-NEXT:    [[TMP0:%.*]] = load <8 x i64>, <8 x i64>* [[TMP]], align 64
 ; IS__CGSCC_NPM-NEXT:    call fastcc void @callee_avx512_legal512_prefer512_call_avx512_legal512_prefer256(<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64> [[TMP0]]) #[[ATTR6]]
 ; IS__CGSCC_NPM-NEXT:    [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64
@@ -353,7 +353,7 @@ define void @avx512_legal512_prefer256_call_avx512_legal512_prefer512(<8 x i64>*
 ; IS__CGSCC_OPM-NEXT:    [[TMP:%.*]] = alloca <8 x i64>, align 32
 ; IS__CGSCC_OPM-NEXT:    [[TMP2:%.*]] = alloca <8 x i64>, align 32
 ; IS__CGSCC_OPM-NEXT:    [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8*
-; IS__CGSCC_OPM-NEXT:    call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR6]]
+; IS__CGSCC_OPM-NEXT:    call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR6]]
 ; IS__CGSCC_OPM-NEXT:    call fastcc void @callee_avx512_legal512_prefer256_call_avx512_legal512_prefer512(<8 x i64>* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64>* nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[TMP]]) #[[ATTR7]]
 ; IS__CGSCC_OPM-NEXT:    [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64
 ; IS__CGSCC_OPM-NEXT:    store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2
@@ -366,7 +366,7 @@ define void @avx512_legal512_prefer256_call_avx512_legal512_prefer512(<8 x i64>*
 ; IS__CGSCC_NPM-NEXT:    [[TMP:%.*]] = alloca <8 x i64>, align 32
 ; IS__CGSCC_NPM-NEXT:    [[TMP2:%.*]] = alloca <8 x i64>, align 32
 ; IS__CGSCC_NPM-NEXT:    [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8*
-; IS__CGSCC_NPM-NEXT:    call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR5]]
+; IS__CGSCC_NPM-NEXT:    call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR5]]
 ; IS__CGSCC_NPM-NEXT:    [[TMP0:%.*]] = load <8 x i64>, <8 x i64>* [[TMP]], align 64
 ; IS__CGSCC_NPM-NEXT:    call fastcc void @callee_avx512_legal512_prefer256_call_avx512_legal512_prefer512(<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64> [[TMP0]]) #[[ATTR6]]
 ; IS__CGSCC_NPM-NEXT:    [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64
@@ -444,7 +444,7 @@ define void @avx512_legal256_prefer256_call_avx512_legal512_prefer256(<8 x i64>*
 ; IS__CGSCC_OPM-NEXT:    [[TMP:%.*]] = alloca <8 x i64>, align 32
 ; IS__CGSCC_OPM-NEXT:    [[TMP2:%.*]] = alloca <8 x i64>, align 32
 ; IS__CGSCC_OPM-NEXT:    [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8*
-; IS__CGSCC_OPM-NEXT:    call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR6]]
+; IS__CGSCC_OPM-NEXT:    call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR6]]
 ; IS__CGSCC_OPM-NEXT:    call fastcc void @callee_avx512_legal256_prefer256_call_avx512_legal512_prefer256(<8 x i64>* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64>* nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[TMP]]) #[[ATTR7]]
 ; IS__CGSCC_OPM-NEXT:    [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64
 ; IS__CGSCC_OPM-NEXT:    store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2
@@ -457,7 +457,7 @@ define void @avx512_legal256_prefer256_call_avx512_legal512_prefer256(<8 x i64>*
 ; IS__CGSCC_NPM-NEXT:    [[TMP:%.*]] = alloca <8 x i64>, align 32
 ; IS__CGSCC_NPM-NEXT:    [[TMP2:%.*]] = alloca <8 x i64>, align 32
 ; IS__CGSCC_NPM-NEXT:    [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8*
-; IS__CGSCC_NPM-NEXT:    call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR5]]
+; IS__CGSCC_NPM-NEXT:    call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR5]]
 ; IS__CGSCC_NPM-NEXT:    call fastcc void @callee_avx512_legal256_prefer256_call_avx512_legal512_prefer256(<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64>* noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[TMP]]) #[[ATTR6]]
 ; IS__CGSCC_NPM-NEXT:    [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64
 ; IS__CGSCC_NPM-NEXT:    store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2
@@ -534,7 +534,7 @@ define void @avx512_legal512_prefer256_call_avx512_legal256_prefer256(<8 x i64>*
 ; IS__CGSCC_OPM-NEXT:    [[TMP:%.*]] = alloca <8 x i64>, align 32
 ; IS__CGSCC_OPM-NEXT:    [[TMP2:%.*]] = alloca <8 x i64>, align 32
 ; IS__CGSCC_OPM-NEXT:    [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8*
-; IS__CGSCC_OPM-NEXT:    call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR6]]
+; IS__CGSCC_OPM-NEXT:    call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR6]]
 ; IS__CGSCC_OPM-NEXT:    call fastcc void @callee_avx512_legal512_prefer256_call_avx512_legal256_prefer256(<8 x i64>* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64>* nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[TMP]]) #[[ATTR7]]
 ; IS__CGSCC_OPM-NEXT:    [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64
 ; IS__CGSCC_OPM-NEXT:    store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2
@@ -547,7 +547,7 @@ define void @avx512_legal512_prefer256_call_avx512_legal256_prefer256(<8 x i64>*
 ; IS__CGSCC_NPM-NEXT:    [[TMP:%.*]] = alloca <8 x i64>, align 32
 ; IS__CGSCC_NPM-NEXT:    [[TMP2:%.*]] = alloca <8 x i64>, align 32
 ; IS__CGSCC_NPM-NEXT:    [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8*
-; IS__CGSCC_NPM-NEXT:    call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR5]]
+; IS__CGSCC_NPM-NEXT:    call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR5]]
 ; IS__CGSCC_NPM-NEXT:    call fastcc void @callee_avx512_legal512_prefer256_call_avx512_legal256_prefer256(<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64>* noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[TMP]]) #[[ATTR6]]
 ; IS__CGSCC_NPM-NEXT:    [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64
 ; IS__CGSCC_NPM-NEXT:    store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2
@@ -627,7 +627,7 @@ define void @avx2_legal256_prefer256_call_avx2_legal512_prefer256(<8 x i64>* %ar
 ; IS__CGSCC_OPM-NEXT:    [[TMP:%.*]] = alloca <8 x i64>, align 32
 ; IS__CGSCC_OPM-NEXT:    [[TMP2:%.*]] = alloca <8 x i64>, align 32
 ; IS__CGSCC_OPM-NEXT:    [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8*
-; IS__CGSCC_OPM-NEXT:    call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR6]]
+; IS__CGSCC_OPM-NEXT:    call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR6]]
 ; IS__CGSCC_OPM-NEXT:    call fastcc void @callee_avx2_legal256_prefer256_call_avx2_legal512_prefer256(<8 x i64>* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64>* nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[TMP]]) #[[ATTR7]]
 ; IS__CGSCC_OPM-NEXT:    [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64
 ; IS__CGSCC_OPM-NEXT:    store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2
@@ -640,7 +640,7 @@ define void @avx2_legal256_prefer256_call_avx2_legal512_prefer256(<8 x i64>* %ar
 ; IS__CGSCC_NPM-NEXT:    [[TMP:%.*]] = alloca <8 x i64>, align 32
 ; IS__CGSCC_NPM-NEXT:    [[TMP2:%.*]] = alloca <8 x i64>, align 32
 ; IS__CGSCC_NPM-NEXT:    [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8*
-; IS__CGSCC_NPM-NEXT:    call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR5]]
+; IS__CGSCC_NPM-NEXT:    call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR5]]
 ; IS__CGSCC_NPM-NEXT:    [[TMP0:%.*]] = load <8 x i64>, <8 x i64>* [[TMP]], align 64
 ; IS__CGSCC_NPM-NEXT:    call fastcc void @callee_avx2_legal256_prefer256_call_avx2_legal512_prefer256(<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64> [[TMP0]]) #[[ATTR6]]
 ; IS__CGSCC_NPM-NEXT:    [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64
@@ -721,7 +721,7 @@ define void @avx2_legal512_prefer256_call_avx2_legal256_prefer256(<8 x i64>* %ar
 ; IS__CGSCC_OPM-NEXT:    [[TMP:%.*]] = alloca <8 x i64>, align 32
 ; IS__CGSCC_OPM-NEXT:    [[TMP2:%.*]] = alloca <8 x i64>, align 32
 ; IS__CGSCC_OPM-NEXT:    [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8*
-; IS__CGSCC_OPM-NEXT:    call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR6]]
+; IS__CGSCC_OPM-NEXT:    call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR6]]
 ; IS__CGSCC_OPM-NEXT:    call fastcc void @callee_avx2_legal512_prefer256_call_avx2_legal256_prefer256(<8 x i64>* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64>* nocapture nofree noundef nonnull readonly align 64 dereferenceable(64) [[TMP]]) #[[ATTR7]]
 ; IS__CGSCC_OPM-NEXT:    [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64
 ; IS__CGSCC_OPM-NEXT:    store <8 x i64> [[TMP4]], <8 x i64>* [[ARG]], align 2
@@ -734,7 +734,7 @@ define void @avx2_legal512_prefer256_call_avx2_legal256_prefer256(<8 x i64>* %ar
 ; IS__CGSCC_NPM-NEXT:    [[TMP:%.*]] = alloca <8 x i64>, align 32
 ; IS__CGSCC_NPM-NEXT:    [[TMP2:%.*]] = alloca <8 x i64>, align 32
 ; IS__CGSCC_NPM-NEXT:    [[TMP3:%.*]] = bitcast <8 x i64>* [[TMP]] to i8*
-; IS__CGSCC_NPM-NEXT:    call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 32 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR5]]
+; IS__CGSCC_NPM-NEXT:    call void @llvm.memset.p0i8.i64(i8* nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP3]], i8 noundef 0, i64 noundef 32, i1 noundef false) #[[ATTR5]]
 ; IS__CGSCC_NPM-NEXT:    [[TMP0:%.*]] = load <8 x i64>, <8 x i64>* [[TMP]], align 64
 ; IS__CGSCC_NPM-NEXT:    call fastcc void @callee_avx2_legal512_prefer256_call_avx2_legal256_prefer256(<8 x i64>* noalias nocapture nofree noundef nonnull writeonly align 64 dereferenceable(64) [[TMP2]], <8 x i64> [[TMP0]]) #[[ATTR6]]
 ; IS__CGSCC_NPM-NEXT:    [[TMP4:%.*]] = load <8 x i64>, <8 x i64>* [[TMP2]], align 64

diff  --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/X86/thiscall.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/X86/thiscall.ll
index cf7607b90418b..acbb183955f5a 100644
--- a/llvm/test/Transforms/Attributor/ArgumentPromotion/X86/thiscall.ll
+++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/X86/thiscall.ll
@@ -21,7 +21,7 @@ define internal x86_thiscallcc void @internalfun(%struct.a* %this, <{ %struct.a
 ; CHECK-NEXT:    [[A:%.*]] = getelementptr inbounds <{ [[STRUCT_A]] }>, <{ [[STRUCT_A]] }>* [[TMP0]], i32 0, i32 0
 ; CHECK-NEXT:    [[ARGMEM:%.*]] = alloca inalloca <{ [[STRUCT_A]] }>, align 4
 ; CHECK-NEXT:    [[TMP1:%.*]] = getelementptr inbounds <{ [[STRUCT_A]] }>, <{ [[STRUCT_A]] }>* [[ARGMEM]], i32 0, i32 0
-; CHECK-NEXT:    [[CALL:%.*]] = call x86_thiscallcc %struct.a* @copy_ctor(%struct.a* noundef nonnull align 4 dereferenceable(1) [[TMP1]], %struct.a* noundef nonnull dereferenceable(1) [[A]])
+; CHECK-NEXT:    [[CALL:%.*]] = call x86_thiscallcc %struct.a* @copy_ctor(%struct.a* noundef nonnull align 4 dereferenceable(1) [[TMP1]], %struct.a* noundef nonnull align 4 dereferenceable(1) [[A]])
 ; CHECK-NEXT:    call void @ext(<{ [[STRUCT_A]] }>* noundef nonnull inalloca(<{ [[STRUCT_A]] }>) align 4 dereferenceable(1) [[ARGMEM]])
 ; CHECK-NEXT:    ret void
 ;

diff  --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/aggregate-promote.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/aggregate-promote.ll
index e49e90a0388e2..9ef8a2eddbcc8 100644
--- a/llvm/test/Transforms/Attributor/ArgumentPromotion/aggregate-promote.ll
+++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/aggregate-promote.ll
@@ -11,14 +11,11 @@
 ; CHECK: @[[G:[a-zA-Z0-9_$"\\.-]+]] = constant [[T:%.*]] { i32 0, i32 0, i32 17, i32 25 }
 ;.
 define internal i32 @test(%T* %p) {
-; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; CHECK-LABEL: define {{[^@]+}}@test
-; CHECK-SAME: () #[[ATTR0:[0-9]+]] {
-; CHECK-NEXT:  entry:
-; CHECK-NEXT:    [[A:%.*]] = load i32, i32* getelementptr inbounds ([[T:%.*]], %T* @G, i64 0, i32 3), align 4
-; CHECK-NEXT:    [[B:%.*]] = load i32, i32* getelementptr inbounds ([[T]], %T* @G, i64 0, i32 2), align 8
-; CHECK-NEXT:    [[V:%.*]] = add i32 [[A]], [[B]]
-; CHECK-NEXT:    ret i32 [[V]]
+; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; IS__CGSCC____-LABEL: define {{[^@]+}}@test
+; IS__CGSCC____-SAME: () #[[ATTR0:[0-9]+]] {
+; IS__CGSCC____-NEXT:  entry:
+; IS__CGSCC____-NEXT:    ret i32 42
 ;
 entry:
   %a.gep = getelementptr %T, %T* %p, i64 0, i32 3
@@ -32,16 +29,15 @@ entry:
 define i32 @caller() {
 ; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
 ; IS__TUNIT____-LABEL: define {{[^@]+}}@caller
-; IS__TUNIT____-SAME: () #[[ATTR0]] {
+; IS__TUNIT____-SAME: () #[[ATTR0:[0-9]+]] {
 ; IS__TUNIT____-NEXT:  entry:
-; IS__TUNIT____-NEXT:    [[V:%.*]] = call i32 @test() #[[ATTR1:[0-9]+]]
-; IS__TUNIT____-NEXT:    ret i32 [[V]]
+; IS__TUNIT____-NEXT:    ret i32 42
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@caller
 ; IS__CGSCC____-SAME: () #[[ATTR1:[0-9]+]] {
 ; IS__CGSCC____-NEXT:  entry:
-; IS__CGSCC____-NEXT:    [[V:%.*]] = call i32 @test() #[[ATTR2:[0-9]+]]
+; IS__CGSCC____-NEXT:    [[V:%.*]] = call noundef i32 @test() #[[ATTR2:[0-9]+]]
 ; IS__CGSCC____-NEXT:    ret i32 [[V]]
 ;
 entry:
@@ -50,7 +46,6 @@ entry:
 }
 ;.
 ; IS__TUNIT____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__TUNIT____: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn }
 ;.
 ; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
 ; IS__CGSCC____: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn }

diff  --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/alignment.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/alignment.ll
index 023bdc7b31294..218ab83b01b63 100644
--- a/llvm/test/Transforms/Attributor/ArgumentPromotion/alignment.ll
+++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/alignment.ll
@@ -5,18 +5,16 @@
 ; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM
 
 define void @f() {
-; IS________OPM-LABEL: define {{[^@]+}}@f() {
-; IS________OPM-NEXT:  entry:
-; IS________OPM-NEXT:    [[A:%.*]] = alloca i32, align 1
-; IS________OPM-NEXT:    call void @g(i32* noalias nocapture nofree noundef nonnull readonly dereferenceable(4) [[A]])
-; IS________OPM-NEXT:    ret void
+; IS__TUNIT____-LABEL: define {{[^@]+}}@f() {
+; IS__TUNIT____-NEXT:  entry:
+; IS__TUNIT____-NEXT:    call void @g()
+; IS__TUNIT____-NEXT:    ret void
 ;
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@f() {
-; IS__TUNIT_NPM-NEXT:  entry:
-; IS__TUNIT_NPM-NEXT:    [[A:%.*]] = alloca i32, align 1
-; IS__TUNIT_NPM-NEXT:    [[TMP0:%.*]] = load i32, i32* [[A]], align 1
-; IS__TUNIT_NPM-NEXT:    call void @g(i32 [[TMP0]])
-; IS__TUNIT_NPM-NEXT:    ret void
+; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@f() {
+; IS__CGSCC_OPM-NEXT:  entry:
+; IS__CGSCC_OPM-NEXT:    [[A:%.*]] = alloca i32, align 1
+; IS__CGSCC_OPM-NEXT:    call void @g(i32* noalias nocapture nofree noundef nonnull readonly dereferenceable(4) [[A]])
+; IS__CGSCC_OPM-NEXT:    ret void
 ;
 ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@f() {
 ; IS__CGSCC_NPM-NEXT:  entry:
@@ -30,19 +28,23 @@ entry:
 }
 
 define internal void @g(i32* %a) {
-; IS________OPM-LABEL: define {{[^@]+}}@g
-; IS________OPM-SAME: (i32* noalias nocapture nofree noundef nonnull readonly dereferenceable(4) [[A:%.*]]) {
-; IS________OPM-NEXT:    [[AA:%.*]] = load i32, i32* [[A]], align 1
-; IS________OPM-NEXT:    call void @z(i32 [[AA]])
-; IS________OPM-NEXT:    ret void
+; IS__TUNIT____-LABEL: define {{[^@]+}}@g() {
+; IS__TUNIT____-NEXT:    call void @z(i32 undef)
+; IS__TUNIT____-NEXT:    ret void
 ;
-; IS________NPM-LABEL: define {{[^@]+}}@g
-; IS________NPM-SAME: (i32 [[TMP0:%.*]]) {
-; IS________NPM-NEXT:    [[A_PRIV:%.*]] = alloca i32, align 4
-; IS________NPM-NEXT:    store i32 [[TMP0]], i32* [[A_PRIV]], align 4
-; IS________NPM-NEXT:    [[AA:%.*]] = load i32, i32* [[A_PRIV]], align 1
-; IS________NPM-NEXT:    call void @z(i32 [[AA]])
-; IS________NPM-NEXT:    ret void
+; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@g
+; IS__CGSCC_OPM-SAME: (i32* noalias nocapture nofree noundef nonnull readonly dereferenceable(4) [[A:%.*]]) {
+; IS__CGSCC_OPM-NEXT:    [[AA:%.*]] = load i32, i32* [[A]], align 1
+; IS__CGSCC_OPM-NEXT:    call void @z(i32 [[AA]])
+; IS__CGSCC_OPM-NEXT:    ret void
+;
+; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@g
+; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]]) {
+; IS__CGSCC_NPM-NEXT:    [[A_PRIV:%.*]] = alloca i32, align 4
+; IS__CGSCC_NPM-NEXT:    store i32 [[TMP0]], i32* [[A_PRIV]], align 4
+; IS__CGSCC_NPM-NEXT:    [[AA:%.*]] = load i32, i32* [[A_PRIV]], align 1
+; IS__CGSCC_NPM-NEXT:    call void @z(i32 [[AA]])
+; IS__CGSCC_NPM-NEXT:    ret void
 ;
   %aa = load i32, i32* %a, align 1
   call void @z(i32 %aa)
@@ -110,7 +112,7 @@ define internal i32 @caller(i32* %A) {
 ; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]]) #[[ATTR1:[0-9]+]] {
 ; IS__CGSCC_NPM-NEXT:    [[A_PRIV:%.*]] = alloca i32, align 4
 ; IS__CGSCC_NPM-NEXT:    store i32 [[TMP0]], i32* [[A_PRIV]], align 4
-; IS__CGSCC_NPM-NEXT:    [[C:%.*]] = call i32 @test(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_PRIV]], i64 1) #[[ATTR3:[0-9]+]]
+; IS__CGSCC_NPM-NEXT:    [[C:%.*]] = call i32 @test(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A_PRIV]], i64 noundef 1) #[[ATTR3:[0-9]+]]
 ; IS__CGSCC_NPM-NEXT:    ret i32 [[C]]
 ;
   %B = alloca i64
@@ -137,7 +139,7 @@ define i32 @callercaller() {
 ; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
 ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@callercaller
 ; IS__CGSCC_NPM-SAME: () #[[ATTR2:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT:    [[X:%.*]] = call i32 @caller(i32 2) #[[ATTR4:[0-9]+]]
+; IS__CGSCC_NPM-NEXT:    [[X:%.*]] = call i32 @caller(i32 noundef 2) #[[ATTR4:[0-9]+]]
 ; IS__CGSCC_NPM-NEXT:    ret i32 [[X]]
 ;
   %B = alloca i32

diff  --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/alloca-as.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/alloca-as.ll
index b056ddfc75138..4e90fc4c2c9e2 100644
--- a/llvm/test/Transforms/Attributor/ArgumentPromotion/alloca-as.ll
+++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/alloca-as.ll
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=2 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=2 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
+; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=3 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=3 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
 ; RUN: opt -attributor-cgscc -enable-new-pm=0 -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_NPM,IS__CGSCC____,IS________OPM,IS__CGSCC_OPM
 ; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM
 

diff  --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/array.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/array.ll
index 9e941eebc732b..8a6238dd193d5 100644
--- a/llvm/test/Transforms/Attributor/ArgumentPromotion/array.ll
+++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/array.ll
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=2 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=2 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
+; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=3 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=3 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
 ; RUN: opt -attributor-cgscc -enable-new-pm=0 -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_NPM,IS__CGSCC____,IS________OPM,IS__CGSCC_OPM
 ; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM
 ;

diff  --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/attrs.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/attrs.ll
index 31295fc3f73f0..49dbc04cf8131 100644
--- a/llvm/test/Transforms/Attributor/ArgumentPromotion/attrs.ll
+++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/attrs.ll
@@ -14,9 +14,9 @@ define internal i32 @f(%struct.ss* byval(%struct.ss) %b, i32* byval(i32) %X, i32
 ; IS________OPM-SAME: (%struct.ss* noalias nocapture nofree noundef nonnull byval([[STRUCT_SS:%.*]]) align 8 dereferenceable(12) [[B:%.*]], i32* noalias nocapture nofree noundef nonnull byval(i32) align 4 dereferenceable(4) [[X:%.*]]) #[[ATTR0:[0-9]+]] {
 ; IS________OPM-NEXT:  entry:
 ; IS________OPM-NEXT:    [[TMP:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B]], i32 0, i32 0
-; IS________OPM-NEXT:    [[TMP1:%.*]] = load i32, i32* [[TMP]], align 4
+; IS________OPM-NEXT:    [[TMP1:%.*]] = load i32, i32* [[TMP]], align 8
 ; IS________OPM-NEXT:    [[TMP2:%.*]] = add i32 [[TMP1]], 1
-; IS________OPM-NEXT:    store i32 [[TMP2]], i32* [[TMP]], align 4
+; IS________OPM-NEXT:    store i32 [[TMP2]], i32* [[TMP]], align 8
 ; IS________OPM-NEXT:    store i32 0, i32* [[X]], align 4
 ; IS________OPM-NEXT:    [[L:%.*]] = load i32, i32* [[X]], align 4
 ; IS________OPM-NEXT:    [[A:%.*]] = add i32 [[L]], [[TMP2]]
@@ -34,9 +34,9 @@ define internal i32 @f(%struct.ss* byval(%struct.ss) %b, i32* byval(i32) %X, i32
 ; IS________NPM-NEXT:    [[B_PRIV_0_1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B_PRIV]], i64 0, i32 1
 ; IS________NPM-NEXT:    store i64 [[TMP1]], i64* [[B_PRIV_0_1]], align 4
 ; IS________NPM-NEXT:    [[TMP:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B_PRIV]], i32 0, i32 0
-; IS________NPM-NEXT:    [[TMP1:%.*]] = load i32, i32* [[TMP]], align 4
+; IS________NPM-NEXT:    [[TMP1:%.*]] = load i32, i32* [[TMP]], align 8
 ; IS________NPM-NEXT:    [[TMP2:%.*]] = add i32 [[TMP1]], 1
-; IS________NPM-NEXT:    store i32 [[TMP2]], i32* [[TMP]], align 4
+; IS________NPM-NEXT:    store i32 [[TMP2]], i32* [[TMP]], align 8
 ; IS________NPM-NEXT:    store i32 0, i32* [[X_PRIV]], align 4
 ; IS________NPM-NEXT:    [[L:%.*]] = load i32, i32* [[X_PRIV]], align 4
 ; IS________NPM-NEXT:    [[A:%.*]] = add i32 [[L]], [[TMP2]]
@@ -105,7 +105,7 @@ define i32 @test(i32* %X) {
 ; IS__CGSCC_NPM-NEXT:    [[TMP1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 0
 ; IS__CGSCC_NPM-NEXT:    [[TMP4:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 1
 ; IS__CGSCC_NPM-NEXT:    [[TMP0:%.*]] = load i32, i32* [[X]], align 4
-; IS__CGSCC_NPM-NEXT:    [[C:%.*]] = call i32 @f(i32 1, i64 2, i32 [[TMP0]]) #[[ATTR2:[0-9]+]]
+; IS__CGSCC_NPM-NEXT:    [[C:%.*]] = call i32 @f(i32 noundef 1, i64 noundef 2, i32 [[TMP0]]) #[[ATTR2:[0-9]+]]
 ; IS__CGSCC_NPM-NEXT:    ret i32 [[C]]
 ;
 entry:

diff  --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/basictest.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/basictest.ll
index 28f621500ed5c..ba1e3668403b5 100644
--- a/llvm/test/Transforms/Attributor/ArgumentPromotion/basictest.ll
+++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/basictest.ll
@@ -44,7 +44,7 @@ define internal i32 @caller(i32* %B) {
 ; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]]) #[[ATTR1:[0-9]+]] {
 ; IS__CGSCC_NPM-NEXT:    [[B_PRIV:%.*]] = alloca i32, align 4
 ; IS__CGSCC_NPM-NEXT:    store i32 [[TMP0]], i32* [[B_PRIV]], align 4
-; IS__CGSCC_NPM-NEXT:    [[C:%.*]] = call i32 @test(i32 1, i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B_PRIV]]) #[[ATTR3:[0-9]+]]
+; IS__CGSCC_NPM-NEXT:    [[C:%.*]] = call i32 @test(i32 noundef 1, i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[B_PRIV]]) #[[ATTR3:[0-9]+]]
 ; IS__CGSCC_NPM-NEXT:    ret i32 [[C]]
 ;
   %A = alloca i32
@@ -71,7 +71,7 @@ define i32 @callercaller() {
 ; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
 ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@callercaller
 ; IS__CGSCC_NPM-SAME: () #[[ATTR2:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT:    [[X:%.*]] = call i32 @caller(i32 2) #[[ATTR4:[0-9]+]]
+; IS__CGSCC_NPM-NEXT:    [[X:%.*]] = call i32 @caller(i32 noundef 2) #[[ATTR4:[0-9]+]]
 ; IS__CGSCC_NPM-NEXT:    ret i32 [[X]]
 ;
   %B = alloca i32

diff  --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/byval-2.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/byval-2.ll
index 9ae184452d773..463b3656d567c 100644
--- a/llvm/test/Transforms/Attributor/ArgumentPromotion/byval-2.ll
+++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/byval-2.ll
@@ -12,9 +12,9 @@ define internal void @f(%struct.ss* byval(%struct.ss)  %b, i32* byval(i32) %X) n
 ; IS________OPM-SAME: (%struct.ss* noalias nocapture nofree noundef nonnull byval([[STRUCT_SS:%.*]]) align 8 dereferenceable(12) [[B:%.*]], i32* noalias nocapture nofree noundef nonnull writeonly byval(i32) align 4 dereferenceable(4) [[X:%.*]]) #[[ATTR0:[0-9]+]] {
 ; IS________OPM-NEXT:  entry:
 ; IS________OPM-NEXT:    [[TMP:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B]], i32 0, i32 0
-; IS________OPM-NEXT:    [[TMP1:%.*]] = load i32, i32* [[TMP]], align 4
+; IS________OPM-NEXT:    [[TMP1:%.*]] = load i32, i32* [[TMP]], align 8
 ; IS________OPM-NEXT:    [[TMP2:%.*]] = add i32 [[TMP1]], 1
-; IS________OPM-NEXT:    store i32 [[TMP2]], i32* [[TMP]], align 4
+; IS________OPM-NEXT:    store i32 [[TMP2]], i32* [[TMP]], align 8
 ; IS________OPM-NEXT:    store i32 0, i32* [[X]], align 4
 ; IS________OPM-NEXT:    ret void
 ;
@@ -30,9 +30,9 @@ define internal void @f(%struct.ss* byval(%struct.ss)  %b, i32* byval(i32) %X) n
 ; IS________NPM-NEXT:    [[B_PRIV_0_1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B_PRIV]], i64 0, i32 1
 ; IS________NPM-NEXT:    store i64 [[TMP1]], i64* [[B_PRIV_0_1]], align 4
 ; IS________NPM-NEXT:    [[TMP:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B_PRIV]], i32 0, i32 0
-; IS________NPM-NEXT:    [[TMP1:%.*]] = load i32, i32* [[TMP]], align 4
+; IS________NPM-NEXT:    [[TMP1:%.*]] = load i32, i32* [[TMP]], align 8
 ; IS________NPM-NEXT:    [[TMP2:%.*]] = add i32 [[TMP1]], 1
-; IS________NPM-NEXT:    store i32 [[TMP2]], i32* [[TMP]], align 4
+; IS________NPM-NEXT:    store i32 [[TMP2]], i32* [[TMP]], align 8
 ; IS________NPM-NEXT:    store i32 0, i32* [[X_PRIV]], align 4
 ; IS________NPM-NEXT:    ret void
 ;
@@ -95,7 +95,7 @@ define i32 @test(i32* %X) {
 ; IS__CGSCC_NPM-NEXT:    [[TMP1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 0
 ; IS__CGSCC_NPM-NEXT:    [[TMP4:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 1
 ; IS__CGSCC_NPM-NEXT:    [[TMP0:%.*]] = load i32, i32* [[X]], align 4
-; IS__CGSCC_NPM-NEXT:    call void @f(i32 1, i64 2, i32 [[TMP0]]) #[[ATTR2:[0-9]+]]
+; IS__CGSCC_NPM-NEXT:    call void @f(i32 noundef 1, i64 noundef 2, i32 [[TMP0]]) #[[ATTR2:[0-9]+]]
 ; IS__CGSCC_NPM-NEXT:    ret i32 0
 ;
 entry:

diff  --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/byval.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/byval.ll
index f49d30b8ee522..ecec7776754f4 100644
--- a/llvm/test/Transforms/Attributor/ArgumentPromotion/byval.ll
+++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/byval.ll
@@ -14,9 +14,9 @@ define internal i32 @f(%struct.ss* byval(%struct.ss)  %b) nounwind  {
 ; IS________OPM-SAME: (%struct.ss* noalias nocapture nofree noundef nonnull byval([[STRUCT_SS:%.*]]) align 8 dereferenceable(12) [[B:%.*]]) #[[ATTR0:[0-9]+]] {
 ; IS________OPM-NEXT:  entry:
 ; IS________OPM-NEXT:    [[TMP:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B]], i32 0, i32 0
-; IS________OPM-NEXT:    [[TMP1:%.*]] = load i32, i32* [[TMP]], align 4
+; IS________OPM-NEXT:    [[TMP1:%.*]] = load i32, i32* [[TMP]], align 8
 ; IS________OPM-NEXT:    [[TMP2:%.*]] = add i32 [[TMP1]], 1
-; IS________OPM-NEXT:    store i32 [[TMP2]], i32* [[TMP]], align 4
+; IS________OPM-NEXT:    store i32 [[TMP2]], i32* [[TMP]], align 8
 ; IS________OPM-NEXT:    ret i32 [[TMP1]]
 ;
 ; IS________NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
@@ -29,9 +29,9 @@ define internal i32 @f(%struct.ss* byval(%struct.ss)  %b) nounwind  {
 ; IS________NPM-NEXT:    [[B_PRIV_0_1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B_PRIV]], i64 0, i32 1
 ; IS________NPM-NEXT:    store i64 [[TMP1]], i64* [[B_PRIV_0_1]], align 4
 ; IS________NPM-NEXT:    [[TMP:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[B_PRIV]], i32 0, i32 0
-; IS________NPM-NEXT:    [[TMP1:%.*]] = load i32, i32* [[TMP]], align 4
+; IS________NPM-NEXT:    [[TMP1:%.*]] = load i32, i32* [[TMP]], align 8
 ; IS________NPM-NEXT:    [[TMP2:%.*]] = add i32 [[TMP1]], 1
-; IS________NPM-NEXT:    store i32 [[TMP2]], i32* [[TMP]], align 4
+; IS________NPM-NEXT:    store i32 [[TMP2]], i32* [[TMP]], align 8
 ; IS________NPM-NEXT:    ret i32 [[TMP1]]
 ;
 entry:
@@ -100,15 +100,15 @@ define i32 @main() nounwind  {
 ; IS__TUNIT_NPM-NEXT:    [[TMP1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 0
 ; IS__TUNIT_NPM-NEXT:    store i32 1, i32* [[TMP1]], align 8
 ; IS__TUNIT_NPM-NEXT:    [[TMP4:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 1
-; IS__TUNIT_NPM-NEXT:    [[S_CAST1:%.*]] = bitcast %struct.ss* [[S]] to i32*
-; IS__TUNIT_NPM-NEXT:    [[TMP0:%.*]] = load i32, i32* [[S_CAST1]], align 8
-; IS__TUNIT_NPM-NEXT:    [[S_0_12:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i64 0, i32 1
-; IS__TUNIT_NPM-NEXT:    [[TMP1:%.*]] = load i64, i64* [[S_0_12]], align 8
-; IS__TUNIT_NPM-NEXT:    [[C0:%.*]] = call i32 @f(i32 [[TMP0]], i64 [[TMP1]]) #[[ATTR2:[0-9]+]]
 ; IS__TUNIT_NPM-NEXT:    [[S_CAST:%.*]] = bitcast %struct.ss* [[S]] to i32*
-; IS__TUNIT_NPM-NEXT:    [[TMP2:%.*]] = load i32, i32* [[S_CAST]], align 32
+; IS__TUNIT_NPM-NEXT:    [[TMP0:%.*]] = load i32, i32* [[S_CAST]], align 8
 ; IS__TUNIT_NPM-NEXT:    [[S_0_1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i64 0, i32 1
-; IS__TUNIT_NPM-NEXT:    [[TMP3:%.*]] = load i64, i64* [[S_0_1]], align 32
+; IS__TUNIT_NPM-NEXT:    [[TMP1:%.*]] = load i64, i64* [[S_0_1]], align 8
+; IS__TUNIT_NPM-NEXT:    [[C0:%.*]] = call i32 @f(i32 [[TMP0]], i64 [[TMP1]]) #[[ATTR2:[0-9]+]]
+; IS__TUNIT_NPM-NEXT:    [[S_CAST1:%.*]] = bitcast %struct.ss* [[S]] to i32*
+; IS__TUNIT_NPM-NEXT:    [[TMP2:%.*]] = load i32, i32* [[S_CAST1]], align 32
+; IS__TUNIT_NPM-NEXT:    [[S_0_12:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i64 0, i32 1
+; IS__TUNIT_NPM-NEXT:    [[TMP3:%.*]] = load i64, i64* [[S_0_12]], align 32
 ; IS__TUNIT_NPM-NEXT:    [[C1:%.*]] = call i32 @g(i32 [[TMP2]], i64 [[TMP3]]) #[[ATTR2]]
 ; IS__TUNIT_NPM-NEXT:    [[A:%.*]] = add i32 [[C0]], [[C1]]
 ; IS__TUNIT_NPM-NEXT:    ret i32 [[A]]
@@ -119,7 +119,7 @@ define i32 @main() nounwind  {
 ; IS__CGSCC_OPM-NEXT:  entry:
 ; IS__CGSCC_OPM-NEXT:    [[S:%.*]] = alloca [[STRUCT_SS:%.*]], align 4
 ; IS__CGSCC_OPM-NEXT:    [[TMP1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 0
-; IS__CGSCC_OPM-NEXT:    store i32 1, i32* [[TMP1]], align 8
+; IS__CGSCC_OPM-NEXT:    store i32 1, i32* [[TMP1]], align 32
 ; IS__CGSCC_OPM-NEXT:    [[TMP4:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 1
 ; IS__CGSCC_OPM-NEXT:    store i64 2, i64* [[TMP4]], align 4
 ; IS__CGSCC_OPM-NEXT:    [[C0:%.*]] = call i32 @f(%struct.ss* noalias nocapture nofree noundef nonnull readonly byval([[STRUCT_SS]]) align 32 dereferenceable(12) [[S]]) #[[ATTR2:[0-9]+]]
@@ -134,8 +134,8 @@ define i32 @main() nounwind  {
 ; IS__CGSCC_NPM-NEXT:    [[S:%.*]] = alloca [[STRUCT_SS:%.*]], align 4
 ; IS__CGSCC_NPM-NEXT:    [[TMP1:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 0
 ; IS__CGSCC_NPM-NEXT:    [[TMP4:%.*]] = getelementptr [[STRUCT_SS]], %struct.ss* [[S]], i32 0, i32 1
-; IS__CGSCC_NPM-NEXT:    [[C0:%.*]] = call i32 @f(i32 1, i64 2) #[[ATTR2:[0-9]+]]
-; IS__CGSCC_NPM-NEXT:    [[C1:%.*]] = call i32 @g(i32 1, i64 2) #[[ATTR2]]
+; IS__CGSCC_NPM-NEXT:    [[C0:%.*]] = call i32 @f(i32 noundef 1, i64 noundef 2) #[[ATTR2:[0-9]+]]
+; IS__CGSCC_NPM-NEXT:    [[C1:%.*]] = call i32 @g(i32 noundef 1, i64 noundef 2) #[[ATTR2]]
 ; IS__CGSCC_NPM-NEXT:    [[A:%.*]] = add i32 [[C0]], [[C1]]
 ; IS__CGSCC_NPM-NEXT:    ret i32 [[A]]
 ;

diff  --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/chained.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/chained.ll
index 8572f33a42547..658340bdaf74c 100644
--- a/llvm/test/Transforms/Attributor/ArgumentPromotion/chained.ll
+++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/chained.ll
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=7 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=7 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
+; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=4 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=4 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
 ; RUN: opt -attributor-cgscc -enable-new-pm=0 -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_NPM,IS__CGSCC____,IS________OPM,IS__CGSCC_OPM
 ; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM
 
@@ -13,12 +13,11 @@
 ;.
 define internal i32 @test(i32** %x) {
 ;
-; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; CHECK-LABEL: define {{[^@]+}}@test
-; CHECK-SAME: () #[[ATTR0:[0-9]+]] {
-; CHECK-NEXT:  entry:
-; CHECK-NEXT:    [[Z:%.*]] = load i32, i32* @G1, align 4
-; CHECK-NEXT:    ret i32 [[Z]]
+; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; IS__CGSCC____-LABEL: define {{[^@]+}}@test
+; IS__CGSCC____-SAME: () #[[ATTR0:[0-9]+]] {
+; IS__CGSCC____-NEXT:  entry:
+; IS__CGSCC____-NEXT:    ret i32 0
 ;
 entry:
   %y = load i32*, i32** %x
@@ -29,16 +28,15 @@ entry:
 define i32 @caller() {
 ; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
 ; IS__TUNIT____-LABEL: define {{[^@]+}}@caller
-; IS__TUNIT____-SAME: () #[[ATTR0]] {
+; IS__TUNIT____-SAME: () #[[ATTR0:[0-9]+]] {
 ; IS__TUNIT____-NEXT:  entry:
-; IS__TUNIT____-NEXT:    [[X:%.*]] = call i32 @test() #[[ATTR1:[0-9]+]]
-; IS__TUNIT____-NEXT:    ret i32 [[X]]
+; IS__TUNIT____-NEXT:    ret i32 0
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@caller
 ; IS__CGSCC____-SAME: () #[[ATTR1:[0-9]+]] {
 ; IS__CGSCC____-NEXT:  entry:
-; IS__CGSCC____-NEXT:    [[X:%.*]] = call i32 @test() #[[ATTR2:[0-9]+]]
+; IS__CGSCC____-NEXT:    [[X:%.*]] = call noundef i32 @test() #[[ATTR2:[0-9]+]]
 ; IS__CGSCC____-NEXT:    ret i32 [[X]]
 ;
 entry:
@@ -48,7 +46,6 @@ entry:
 
 ;.
 ; IS__TUNIT____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__TUNIT____: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn }
 ;.
 ; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
 ; IS__CGSCC____: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn }

diff  --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/control-flow2.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/control-flow2.ll
index 0dac5c3195a33..112f70c824d48 100644
--- a/llvm/test/Transforms/Attributor/ArgumentPromotion/control-flow2.ll
+++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/control-flow2.ll
@@ -57,7 +57,7 @@ define i32 @foo() {
 ; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
 ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@foo
 ; IS__CGSCC_NPM-SAME: () #[[ATTR1:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT:    [[X:%.*]] = call i32 @callee(i32 17) #[[ATTR2:[0-9]+]]
+; IS__CGSCC_NPM-NEXT:    [[X:%.*]] = call i32 @callee(i32 noundef 17) #[[ATTR2:[0-9]+]]
 ; IS__CGSCC_NPM-NEXT:    ret i32 [[X]]
 ;
   %A = alloca i32         ; <i32*> [#uses=2]

diff  --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/crash.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/crash.ll
index 824bfd9e61a4d..2e22611fcea65 100644
--- a/llvm/test/Transforms/Attributor/ArgumentPromotion/crash.ll
+++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/crash.ll
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=3 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=3 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
+; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=2 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=2 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
 ; RUN: opt -attributor-cgscc -enable-new-pm=0 -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_NPM,IS__CGSCC____,IS________OPM,IS__CGSCC_OPM
 ; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM
 

diff  --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/musttail.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/musttail.ll
index fb878b82cd7ce..2be05748ad108 100644
--- a/llvm/test/Transforms/Attributor/ArgumentPromotion/musttail.ll
+++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/musttail.ll
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=6 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=6 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
+; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=2 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=2 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
 ; RUN: opt -attributor-cgscc -enable-new-pm=0 -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_NPM,IS__CGSCC____,IS________OPM,IS__CGSCC_OPM
 ; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM
 ; PR36543
@@ -131,7 +131,7 @@ define internal i32 @test2b(%T* %p, i32 %p2) {
 ; IS__TUNIT____-NEXT:    [[A:%.*]] = load i32, i32* [[A_GEP]], align 4
 ; IS__TUNIT____-NEXT:    [[B:%.*]] = load i32, i32* [[B_GEP]], align 4
 ; IS__TUNIT____-NEXT:    [[V:%.*]] = add i32 [[A]], [[B]]
-; IS__TUNIT____-NEXT:    [[CA:%.*]] = musttail call noundef i32 @bar(%T* undef, i32 [[V]]) #[[ATTR5:[0-9]+]]
+; IS__TUNIT____-NEXT:    [[CA:%.*]] = musttail call i32 @bar(%T* undef, i32 [[V]]) #[[ATTR5:[0-9]+]]
 ; IS__TUNIT____-NEXT:    ret i32 [[CA]]
 ;
 ; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind willreturn
@@ -158,8 +158,8 @@ define i32 @caller2b(%T* %g) {
 ; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
 ; IS__TUNIT____-LABEL: define {{[^@]+}}@caller2b
 ; IS__TUNIT____-SAME: (%T* nocapture nofree readonly [[G:%.*]]) #[[ATTR3]] {
-; IS__TUNIT____-NEXT:    [[V:%.*]] = call noundef i32 @test2b(%T* nocapture nofree readonly [[G]], i32 undef) #[[ATTR6:[0-9]+]]
-; IS__TUNIT____-NEXT:    ret i32 [[V]]
+; IS__TUNIT____-NEXT:    [[V:%.*]] = call i32 @test2b(%T* nocapture nofree readonly [[G]], i32 undef) #[[ATTR6:[0-9]+]]
+; IS__TUNIT____-NEXT:    ret i32 0
 ;
 ; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@caller2b

diff  --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/profile.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/profile.ll
index 20f7d0dd65378..583cd5d1f7893 100644
--- a/llvm/test/Transforms/Attributor/ArgumentPromotion/profile.ll
+++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/profile.ll
@@ -8,21 +8,19 @@ target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:1
 ; Checks if !prof metadata is corret in deadargelim.
 
 define void @caller() #0 {
-; IS________OPM-LABEL: define {{[^@]+}}@caller() {
-; IS________OPM-NEXT:    [[X:%.*]] = alloca i32, align 4
-; IS________OPM-NEXT:    store i32 42, i32* [[X]], align 4
-; IS________OPM-NEXT:    call void @promote_i32_ptr(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[X]]), !prof [[PROF0:![0-9]+]]
-; IS________OPM-NEXT:    ret void
+; IS__TUNIT____-LABEL: define {{[^@]+}}@caller() {
+; IS__TUNIT____-NEXT:    [[X:%.*]] = alloca i32, align 4
+; IS__TUNIT____-NEXT:    call void @promote_i32_ptr(), !prof [[PROF0:![0-9]+]]
+; IS__TUNIT____-NEXT:    ret void
 ;
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@caller() {
-; IS__TUNIT_NPM-NEXT:    [[X:%.*]] = alloca i32, align 4
-; IS__TUNIT_NPM-NEXT:    store i32 42, i32* [[X]], align 4
-; IS__TUNIT_NPM-NEXT:    [[TMP1:%.*]] = load i32, i32* [[X]], align 4
-; IS__TUNIT_NPM-NEXT:    call void @promote_i32_ptr(i32 [[TMP1]]), !prof [[PROF0:![0-9]+]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@caller() {
+; IS__CGSCC_OPM-NEXT:    [[X:%.*]] = alloca i32, align 4
+; IS__CGSCC_OPM-NEXT:    store i32 42, i32* [[X]], align 4
+; IS__CGSCC_OPM-NEXT:    call void @promote_i32_ptr(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[X]]), !prof [[PROF0:![0-9]+]]
+; IS__CGSCC_OPM-NEXT:    ret void
 ;
 ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@caller() {
-; IS__CGSCC_NPM-NEXT:    call void @promote_i32_ptr(i32 42), !prof [[PROF0:![0-9]+]]
+; IS__CGSCC_NPM-NEXT:    call void @promote_i32_ptr(i32 noundef 42), !prof [[PROF0:![0-9]+]]
 ; IS__CGSCC_NPM-NEXT:    ret void
 ;
   %x = alloca i32
@@ -32,19 +30,23 @@ define void @caller() #0 {
 }
 
 define internal void @promote_i32_ptr(i32* %xp) {
-; IS________OPM-LABEL: define {{[^@]+}}@promote_i32_ptr
-; IS________OPM-SAME: (i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[XP:%.*]]) {
-; IS________OPM-NEXT:    [[X:%.*]] = load i32, i32* [[XP]], align 4
-; IS________OPM-NEXT:    call void @use_i32(i32 [[X]])
-; IS________OPM-NEXT:    ret void
+; IS__TUNIT____-LABEL: define {{[^@]+}}@promote_i32_ptr() {
+; IS__TUNIT____-NEXT:    call void @use_i32(i32 noundef 42)
+; IS__TUNIT____-NEXT:    ret void
 ;
-; IS________NPM-LABEL: define {{[^@]+}}@promote_i32_ptr
-; IS________NPM-SAME: (i32 [[TMP0:%.*]]) {
-; IS________NPM-NEXT:    [[XP_PRIV:%.*]] = alloca i32, align 4
-; IS________NPM-NEXT:    store i32 [[TMP0]], i32* [[XP_PRIV]], align 4
-; IS________NPM-NEXT:    [[X:%.*]] = load i32, i32* [[XP_PRIV]], align 4
-; IS________NPM-NEXT:    call void @use_i32(i32 [[X]])
-; IS________NPM-NEXT:    ret void
+; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@promote_i32_ptr
+; IS__CGSCC_OPM-SAME: (i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[XP:%.*]]) {
+; IS__CGSCC_OPM-NEXT:    [[X:%.*]] = load i32, i32* [[XP]], align 4
+; IS__CGSCC_OPM-NEXT:    call void @use_i32(i32 [[X]])
+; IS__CGSCC_OPM-NEXT:    ret void
+;
+; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@promote_i32_ptr
+; IS__CGSCC_NPM-SAME: (i32 [[TMP0:%.*]]) {
+; IS__CGSCC_NPM-NEXT:    [[XP_PRIV:%.*]] = alloca i32, align 4
+; IS__CGSCC_NPM-NEXT:    store i32 [[TMP0]], i32* [[XP_PRIV]], align 4
+; IS__CGSCC_NPM-NEXT:    [[X:%.*]] = load i32, i32* [[XP_PRIV]], align 4
+; IS__CGSCC_NPM-NEXT:    call void @use_i32(i32 [[X]])
+; IS__CGSCC_NPM-NEXT:    ret void
 ;
   %x = load i32, i32* %xp
   call void @use_i32(i32 %x)

diff  --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/sret.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/sret.ll
index ec5f96ed64d5b..2b422b5138025 100644
--- a/llvm/test/Transforms/Attributor/ArgumentPromotion/sret.ll
+++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/sret.ll
@@ -12,7 +12,6 @@ define internal void @add({i32, i32}* %this, i32* sret(i32) %r) {
 ; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
 ; IS__TUNIT____-LABEL: define {{[^@]+}}@add
 ; IS__TUNIT____-SAME: ({ i32, i32 }* noalias nocapture nofree nonnull readnone align 8 dereferenceable(8) [[THIS:%.*]], i32* noalias nocapture nofree noundef nonnull writeonly sret(i32) align 4 dereferenceable(4) [[R:%.*]]) #[[ATTR0:[0-9]+]] {
-; IS__TUNIT____-NEXT:    store i32 undef, i32* [[R]], align 4
 ; IS__TUNIT____-NEXT:    ret void
 ;
 ; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
@@ -20,7 +19,7 @@ define internal void @add({i32, i32}* %this, i32* sret(i32) %r) {
 ; IS__CGSCC_OPM-SAME: ({ i32, i32 }* nocapture nofree noundef nonnull readonly align 8 dereferenceable(8) [[THIS:%.*]], i32* nocapture nofree noundef nonnull writeonly sret(i32) align 4 dereferenceable(4) [[R:%.*]]) #[[ATTR0:[0-9]+]] {
 ; IS__CGSCC_OPM-NEXT:    [[AP:%.*]] = getelementptr { i32, i32 }, { i32, i32 }* [[THIS]], i32 0, i32 0
 ; IS__CGSCC_OPM-NEXT:    [[BP:%.*]] = getelementptr { i32, i32 }, { i32, i32 }* [[THIS]], i32 0, i32 1
-; IS__CGSCC_OPM-NEXT:    [[A:%.*]] = load i32, i32* [[AP]], align 4
+; IS__CGSCC_OPM-NEXT:    [[A:%.*]] = load i32, i32* [[AP]], align 8
 ; IS__CGSCC_OPM-NEXT:    [[B:%.*]] = load i32, i32* [[BP]], align 4
 ; IS__CGSCC_OPM-NEXT:    [[AB:%.*]] = add i32 [[A]], [[B]]
 ; IS__CGSCC_OPM-NEXT:    store i32 [[AB]], i32* [[R]], align 4
@@ -31,7 +30,7 @@ define internal void @add({i32, i32}* %this, i32* sret(i32) %r) {
 ; IS__CGSCC_NPM-SAME: ({ i32, i32 }* noalias nocapture nofree noundef nonnull readonly align 8 dereferenceable(8) [[THIS:%.*]], i32* noalias nocapture nofree noundef nonnull writeonly sret(i32) align 4 dereferenceable(4) [[R:%.*]]) #[[ATTR0:[0-9]+]] {
 ; IS__CGSCC_NPM-NEXT:    [[AP:%.*]] = getelementptr { i32, i32 }, { i32, i32 }* [[THIS]], i32 0, i32 0
 ; IS__CGSCC_NPM-NEXT:    [[BP:%.*]] = getelementptr { i32, i32 }, { i32, i32 }* [[THIS]], i32 0, i32 1
-; IS__CGSCC_NPM-NEXT:    [[A:%.*]] = load i32, i32* [[AP]], align 4
+; IS__CGSCC_NPM-NEXT:    [[A:%.*]] = load i32, i32* [[AP]], align 8
 ; IS__CGSCC_NPM-NEXT:    [[B:%.*]] = load i32, i32* [[BP]], align 4
 ; IS__CGSCC_NPM-NEXT:    [[AB:%.*]] = add i32 [[A]], [[B]]
 ; IS__CGSCC_NPM-NEXT:    store i32 [[AB]], i32* [[R]], align 4

diff  --git a/llvm/test/Transforms/Attributor/IPConstantProp/2009-09-24-byval-ptr.ll b/llvm/test/Transforms/Attributor/IPConstantProp/2009-09-24-byval-ptr.ll
index 4d8fc2acb1e68..c8b82ab60afed 100644
--- a/llvm/test/Transforms/Attributor/IPConstantProp/2009-09-24-byval-ptr.ll
+++ b/llvm/test/Transforms/Attributor/IPConstantProp/2009-09-24-byval-ptr.ll
@@ -21,8 +21,8 @@ define internal void @vfu1(%struct.MYstr* byval(%struct.MYstr) align 4 %u) nounw
 ; IS________OPM-NEXT:    [[TMP0:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U]], i32 0, i32 1
 ; IS________OPM-NEXT:    store i32 99, i32* [[TMP0]], align 4
 ; IS________OPM-NEXT:    [[TMP1:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U]], i32 0, i32 0
-; IS________OPM-NEXT:    store i8 97, i8* [[TMP1]], align 4
-; IS________OPM-NEXT:    [[L:%.*]] = load i8, i8* [[TMP1]], align 4
+; IS________OPM-NEXT:    store i8 97, i8* [[TMP1]], align 8
+; IS________OPM-NEXT:    [[L:%.*]] = load i8, i8* [[TMP1]], align 8
 ; IS________OPM-NEXT:    call void @use(i8 [[L]])
 ; IS________OPM-NEXT:    br label [[RETURN:%.*]]
 ; IS________OPM:       return:
@@ -40,8 +40,8 @@ define internal void @vfu1(%struct.MYstr* byval(%struct.MYstr) align 4 %u) nounw
 ; IS________NPM-NEXT:    [[TMP2:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i32 0, i32 1
 ; IS________NPM-NEXT:    store i32 99, i32* [[TMP2]], align 4
 ; IS________NPM-NEXT:    [[TMP3:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i32 0, i32 0
-; IS________NPM-NEXT:    store i8 97, i8* [[TMP3]], align 4
-; IS________NPM-NEXT:    [[L:%.*]] = load i8, i8* [[TMP3]], align 4
+; IS________NPM-NEXT:    store i8 97, i8* [[TMP3]], align 8
+; IS________NPM-NEXT:    [[L:%.*]] = load i8, i8* [[TMP3]], align 8
 ; IS________NPM-NEXT:    call void @use(i8 [[L]])
 ; IS________NPM-NEXT:    br label [[RETURN:%.*]]
 ; IS________NPM:       return:
@@ -68,7 +68,7 @@ define internal i32 @vfu2(%struct.MYstr* byval(%struct.MYstr) align 4 %u) nounwi
 ; IS________OPM-NEXT:    [[TMP0:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U]], i32 0, i32 1
 ; IS________OPM-NEXT:    [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4
 ; IS________OPM-NEXT:    [[TMP2:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U]], i32 0, i32 0
-; IS________OPM-NEXT:    [[TMP3:%.*]] = load i8, i8* [[TMP2]], align 4
+; IS________OPM-NEXT:    [[TMP3:%.*]] = load i8, i8* [[TMP2]], align 8
 ; IS________OPM-NEXT:    [[TMP4:%.*]] = zext i8 [[TMP3]] to i32
 ; IS________OPM-NEXT:    [[TMP5:%.*]] = add i32 [[TMP4]], [[TMP1]]
 ; IS________OPM-NEXT:    ret i32 [[TMP5]]
@@ -85,7 +85,7 @@ define internal i32 @vfu2(%struct.MYstr* byval(%struct.MYstr) align 4 %u) nounwi
 ; IS________NPM-NEXT:    [[TMP2:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i32 0, i32 1
 ; IS________NPM-NEXT:    [[TMP3:%.*]] = load i32, i32* [[TMP2]], align 4
 ; IS________NPM-NEXT:    [[TMP4:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i32 0, i32 0
-; IS________NPM-NEXT:    [[TMP5:%.*]] = load i8, i8* [[TMP4]], align 4
+; IS________NPM-NEXT:    [[TMP5:%.*]] = load i8, i8* [[TMP4]], align 8
 ; IS________NPM-NEXT:    [[TMP6:%.*]] = zext i8 [[TMP5]] to i32
 ; IS________NPM-NEXT:    [[TMP7:%.*]] = add i32 [[TMP6]], [[TMP3]]
 ; IS________NPM-NEXT:    ret i32 [[TMP7]]
@@ -163,7 +163,7 @@ define internal i32 @vfu2_v2(%struct.MYstr* byval(%struct.MYstr) align 4 %u) nou
 ; IS________OPM-NEXT:    [[TMP0:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U]], i32 0, i32 1
 ; IS________OPM-NEXT:    [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4
 ; IS________OPM-NEXT:    [[TMP2:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U]], i32 0, i32 0
-; IS________OPM-NEXT:    [[TMP3:%.*]] = load i8, i8* [[TMP2]], align 4
+; IS________OPM-NEXT:    [[TMP3:%.*]] = load i8, i8* [[TMP2]], align 8
 ; IS________OPM-NEXT:    [[TMP4:%.*]] = zext i8 [[TMP3]] to i32
 ; IS________OPM-NEXT:    [[TMP5:%.*]] = add i32 [[TMP4]], [[TMP1]]
 ; IS________OPM-NEXT:    ret i32 [[TMP5]]
@@ -182,7 +182,7 @@ define internal i32 @vfu2_v2(%struct.MYstr* byval(%struct.MYstr) align 4 %u) nou
 ; IS________NPM-NEXT:    [[TMP2:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i32 0, i32 1
 ; IS________NPM-NEXT:    [[TMP3:%.*]] = load i32, i32* [[TMP2]], align 4
 ; IS________NPM-NEXT:    [[TMP4:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* [[U_PRIV]], i32 0, i32 0
-; IS________NPM-NEXT:    [[TMP5:%.*]] = load i8, i8* [[TMP4]], align 4
+; IS________NPM-NEXT:    [[TMP5:%.*]] = load i8, i8* [[TMP4]], align 8
 ; IS________NPM-NEXT:    [[TMP6:%.*]] = zext i8 [[TMP5]] to i32
 ; IS________NPM-NEXT:    [[TMP7:%.*]] = add i32 [[TMP6]], [[TMP3]]
 ; IS________NPM-NEXT:    ret i32 [[TMP7]]
@@ -212,15 +212,15 @@ define i32 @unions_v2() nounwind {
 ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@unions_v2
 ; IS__TUNIT_NPM-SAME: () #[[ATTR0]] {
 ; IS__TUNIT_NPM-NEXT:  entry:
-; IS__TUNIT_NPM-NEXT:    [[MYSTR_CAST1:%.*]] = bitcast %struct.MYstr* @mystr to i8*
-; IS__TUNIT_NPM-NEXT:    [[TMP0:%.*]] = load i8, i8* [[MYSTR_CAST1]], align 8
-; IS__TUNIT_NPM-NEXT:    [[MYSTR_0_12:%.*]] = getelementptr [[STRUCT_MYSTR:%.*]], %struct.MYstr* @mystr, i64 0, i32 1
-; IS__TUNIT_NPM-NEXT:    [[TMP1:%.*]] = load i32, i32* [[MYSTR_0_12]], align 8
-; IS__TUNIT_NPM-NEXT:    call void @vfu1(i8 [[TMP0]], i32 [[TMP1]]) #[[ATTR0]]
 ; IS__TUNIT_NPM-NEXT:    [[MYSTR_CAST:%.*]] = bitcast %struct.MYstr* @mystr to i8*
-; IS__TUNIT_NPM-NEXT:    [[TMP2:%.*]] = load i8, i8* [[MYSTR_CAST]], align 8
-; IS__TUNIT_NPM-NEXT:    [[MYSTR_0_1:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* @mystr, i64 0, i32 1
-; IS__TUNIT_NPM-NEXT:    [[TMP3:%.*]] = load i32, i32* [[MYSTR_0_1]], align 8
+; IS__TUNIT_NPM-NEXT:    [[TMP0:%.*]] = load i8, i8* [[MYSTR_CAST]], align 8
+; IS__TUNIT_NPM-NEXT:    [[MYSTR_0_1:%.*]] = getelementptr [[STRUCT_MYSTR:%.*]], %struct.MYstr* @mystr, i64 0, i32 1
+; IS__TUNIT_NPM-NEXT:    [[TMP1:%.*]] = load i32, i32* [[MYSTR_0_1]], align 8
+; IS__TUNIT_NPM-NEXT:    call void @vfu1(i8 [[TMP0]], i32 [[TMP1]]) #[[ATTR0]]
+; IS__TUNIT_NPM-NEXT:    [[MYSTR_CAST1:%.*]] = bitcast %struct.MYstr* @mystr to i8*
+; IS__TUNIT_NPM-NEXT:    [[TMP2:%.*]] = load i8, i8* [[MYSTR_CAST1]], align 8
+; IS__TUNIT_NPM-NEXT:    [[MYSTR_0_12:%.*]] = getelementptr [[STRUCT_MYSTR]], %struct.MYstr* @mystr, i64 0, i32 1
+; IS__TUNIT_NPM-NEXT:    [[TMP3:%.*]] = load i32, i32* [[MYSTR_0_12]], align 8
 ; IS__TUNIT_NPM-NEXT:    [[RESULT:%.*]] = call i32 @vfu2_v2(i8 [[TMP2]], i32 [[TMP3]]) #[[ATTR2]]
 ; IS__TUNIT_NPM-NEXT:    ret i32 [[RESULT]]
 ;

diff  --git a/llvm/test/Transforms/Attributor/IPConstantProp/PR16052.ll b/llvm/test/Transforms/Attributor/IPConstantProp/PR16052.ll
index f2fc81ebfc1f1..f35a37a3c1a60 100644
--- a/llvm/test/Transforms/Attributor/IPConstantProp/PR16052.ll
+++ b/llvm/test/Transforms/Attributor/IPConstantProp/PR16052.ll
@@ -19,8 +19,7 @@ define i64 @fn2() {
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@fn2
 ; IS__CGSCC____-SAME: () #[[ATTR0:[0-9]+]] {
 ; IS__CGSCC____-NEXT:  entry:
-; IS__CGSCC____-NEXT:    [[CALL2:%.*]] = call i64 @fn1(i64 poison) #[[ATTR2:[0-9]+]]
-; IS__CGSCC____-NEXT:    ret i64 [[CALL2]]
+; IS__CGSCC____-NEXT:    ret i64 poison
 ;
 entry:
   %conv = sext i32 undef to i64
@@ -45,8 +44,7 @@ define i64 @fn2b(i32 %arg) {
 ; IS__CGSCC____-NEXT:  entry:
 ; IS__CGSCC____-NEXT:    [[CONV:%.*]] = sext i32 [[ARG]] to i64
 ; IS__CGSCC____-NEXT:    [[DIV:%.*]] = sdiv i64 8, [[CONV]]
-; IS__CGSCC____-NEXT:    [[CALL2:%.*]] = call i64 @fn1(i64 [[DIV]]) #[[ATTR2]]
-; IS__CGSCC____-NEXT:    ret i64 [[CALL2]]
+; IS__CGSCC____-NEXT:    ret i64 [[DIV]]
 ;
 entry:
   %conv = sext i32 %arg to i64
@@ -66,8 +64,7 @@ define i64 @fn2c() {
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@fn2c
 ; IS__CGSCC____-SAME: () #[[ATTR0]] {
 ; IS__CGSCC____-NEXT:  entry:
-; IS__CGSCC____-NEXT:    [[CALL2:%.*]] = call i64 @fn1(i64 noundef 42) #[[ATTR2]]
-; IS__CGSCC____-NEXT:    ret i64 [[CALL2]]
+; IS__CGSCC____-NEXT:    ret i64 42
 ;
 entry:
   %conv = sext i32 undef to i64
@@ -81,7 +78,9 @@ define internal i64 @fn1(i64 %p1) {
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@fn1
 ; IS__CGSCC____-SAME: (i64 returned [[P1:%.*]]) #[[ATTR1:[0-9]+]] {
 ; IS__CGSCC____-NEXT:  entry:
-; IS__CGSCC____-NEXT:    ret i64 [[P1]]
+; IS__CGSCC____-NEXT:    [[TOBOOL:%.*]] = icmp ne i64 [[P1]], 0
+; IS__CGSCC____-NEXT:    [[COND:%.*]] = select i1 [[TOBOOL]], i64 [[P1]], i64 [[P1]]
+; IS__CGSCC____-NEXT:    ret i64 [[COND]]
 ;
 entry:
   %tobool = icmp ne i64 %p1, 0
@@ -93,5 +92,4 @@ entry:
 ;.
 ; IS__CGSCC____: attributes #[[ATTR0]] = { nofree nosync nounwind readnone willreturn }
 ; IS__CGSCC____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR2]] = { readnone willreturn }
 ;.

diff  --git a/llvm/test/Transforms/Attributor/IPConstantProp/PR26044.ll b/llvm/test/Transforms/Attributor/IPConstantProp/PR26044.ll
index 9bdbe2b69d5c9..aa8fabb94a5e7 100644
--- a/llvm/test/Transforms/Attributor/IPConstantProp/PR26044.ll
+++ b/llvm/test/Transforms/Attributor/IPConstantProp/PR26044.ll
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=11 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=11 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
+; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=8 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=8 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
 ; RUN: opt -attributor-cgscc -enable-new-pm=0 -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_NPM,IS__CGSCC____,IS________OPM,IS__CGSCC_OPM
 ; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
@@ -33,8 +33,7 @@ define void @fn2(i32* %P, i1 %C) {
 ; IS__CGSCC____:       if.end:
 ; IS__CGSCC____-NEXT:    [[E_2:%.*]] = phi i32* [ [[P]], [[ENTRY:%.*]] ], [ null, [[FOR_COND1:%.*]] ]
 ; IS__CGSCC____-NEXT:    [[TMP0:%.*]] = load i32, i32* [[E_2]], align 4
-; IS__CGSCC____-NEXT:    [[CALL:%.*]] = call i32 @fn1(i32 [[TMP0]])
-; IS__CGSCC____-NEXT:    store i32 [[CALL]], i32* [[P]], align 4
+; IS__CGSCC____-NEXT:    store i32 [[TMP0]], i32* [[P]], align 4
 ; IS__CGSCC____-NEXT:    br label [[FOR_COND1]]
 ; IS__CGSCC____:       exit:
 ; IS__CGSCC____-NEXT:    ret void
@@ -60,7 +59,9 @@ define internal i32 @fn1(i32 %p1) {
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@fn1
 ; IS__CGSCC____-SAME: (i32 returned [[P1:%.*]]) #[[ATTR1:[0-9]+]] {
 ; IS__CGSCC____-NEXT:  entry:
-; IS__CGSCC____-NEXT:    ret i32 [[P1]]
+; IS__CGSCC____-NEXT:    [[TOBOOL:%.*]] = icmp ne i32 [[P1]], 0
+; IS__CGSCC____-NEXT:    [[COND:%.*]] = select i1 [[TOBOOL]], i32 [[P1]], i32 [[P1]]
+; IS__CGSCC____-NEXT:    ret i32 [[COND]]
 ;
 entry:
   %tobool = icmp ne i32 %p1, 0
@@ -95,8 +96,7 @@ define void @fn_no_null_opt(i32* %P, i1 %C) null_pointer_is_valid {
 ; IS__CGSCC____:       if.end:
 ; IS__CGSCC____-NEXT:    [[E_2:%.*]] = phi i32* [ undef, [[ENTRY:%.*]] ], [ null, [[FOR_COND1:%.*]] ]
 ; IS__CGSCC____-NEXT:    [[TMP0:%.*]] = load i32, i32* null, align 4294967296
-; IS__CGSCC____-NEXT:    [[CALL:%.*]] = call i32 @fn0(i32 [[TMP0]])
-; IS__CGSCC____-NEXT:    store i32 [[CALL]], i32* [[P]], align 4
+; IS__CGSCC____-NEXT:    store i32 [[TMP0]], i32* [[P]], align 4
 ; IS__CGSCC____-NEXT:    br label [[FOR_COND1]]
 ; IS__CGSCC____:       exit:
 ; IS__CGSCC____-NEXT:    ret void
@@ -122,7 +122,9 @@ define internal i32 @fn0(i32 %p1) {
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@fn0
 ; IS__CGSCC____-SAME: (i32 returned [[P1:%.*]]) #[[ATTR1]] {
 ; IS__CGSCC____-NEXT:  entry:
-; IS__CGSCC____-NEXT:    ret i32 [[P1]]
+; IS__CGSCC____-NEXT:    [[TOBOOL:%.*]] = icmp ne i32 [[P1]], 0
+; IS__CGSCC____-NEXT:    [[COND:%.*]] = select i1 [[TOBOOL]], i32 [[P1]], i32 [[P1]]
+; IS__CGSCC____-NEXT:    ret i32 [[COND]]
 ;
 entry:
   %tobool = icmp ne i32 %p1, 0

diff  --git a/llvm/test/Transforms/Attributor/IPConstantProp/multiple_callbacks.ll b/llvm/test/Transforms/Attributor/IPConstantProp/multiple_callbacks.ll
index 8ab6c8638169b..4b33e60594afc 100644
--- a/llvm/test/Transforms/Attributor/IPConstantProp/multiple_callbacks.ll
+++ b/llvm/test/Transforms/Attributor/IPConstantProp/multiple_callbacks.ll
@@ -53,7 +53,7 @@ entry:
 define internal i32 @cb1(i32 %unknown) {
 ; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
 ; CHECK-LABEL: define {{[^@]+}}@cb1
-; CHECK-SAME: (i32 noundef [[UNKNOWN:%.*]]) #[[ATTR0]] {
+; CHECK-SAME: (i32 noundef returned [[UNKNOWN:%.*]]) #[[ATTR0]] {
 ; CHECK-NEXT:  entry:
 ; CHECK-NEXT:    ret i32 [[UNKNOWN]]
 ;
@@ -64,13 +64,13 @@ entry:
 define internal i32 @cb2(i32 %unknown) {
 ; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
 ; IS__TUNIT____-LABEL: define {{[^@]+}}@cb2
-; IS__TUNIT____-SAME: (i32 noundef [[UNKNOWN:%.*]]) #[[ATTR0]] {
+; IS__TUNIT____-SAME: (i32 noundef returned [[UNKNOWN:%.*]]) #[[ATTR0]] {
 ; IS__TUNIT____-NEXT:  entry:
 ; IS__TUNIT____-NEXT:    ret i32 [[UNKNOWN]]
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@cb2
-; IS__CGSCC____-SAME: (i32 noundef [[UNKNOWN:%.*]]) #[[ATTR1:[0-9]+]] {
+; IS__CGSCC____-SAME: (i32 noundef returned [[UNKNOWN:%.*]]) #[[ATTR1:[0-9]+]] {
 ; IS__CGSCC____-NEXT:  entry:
 ; IS__CGSCC____-NEXT:    ret i32 [[UNKNOWN]]
 ;
@@ -82,7 +82,7 @@ entry:
 define internal i32 @cb3(i32 %unknown) {
 ; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
 ; CHECK-LABEL: define {{[^@]+}}@cb3
-; CHECK-SAME: (i32 noundef [[UNKNOWN:%.*]]) #[[ATTR0]] {
+; CHECK-SAME: (i32 noundef returned [[UNKNOWN:%.*]]) #[[ATTR0]] {
 ; CHECK-NEXT:  entry:
 ; CHECK-NEXT:    ret i32 [[UNKNOWN]]
 ;
@@ -93,7 +93,7 @@ entry:
 define internal i32 @cb4(i32 %unknown) {
 ; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
 ; CHECK-LABEL: define {{[^@]+}}@cb4
-; CHECK-SAME: (i32 noundef [[UNKNOWN:%.*]]) #[[ATTR0]] {
+; CHECK-SAME: (i32 noundef returned [[UNKNOWN:%.*]]) #[[ATTR0]] {
 ; CHECK-NEXT:  entry:
 ; CHECK-NEXT:    ret i32 [[UNKNOWN]]
 ;

diff  --git a/llvm/test/Transforms/Attributor/IPConstantProp/musttail-call.ll b/llvm/test/Transforms/Attributor/IPConstantProp/musttail-call.ll
index 248ca4fbc54c7..4f899a3860150 100644
--- a/llvm/test/Transforms/Attributor/IPConstantProp/musttail-call.ll
+++ b/llvm/test/Transforms/Attributor/IPConstantProp/musttail-call.ll
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=3 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=3 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
+; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=6 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=6 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
 ; RUN: opt -attributor-cgscc -enable-new-pm=0 -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_NPM,IS__CGSCC____,IS________OPM,IS__CGSCC_OPM
 ; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM
 ; PR36485
@@ -10,38 +10,71 @@ declare i32 @external()
 
 define i8* @start(i8 %v) {
 ;
-; IS__TUNIT____-LABEL: define {{[^@]+}}@start
-; IS__TUNIT____-SAME: (i8 [[V:%.*]]) {
-; IS__TUNIT____-NEXT:    [[C1:%.*]] = icmp eq i8 [[V]], 0
-; IS__TUNIT____-NEXT:    br i1 [[C1]], label [[TRUE:%.*]], label [[FALSE:%.*]]
-; IS__TUNIT____:       true:
-; IS__TUNIT____-NEXT:    [[CA:%.*]] = musttail call noalias noundef align 4294967296 i8* @side_effects(i8 [[V]])
-; IS__TUNIT____-NEXT:    ret i8* [[CA]]
-; IS__TUNIT____:       false:
-; IS__TUNIT____-NEXT:    [[C2:%.*]] = icmp eq i8 [[V]], 1
-; IS__TUNIT____-NEXT:    br i1 [[C2]], label [[C2_TRUE:%.*]], label [[C2_FALSE:%.*]]
-; IS__TUNIT____:       c2_true:
-; IS__TUNIT____-NEXT:    ret i8* null
-; IS__TUNIT____:       c2_false:
-; IS__TUNIT____-NEXT:    [[CA2:%.*]] = musttail call noalias noundef align 4294967296 i8* @dont_zap_me(i8 undef)
-; IS__TUNIT____-NEXT:    ret i8* [[CA2]]
+; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@start
+; IS__TUNIT_OPM-SAME: (i8 [[V:%.*]]) {
+; IS__TUNIT_OPM-NEXT:    [[C1:%.*]] = icmp eq i8 [[V]], 0
+; IS__TUNIT_OPM-NEXT:    br i1 [[C1]], label [[TRUE:%.*]], label [[FALSE:%.*]]
+; IS__TUNIT_OPM:       true:
+; IS__TUNIT_OPM-NEXT:    [[CA:%.*]] = musttail call i8* @side_effects(i8 [[V]])
+; IS__TUNIT_OPM-NEXT:    ret i8* [[CA]]
+; IS__TUNIT_OPM:       false:
+; IS__TUNIT_OPM-NEXT:    [[C2:%.*]] = icmp eq i8 [[V]], 1
+; IS__TUNIT_OPM-NEXT:    br i1 [[C2]], label [[C2_TRUE:%.*]], label [[C2_FALSE:%.*]]
+; IS__TUNIT_OPM:       c2_true:
+; IS__TUNIT_OPM-NEXT:    ret i8* null
+; IS__TUNIT_OPM:       c2_false:
+; IS__TUNIT_OPM-NEXT:    [[CA2:%.*]] = musttail call i8* @dont_zap_me(i8 undef)
+; IS__TUNIT_OPM-NEXT:    ret i8* [[CA2]]
 ;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@start
-; IS__CGSCC____-SAME: (i8 [[V:%.*]]) {
-; IS__CGSCC____-NEXT:    [[C1:%.*]] = icmp eq i8 [[V]], 0
-; IS__CGSCC____-NEXT:    br i1 [[C1]], label [[TRUE:%.*]], label [[FALSE:%.*]]
-; IS__CGSCC____:       true:
-; IS__CGSCC____-NEXT:    [[CA:%.*]] = musttail call noalias noundef align 4294967296 i8* @side_effects(i8 [[V]])
-; IS__CGSCC____-NEXT:    ret i8* [[CA]]
-; IS__CGSCC____:       false:
-; IS__CGSCC____-NEXT:    [[C2:%.*]] = icmp eq i8 [[V]], 1
-; IS__CGSCC____-NEXT:    br i1 [[C2]], label [[C2_TRUE:%.*]], label [[C2_FALSE:%.*]]
-; IS__CGSCC____:       c2_true:
-; IS__CGSCC____-NEXT:    [[CA1:%.*]] = musttail call noalias noundef align 4294967296 i8* @no_side_effects(i8 [[V]])
-; IS__CGSCC____-NEXT:    ret i8* [[CA1]]
-; IS__CGSCC____:       c2_false:
-; IS__CGSCC____-NEXT:    [[CA2:%.*]] = musttail call noalias noundef align 4294967296 i8* @dont_zap_me(i8 [[V]])
-; IS__CGSCC____-NEXT:    ret i8* [[CA2]]
+; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@start
+; IS__TUNIT_NPM-SAME: (i8 [[V:%.*]]) {
+; IS__TUNIT_NPM-NEXT:    [[C1:%.*]] = icmp eq i8 [[V]], 0
+; IS__TUNIT_NPM-NEXT:    br i1 [[C1]], label [[TRUE:%.*]], label [[FALSE:%.*]]
+; IS__TUNIT_NPM:       true:
+; IS__TUNIT_NPM-NEXT:    [[CA:%.*]] = musttail call i8* @side_effects(i8 undef)
+; IS__TUNIT_NPM-NEXT:    ret i8* [[CA]]
+; IS__TUNIT_NPM:       false:
+; IS__TUNIT_NPM-NEXT:    [[C2:%.*]] = icmp eq i8 [[V]], 1
+; IS__TUNIT_NPM-NEXT:    br i1 [[C2]], label [[C2_TRUE:%.*]], label [[C2_FALSE:%.*]]
+; IS__TUNIT_NPM:       c2_true:
+; IS__TUNIT_NPM-NEXT:    ret i8* null
+; IS__TUNIT_NPM:       c2_false:
+; IS__TUNIT_NPM-NEXT:    [[CA2:%.*]] = musttail call i8* @dont_zap_me(i8 undef)
+; IS__TUNIT_NPM-NEXT:    ret i8* [[CA2]]
+;
+; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@start
+; IS__CGSCC_OPM-SAME: (i8 [[V:%.*]]) {
+; IS__CGSCC_OPM-NEXT:    [[C1:%.*]] = icmp eq i8 [[V]], 0
+; IS__CGSCC_OPM-NEXT:    br i1 [[C1]], label [[TRUE:%.*]], label [[FALSE:%.*]]
+; IS__CGSCC_OPM:       true:
+; IS__CGSCC_OPM-NEXT:    [[CA:%.*]] = musttail call noalias noundef align 4294967296 i8* @side_effects(i8 [[V]])
+; IS__CGSCC_OPM-NEXT:    ret i8* [[CA]]
+; IS__CGSCC_OPM:       false:
+; IS__CGSCC_OPM-NEXT:    [[C2:%.*]] = icmp eq i8 [[V]], 1
+; IS__CGSCC_OPM-NEXT:    br i1 [[C2]], label [[C2_TRUE:%.*]], label [[C2_FALSE:%.*]]
+; IS__CGSCC_OPM:       c2_true:
+; IS__CGSCC_OPM-NEXT:    [[CA1:%.*]] = musttail call noalias noundef align 4294967296 i8* @no_side_effects(i8 [[V]])
+; IS__CGSCC_OPM-NEXT:    ret i8* [[CA1]]
+; IS__CGSCC_OPM:       c2_false:
+; IS__CGSCC_OPM-NEXT:    [[CA2:%.*]] = musttail call noalias noundef align 4294967296 i8* @dont_zap_me(i8 [[V]])
+; IS__CGSCC_OPM-NEXT:    ret i8* [[CA2]]
+;
+; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@start
+; IS__CGSCC_NPM-SAME: (i8 [[V:%.*]]) {
+; IS__CGSCC_NPM-NEXT:    [[C1:%.*]] = icmp eq i8 [[V]], 0
+; IS__CGSCC_NPM-NEXT:    br i1 [[C1]], label [[TRUE:%.*]], label [[FALSE:%.*]]
+; IS__CGSCC_NPM:       true:
+; IS__CGSCC_NPM-NEXT:    [[CA:%.*]] = musttail call noalias noundef align 4294967296 i8* @side_effects(i8 undef)
+; IS__CGSCC_NPM-NEXT:    ret i8* [[CA]]
+; IS__CGSCC_NPM:       false:
+; IS__CGSCC_NPM-NEXT:    [[C2:%.*]] = icmp eq i8 [[V]], 1
+; IS__CGSCC_NPM-NEXT:    br i1 [[C2]], label [[C2_TRUE:%.*]], label [[C2_FALSE:%.*]]
+; IS__CGSCC_NPM:       c2_true:
+; IS__CGSCC_NPM-NEXT:    [[CA1:%.*]] = musttail call noalias noundef align 4294967296 i8* @no_side_effects(i8 [[V]])
+; IS__CGSCC_NPM-NEXT:    ret i8* [[CA1]]
+; IS__CGSCC_NPM:       c2_false:
+; IS__CGSCC_NPM-NEXT:    [[CA2:%.*]] = musttail call noalias noundef align 4294967296 i8* @dont_zap_me(i8 [[V]])
+; IS__CGSCC_NPM-NEXT:    ret i8* [[CA2]]
 ;
   %c1 = icmp eq i8 %v, 0
   br i1 %c1, label %true, label %false
@@ -61,17 +94,29 @@ c2_false:
 }
 
 define internal i8* @side_effects(i8 %v) {
-; IS________OPM-LABEL: define {{[^@]+}}@side_effects
-; IS________OPM-SAME: (i8 [[V:%.*]]) {
-; IS________OPM-NEXT:    [[I1:%.*]] = call i32 @external()
-; IS________OPM-NEXT:    [[CA:%.*]] = musttail call noalias noundef align 4294967296 i8* @start(i8 [[V]])
-; IS________OPM-NEXT:    ret i8* [[CA]]
+; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@side_effects
+; IS__TUNIT_OPM-SAME: (i8 [[V:%.*]]) {
+; IS__TUNIT_OPM-NEXT:    [[I1:%.*]] = call i32 @external()
+; IS__TUNIT_OPM-NEXT:    [[CA:%.*]] = musttail call i8* @start(i8 [[V]])
+; IS__TUNIT_OPM-NEXT:    ret i8* [[CA]]
+;
+; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@side_effects
+; IS__TUNIT_NPM-SAME: (i8 [[V:%.*]]) {
+; IS__TUNIT_NPM-NEXT:    [[I1:%.*]] = call i32 @external()
+; IS__TUNIT_NPM-NEXT:    [[CA:%.*]] = musttail call i8* @start(i8 0)
+; IS__TUNIT_NPM-NEXT:    ret i8* [[CA]]
 ;
-; IS________NPM-LABEL: define {{[^@]+}}@side_effects
-; IS________NPM-SAME: (i8 [[V:%.*]]) {
-; IS________NPM-NEXT:    [[I1:%.*]] = call i32 @external()
-; IS________NPM-NEXT:    [[CA:%.*]] = musttail call noalias noundef align 4294967296 i8* @start(i8 0)
-; IS________NPM-NEXT:    ret i8* [[CA]]
+; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@side_effects
+; IS__CGSCC_OPM-SAME: (i8 [[V:%.*]]) {
+; IS__CGSCC_OPM-NEXT:    [[I1:%.*]] = call i32 @external()
+; IS__CGSCC_OPM-NEXT:    [[CA:%.*]] = musttail call noalias noundef align 4294967296 i8* @start(i8 [[V]])
+; IS__CGSCC_OPM-NEXT:    ret i8* [[CA]]
+;
+; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@side_effects
+; IS__CGSCC_NPM-SAME: (i8 [[V:%.*]]) {
+; IS__CGSCC_NPM-NEXT:    [[I1:%.*]] = call i32 @external()
+; IS__CGSCC_NPM-NEXT:    [[CA:%.*]] = musttail call noalias noundef align 4294967296 i8* @start(i8 0)
+; IS__CGSCC_NPM-NEXT:    ret i8* [[CA]]
 ;
   %i1 = call i32 @external()
 
@@ -95,10 +140,15 @@ define internal i8* @no_side_effects(i8 %v) readonly nounwind {
 }
 
 define internal i8* @dont_zap_me(i8 %v) {
-; CHECK-LABEL: define {{[^@]+}}@dont_zap_me
-; CHECK-SAME: (i8 [[V:%.*]]) {
-; CHECK-NEXT:    [[I1:%.*]] = call i32 @external()
-; CHECK-NEXT:    ret i8* null
+; IS__TUNIT____-LABEL: define {{[^@]+}}@dont_zap_me
+; IS__TUNIT____-SAME: (i8 [[V:%.*]]) {
+; IS__TUNIT____-NEXT:    [[I1:%.*]] = call i32 @external()
+; IS__TUNIT____-NEXT:    ret i8* undef
+;
+; IS__CGSCC____-LABEL: define {{[^@]+}}@dont_zap_me
+; IS__CGSCC____-SAME: (i8 [[V:%.*]]) {
+; IS__CGSCC____-NEXT:    [[I1:%.*]] = call i32 @external()
+; IS__CGSCC____-NEXT:    ret i8* null
 ;
   %i1 = call i32 @external()
   ret i8* null

diff  --git a/llvm/test/Transforms/Attributor/IPConstantProp/openmp_parallel_for.ll b/llvm/test/Transforms/Attributor/IPConstantProp/openmp_parallel_for.ll
index c9d85f4d01389..56d945171cd8b 100644
--- a/llvm/test/Transforms/Attributor/IPConstantProp/openmp_parallel_for.ll
+++ b/llvm/test/Transforms/Attributor/IPConstantProp/openmp_parallel_for.ll
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=15 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=15 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
+; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=14 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=14 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
 ; RUN: opt -attributor-cgscc -enable-new-pm=0 -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_NPM,IS__CGSCC____,IS________OPM,IS__CGSCC_OPM
 ; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM
 ;

diff  --git a/llvm/test/Transforms/Attributor/IPConstantProp/return-argument.ll b/llvm/test/Transforms/Attributor/IPConstantProp/return-argument.ll
index 95e6ae84099c4..c6fcb08786d80 100644
--- a/llvm/test/Transforms/Attributor/IPConstantProp/return-argument.ll
+++ b/llvm/test/Transforms/Attributor/IPConstantProp/return-argument.ll
@@ -66,43 +66,81 @@ define internal { i32, i32 } @foo(i32 %A, i32 %B) {
 }
 
 define void @caller(i1 %C) personality i32 (...)* @__gxx_personality_v0 {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@caller
-; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR1]] personality i32 (...)* @__gxx_personality_v0 {
-; IS__TUNIT____-NEXT:    [[Q:%.*]] = alloca i32, align 4
-; IS__TUNIT____-NEXT:    [[W:%.*]] = call align 4 i32* @incdec(i1 [[C]], i32* noalias nofree noundef nonnull align 4 dereferenceable(4) "no-capture-maybe-returned" [[Q]]) #[[ATTR2:[0-9]+]]
-; IS__TUNIT____-NEXT:    [[S1:%.*]] = call { i32, i32 } @foo(i32 noundef 1, i32 noundef 2) #[[ATTR3:[0-9]+]]
-; IS__TUNIT____-NEXT:    [[X1:%.*]] = extractvalue { i32, i32 } [[S1]], 0
-; IS__TUNIT____-NEXT:    [[S2:%.*]] = call { i32, i32 } @foo(i32 noundef 3, i32 noundef 4) #[[ATTR3]]
-; IS__TUNIT____-NEXT:    br label [[OK:%.*]]
-; IS__TUNIT____:       OK:
-; IS__TUNIT____-NEXT:    [[X2:%.*]] = extractvalue { i32, i32 } [[S2]], 0
-; IS__TUNIT____-NEXT:    [[Z:%.*]] = add i32 [[X1]], [[X2]]
-; IS__TUNIT____-NEXT:    store i32 [[Z]], i32* [[Q]], align 4
-; IS__TUNIT____-NEXT:    br label [[RET:%.*]]
-; IS__TUNIT____:       LPAD:
-; IS__TUNIT____-NEXT:    unreachable
-; IS__TUNIT____:       RET:
-; IS__TUNIT____-NEXT:    ret void
+; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@caller
+; IS__TUNIT_OPM-SAME: (i1 [[C:%.*]]) #[[ATTR1]] personality i32 (...)* @__gxx_personality_v0 {
+; IS__TUNIT_OPM-NEXT:    [[Q:%.*]] = alloca i32, align 4
+; IS__TUNIT_OPM-NEXT:    [[W:%.*]] = call align 4 i32* @incdec(i1 [[C]], i32* noalias nofree noundef nonnull align 4 dereferenceable(4) "no-capture-maybe-returned" [[Q]]) #[[ATTR2:[0-9]+]]
+; IS__TUNIT_OPM-NEXT:    [[S1:%.*]] = call { i32, i32 } @foo(i32 noundef 1, i32 noundef 2) #[[ATTR3:[0-9]+]]
+; IS__TUNIT_OPM-NEXT:    [[X1:%.*]] = extractvalue { i32, i32 } [[S1]], 0
+; IS__TUNIT_OPM-NEXT:    [[S2:%.*]] = call { i32, i32 } @foo(i32 noundef 3, i32 noundef 4) #[[ATTR3]]
+; IS__TUNIT_OPM-NEXT:    br label [[OK:%.*]]
+; IS__TUNIT_OPM:       OK:
+; IS__TUNIT_OPM-NEXT:    [[X2:%.*]] = extractvalue { i32, i32 } [[S2]], 0
+; IS__TUNIT_OPM-NEXT:    [[Z:%.*]] = add i32 [[X1]], [[X2]]
+; IS__TUNIT_OPM-NEXT:    store i32 [[Z]], i32* [[W]], align 4
+; IS__TUNIT_OPM-NEXT:    br label [[RET:%.*]]
+; IS__TUNIT_OPM:       LPAD:
+; IS__TUNIT_OPM-NEXT:    unreachable
+; IS__TUNIT_OPM:       RET:
+; IS__TUNIT_OPM-NEXT:    ret void
 ;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@caller
-; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR2:[0-9]+]] personality i32 (...)* @__gxx_personality_v0 {
-; IS__CGSCC____-NEXT:    [[Q:%.*]] = alloca i32, align 4
-; IS__CGSCC____-NEXT:    [[W:%.*]] = call align 4 i32* @incdec(i1 [[C]], i32* nofree noundef nonnull align 4 dereferenceable(4) [[Q]]) #[[ATTR3:[0-9]+]]
-; IS__CGSCC____-NEXT:    [[S1:%.*]] = call { i32, i32 } @foo(i32 noundef 1, i32 noundef 2) #[[ATTR4:[0-9]+]]
-; IS__CGSCC____-NEXT:    [[X1:%.*]] = extractvalue { i32, i32 } [[S1]], 0
-; IS__CGSCC____-NEXT:    [[S2:%.*]] = call { i32, i32 } @foo(i32 noundef 3, i32 noundef 4) #[[ATTR5:[0-9]+]]
-; IS__CGSCC____-NEXT:    br label [[OK:%.*]]
-; IS__CGSCC____:       OK:
-; IS__CGSCC____-NEXT:    [[X2:%.*]] = extractvalue { i32, i32 } [[S2]], 0
-; IS__CGSCC____-NEXT:    [[Z:%.*]] = add i32 [[X1]], [[X2]]
-; IS__CGSCC____-NEXT:    store i32 [[Z]], i32* [[W]], align 4
-; IS__CGSCC____-NEXT:    br label [[RET:%.*]]
-; IS__CGSCC____:       LPAD:
-; IS__CGSCC____-NEXT:    unreachable
-; IS__CGSCC____:       RET:
-; IS__CGSCC____-NEXT:    ret void
+; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@caller
+; IS__TUNIT_NPM-SAME: (i1 [[C:%.*]]) #[[ATTR1]] personality i32 (...)* @__gxx_personality_v0 {
+; IS__TUNIT_NPM-NEXT:    [[Q:%.*]] = alloca i32, align 4
+; IS__TUNIT_NPM-NEXT:    [[W:%.*]] = call align 4 i32* @incdec(i1 [[C]], i32* noalias nofree noundef nonnull align 4 dereferenceable(4) "no-capture-maybe-returned" [[Q]]) #[[ATTR2:[0-9]+]]
+; IS__TUNIT_NPM-NEXT:    [[S1:%.*]] = call { i32, i32 } @foo(i32 noundef 1, i32 noundef 2) #[[ATTR3:[0-9]+]]
+; IS__TUNIT_NPM-NEXT:    [[X1:%.*]] = extractvalue { i32, i32 } [[S1]], 0
+; IS__TUNIT_NPM-NEXT:    [[S2:%.*]] = call { i32, i32 } @foo(i32 noundef 3, i32 noundef 4) #[[ATTR3]]
+; IS__TUNIT_NPM-NEXT:    br label [[OK:%.*]]
+; IS__TUNIT_NPM:       OK:
+; IS__TUNIT_NPM-NEXT:    [[X2:%.*]] = extractvalue { i32, i32 } [[S2]], 0
+; IS__TUNIT_NPM-NEXT:    [[Z:%.*]] = add i32 [[X1]], [[X2]]
+; IS__TUNIT_NPM-NEXT:    store i32 [[Z]], i32* [[Q]], align 4
+; IS__TUNIT_NPM-NEXT:    br label [[RET:%.*]]
+; IS__TUNIT_NPM:       LPAD:
+; IS__TUNIT_NPM-NEXT:    unreachable
+; IS__TUNIT_NPM:       RET:
+; IS__TUNIT_NPM-NEXT:    ret void
+;
+; IS__CGSCC_OPM: Function Attrs: nofree nosync nounwind readnone willreturn
+; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@caller
+; IS__CGSCC_OPM-SAME: (i1 [[C:%.*]]) #[[ATTR2:[0-9]+]] personality i32 (...)* @__gxx_personality_v0 {
+; IS__CGSCC_OPM-NEXT:    [[Q:%.*]] = alloca i32, align 4
+; IS__CGSCC_OPM-NEXT:    [[W:%.*]] = call align 4 i32* @incdec(i1 [[C]], i32* noalias nofree noundef nonnull align 4 dereferenceable(4) [[Q]]) #[[ATTR3:[0-9]+]]
+; IS__CGSCC_OPM-NEXT:    [[S1:%.*]] = call { i32, i32 } @foo(i32 noundef 1, i32 noundef 2) #[[ATTR4:[0-9]+]]
+; IS__CGSCC_OPM-NEXT:    [[X1:%.*]] = extractvalue { i32, i32 } [[S1]], 0
+; IS__CGSCC_OPM-NEXT:    [[S2:%.*]] = call { i32, i32 } @foo(i32 noundef 3, i32 noundef 4) #[[ATTR5:[0-9]+]]
+; IS__CGSCC_OPM-NEXT:    br label [[OK:%.*]]
+; IS__CGSCC_OPM:       OK:
+; IS__CGSCC_OPM-NEXT:    [[X2:%.*]] = extractvalue { i32, i32 } [[S2]], 0
+; IS__CGSCC_OPM-NEXT:    [[Z:%.*]] = add i32 [[X1]], [[X2]]
+; IS__CGSCC_OPM-NEXT:    store i32 [[Z]], i32* [[W]], align 4
+; IS__CGSCC_OPM-NEXT:    br label [[RET:%.*]]
+; IS__CGSCC_OPM:       LPAD:
+; IS__CGSCC_OPM-NEXT:    unreachable
+; IS__CGSCC_OPM:       RET:
+; IS__CGSCC_OPM-NEXT:    ret void
+;
+; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
+; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@caller
+; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]]) #[[ATTR2:[0-9]+]] personality i32 (...)* @__gxx_personality_v0 {
+; IS__CGSCC_NPM-NEXT:    [[Q:%.*]] = alloca i32, align 4
+; IS__CGSCC_NPM-NEXT:    [[W:%.*]] = call align 4 i32* @incdec(i1 [[C]], i32* noalias nofree noundef nonnull align 4 dereferenceable(4) [[Q]]) #[[ATTR3:[0-9]+]]
+; IS__CGSCC_NPM-NEXT:    [[S1:%.*]] = call { i32, i32 } @foo(i32 noundef 1, i32 noundef 2) #[[ATTR4:[0-9]+]]
+; IS__CGSCC_NPM-NEXT:    [[X1:%.*]] = extractvalue { i32, i32 } [[S1]], 0
+; IS__CGSCC_NPM-NEXT:    [[S2:%.*]] = call { i32, i32 } @foo(i32 noundef 3, i32 noundef 4) #[[ATTR5:[0-9]+]]
+; IS__CGSCC_NPM-NEXT:    br label [[OK:%.*]]
+; IS__CGSCC_NPM:       OK:
+; IS__CGSCC_NPM-NEXT:    [[X2:%.*]] = extractvalue { i32, i32 } [[S2]], 0
+; IS__CGSCC_NPM-NEXT:    [[Z:%.*]] = add i32 [[X1]], [[X2]]
+; IS__CGSCC_NPM-NEXT:    store i32 [[Z]], i32* [[Q]], align 4
+; IS__CGSCC_NPM-NEXT:    br label [[RET:%.*]]
+; IS__CGSCC_NPM:       LPAD:
+; IS__CGSCC_NPM-NEXT:    unreachable
+; IS__CGSCC_NPM:       RET:
+; IS__CGSCC_NPM-NEXT:    ret void
 ;
   %Q = alloca i32
   ;; Call incdec to see if %W is properly replaced by %Q
@@ -134,13 +172,13 @@ declare i32 @__gxx_personality_v0(...)
 ;.
 ; IS__TUNIT____: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind willreturn }
 ; IS__TUNIT____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__TUNIT____: attributes #[[ATTR2]] = { nofree nosync nounwind willreturn }
-; IS__TUNIT____: attributes #[[ATTR3]] = { nofree nosync nounwind readnone willreturn }
+; IS__TUNIT____: attributes #[[ATTR2:[0-9]+]] = { nofree nosync nounwind willreturn }
+; IS__TUNIT____: attributes #[[ATTR3:[0-9]+]] = { nofree nosync nounwind readnone willreturn }
 ;.
 ; IS__CGSCC____: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind willreturn }
 ; IS__CGSCC____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR2]] = { nofree nosync nounwind willreturn }
-; IS__CGSCC____: attributes #[[ATTR3]] = { nounwind willreturn }
-; IS__CGSCC____: attributes #[[ATTR4]] = { readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR5]] = { nounwind readnone willreturn }
+; IS__CGSCC____: attributes #[[ATTR2:[0-9]+]] = { nofree nosync nounwind readnone willreturn }
+; IS__CGSCC____: attributes #[[ATTR3:[0-9]+]] = { nounwind willreturn }
+; IS__CGSCC____: attributes #[[ATTR4:[0-9]+]] = { readnone willreturn }
+; IS__CGSCC____: attributes #[[ATTR5:[0-9]+]] = { nounwind readnone willreturn }
 ;.

diff  --git a/llvm/test/Transforms/Attributor/IPConstantProp/return-constant.ll b/llvm/test/Transforms/Attributor/IPConstantProp/return-constant.ll
index 945ce22f45975..b491b99b1c0d2 100644
--- a/llvm/test/Transforms/Attributor/IPConstantProp/return-constant.ll
+++ b/llvm/test/Transforms/Attributor/IPConstantProp/return-constant.ll
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=5 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=5 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
+; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=4 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=4 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
 ; RUN: opt -attributor-cgscc -enable-new-pm=0 -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_NPM,IS__CGSCC____,IS________OPM,IS__CGSCC_OPM
 ; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM
 

diff  --git a/llvm/test/Transforms/Attributor/IPConstantProp/return-constants.ll b/llvm/test/Transforms/Attributor/IPConstantProp/return-constants.ll
index b98560aad7156..0ad55e613a473 100644
--- a/llvm/test/Transforms/Attributor/IPConstantProp/return-constants.ll
+++ b/llvm/test/Transforms/Attributor/IPConstantProp/return-constants.ll
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=9 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=9 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
+; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=8 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=8 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
 ; RUN: opt -attributor-cgscc -enable-new-pm=0 -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_NPM,IS__CGSCC____,IS________OPM,IS__CGSCC_OPM
 ; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM
 

diff  --git a/llvm/test/Transforms/Attributor/IPConstantProp/thread_local_acs.ll b/llvm/test/Transforms/Attributor/IPConstantProp/thread_local_acs.ll
index cf9ecb099d41c..94ffa04d45bf7 100644
--- a/llvm/test/Transforms/Attributor/IPConstantProp/thread_local_acs.ll
+++ b/llvm/test/Transforms/Attributor/IPConstantProp/thread_local_acs.ll
@@ -30,9 +30,9 @@ target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
 define internal i32 @callee(i32* %thread_local_ptr, i32* %shared_ptr) {
 ; CHECK: Function Attrs: nofree norecurse nosync nounwind readonly willreturn
 ; CHECK-LABEL: define {{[^@]+}}@callee
-; CHECK-SAME: (i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[THREAD_LOCAL_PTR:%.*]], i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[SHARED_PTR:%.*]]) #[[ATTR0:[0-9]+]] {
+; CHECK-SAME: (i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[THREAD_LOCAL_PTR:%.*]], i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) [[SHARED_PTR:%.*]]) #[[ATTR0:[0-9]+]] {
 ; CHECK-NEXT:  entry:
-; CHECK-NEXT:    [[TMP:%.*]] = load i32, i32* @gtl, align 4
+; CHECK-NEXT:    [[TMP:%.*]] = load i32, i32* [[THREAD_LOCAL_PTR]], align 4
 ; CHECK-NEXT:    [[TMP1:%.*]] = load i32, i32* @gsh, align 4
 ; CHECK-NEXT:    [[ADD:%.*]] = add nsw i32 [[TMP]], [[TMP1]]
 ; CHECK-NEXT:    ret i32 [[ADD]]
@@ -47,7 +47,7 @@ entry:
 define dso_local void @caller() {
 ; IS__TUNIT____-LABEL: define {{[^@]+}}@caller() {
 ; IS__TUNIT____-NEXT:  entry:
-; IS__TUNIT____-NEXT:    call void @broker(i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) undef, i32 (i32*, i32*)* noundef nonnull @callee, i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) undef)
+; IS__TUNIT____-NEXT:    call void @broker(i32* nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) @gtl, i32 (i32*, i32*)* noundef nonnull @callee, i32* nocapture nofree nonnull readonly align 4 dereferenceable(4) undef)
 ; IS__TUNIT____-NEXT:    ret void
 ;
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@caller() {

diff  --git a/llvm/test/Transforms/Attributor/align.ll b/llvm/test/Transforms/Attributor/align.ll
index 2b1c9026d6002..08b020c5a98ac 100644
--- a/llvm/test/Transforms/Attributor/align.ll
+++ b/llvm/test/Transforms/Attributor/align.ll
@@ -1040,10 +1040,10 @@ define i32* @checkAndAdvance(i32* align(16) %p) {
 ; IS__TUNIT____-NEXT:    br i1 [[CMP]], label [[IF_THEN:%.*]], label [[RETURN:%.*]]
 ; IS__TUNIT____:       if.then:
 ; IS__TUNIT____-NEXT:    [[ADD_PTR:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 4
-; IS__TUNIT____-NEXT:    [[CALL:%.*]] = call i32* @checkAndAdvance(i32* nonnull readonly align 16 "no-capture-maybe-returned" [[ADD_PTR]]) #[[ATTR2]]
+; IS__TUNIT____-NEXT:    [[CALL:%.*]] = call nonnull align 16 i32* @checkAndAdvance(i32* nonnull readonly align 16 "no-capture-maybe-returned" [[ADD_PTR]]) #[[ATTR2]]
 ; IS__TUNIT____-NEXT:    br label [[RETURN]]
 ; IS__TUNIT____:       return:
-; IS__TUNIT____-NEXT:    [[RETVAL_0:%.*]] = phi i32* [ [[ADD_PTR]], [[IF_THEN]] ], [ [[P]], [[ENTRY:%.*]] ]
+; IS__TUNIT____-NEXT:    [[RETVAL_0:%.*]] = phi i32* [ [[CALL]], [[IF_THEN]] ], [ [[P]], [[ENTRY:%.*]] ]
 ; IS__TUNIT____-NEXT:    call void @user_i32_ptr(i32* noalias nocapture nonnull readnone align 16 [[RETVAL_0]]) #[[ATTR2]]
 ; IS__TUNIT____-NEXT:    ret i32* [[RETVAL_0]]
 ;
@@ -1056,10 +1056,10 @@ define i32* @checkAndAdvance(i32* align(16) %p) {
 ; IS__CGSCC____-NEXT:    br i1 [[CMP]], label [[IF_THEN:%.*]], label [[RETURN:%.*]]
 ; IS__CGSCC____:       if.then:
 ; IS__CGSCC____-NEXT:    [[ADD_PTR:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 4
-; IS__CGSCC____-NEXT:    [[CALL:%.*]] = call i32* @checkAndAdvance(i32* nonnull readonly align 16 "no-capture-maybe-returned" [[ADD_PTR]]) #[[ATTR3]]
+; IS__CGSCC____-NEXT:    [[CALL:%.*]] = call nonnull align 16 i32* @checkAndAdvance(i32* nonnull readonly align 16 "no-capture-maybe-returned" [[ADD_PTR]]) #[[ATTR3]]
 ; IS__CGSCC____-NEXT:    br label [[RETURN]]
 ; IS__CGSCC____:       return:
-; IS__CGSCC____-NEXT:    [[RETVAL_0:%.*]] = phi i32* [ [[ADD_PTR]], [[IF_THEN]] ], [ [[P]], [[ENTRY:%.*]] ]
+; IS__CGSCC____-NEXT:    [[RETVAL_0:%.*]] = phi i32* [ [[CALL]], [[IF_THEN]] ], [ [[P]], [[ENTRY:%.*]] ]
 ; IS__CGSCC____-NEXT:    call void @user_i32_ptr(i32* noalias nocapture nonnull readnone align 16 [[RETVAL_0]]) #[[ATTR3]]
 ; IS__CGSCC____-NEXT:    ret i32* [[RETVAL_0]]
 ;

diff  --git a/llvm/test/Transforms/Attributor/allow_list.ll b/llvm/test/Transforms/Attributor/allow_list.ll
index 65650d174e3c1..f94ea046140c7 100644
--- a/llvm/test/Transforms/Attributor/allow_list.ll
+++ b/llvm/test/Transforms/Attributor/allow_list.ll
@@ -21,13 +21,6 @@ define internal i32 @range_test(i32 %a) #0 {
 ; CHECK_DISABLED-NEXT:    [[TMP2:%.*]] = zext i1 [[TMP1]] to i32
 ; CHECK_DISABLED-NEXT:    ret i32 [[TMP2]]
 ;
-; CHECK_ENABLED: Function Attrs: noinline nounwind uwtable
-; CHECK_ENABLED-LABEL: define {{[^@]+}}@range_test
-; CHECK_ENABLED-SAME: (i32 [[A:%.*]]) #[[ATTR0:[0-9]+]] {
-; CHECK_ENABLED-NEXT:    [[TMP1:%.*]] = icmp sgt i32 [[A]], 100
-; CHECK_ENABLED-NEXT:    [[TMP2:%.*]] = zext i1 [[TMP1]] to i32
-; CHECK_ENABLED-NEXT:    ret i32 [[TMP2]]
-;
 ; CHECK_DISABLED_FUNCTION: Function Attrs: noinline nounwind uwtable
 ; CHECK_DISABLED_FUNCTION-LABEL: define {{[^@]+}}@range_test
 ; CHECK_DISABLED_FUNCTION-SAME: (i32 [[A:%.*]]) #[[ATTR0:[0-9]+]] {
@@ -55,9 +48,8 @@ define i32 @range_use1() #0 {
 ;
 ; CHECK_ENABLED: Function Attrs: noinline nounwind uwtable
 ; CHECK_ENABLED-LABEL: define {{[^@]+}}@range_use1
-; CHECK_ENABLED-SAME: () #[[ATTR0]] {
-; CHECK_ENABLED-NEXT:    [[TMP1:%.*]] = call i32 @range_test(i32 123)
-; CHECK_ENABLED-NEXT:    ret i32 [[TMP1]]
+; CHECK_ENABLED-SAME: () #[[ATTR0:[0-9]+]] {
+; CHECK_ENABLED-NEXT:    ret i32 1
 ;
 ; CHECK_DISABLED_FUNCTION: Function Attrs: noinline nounwind uwtable
 ; CHECK_DISABLED_FUNCTION-LABEL: define {{[^@]+}}@range_use1
@@ -82,11 +74,10 @@ define i32 @range_use2() #0 {
 ; CHECK_DISABLED-NEXT:    [[TMP1:%.*]] = call i32 @range_test(i32 123)
 ; CHECK_DISABLED-NEXT:    ret i32 [[TMP1]]
 ;
-; CHECK_ENABLED: Function Attrs: noinline nounwind uwtable
+; CHECK_ENABLED: Function Attrs: noinline norecurse nounwind uwtable
 ; CHECK_ENABLED-LABEL: define {{[^@]+}}@range_use2
-; CHECK_ENABLED-SAME: () #[[ATTR0]] {
-; CHECK_ENABLED-NEXT:    [[TMP1:%.*]] = call i32 @range_test(i32 123)
-; CHECK_ENABLED-NEXT:    ret i32 [[TMP1]]
+; CHECK_ENABLED-SAME: () #[[ATTR1:[0-9]+]] {
+; CHECK_ENABLED-NEXT:    ret i32 1
 ;
 ; CHECK_DISABLED_FUNCTION: Function Attrs: noinline nounwind uwtable
 ; CHECK_DISABLED_FUNCTION-LABEL: define {{[^@]+}}@range_use2
@@ -109,6 +100,7 @@ attributes #0 = { nounwind uwtable noinline }
 ; CHECK_DISABLED: attributes #[[ATTR0]] = { noinline nounwind uwtable }
 ;.
 ; CHECK_ENABLED: attributes #[[ATTR0]] = { noinline nounwind uwtable }
+; CHECK_ENABLED: attributes #[[ATTR1]] = { noinline norecurse nounwind uwtable }
 ;.
 ; CHECK_DISABLED_FUNCTION: attributes #[[ATTR0]] = { noinline nounwind uwtable }
 ;.

diff  --git a/llvm/test/Transforms/Attributor/assumes_info.ll b/llvm/test/Transforms/Attributor/assumes_info.ll
index 37e55a99134d6..583369f8e7f7a 100644
--- a/llvm/test/Transforms/Attributor/assumes_info.ll
+++ b/llvm/test/Transforms/Attributor/assumes_info.ll
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=3 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=3 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
+; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=2 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=2 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
 ; RUN: opt -attributor-cgscc -enable-new-pm=0 -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_NPM,IS__CGSCC____,IS________OPM,IS__CGSCC_OPM
 ; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM
 

diff  --git a/llvm/test/Transforms/Attributor/callbacks.ll b/llvm/test/Transforms/Attributor/callbacks.ll
index 1e6405032bcdb..9eb536c02ab2c 100644
--- a/llvm/test/Transforms/Attributor/callbacks.ll
+++ b/llvm/test/Transforms/Attributor/callbacks.ll
@@ -73,7 +73,7 @@ define internal void @t0_callback_callee(i32* %is_not_null, i32* %ptr, i32* %a,
 ; IS__TUNIT_OPM-NEXT:    [[PTR_VAL:%.*]] = load i32, i32* [[PTR]], align 8
 ; IS__TUNIT_OPM-NEXT:    store i32 [[PTR_VAL]], i32* [[IS_NOT_NULL]], align 4
 ; IS__TUNIT_OPM-NEXT:    [[TMP0:%.*]] = load i32*, i32** [[C]], align 64
-; IS__TUNIT_OPM-NEXT:    tail call void @t0_check(i32* align 256 [[A]], i64 noundef 99, i32* nonnull align 32 [[TMP0]])
+; IS__TUNIT_OPM-NEXT:    tail call void @t0_check(i32* align 256 [[A]], i64 noundef 99, i32* noundef nonnull align 32 dereferenceable(4) [[TMP0]])
 ; IS__TUNIT_OPM-NEXT:    ret void
 ;
 ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@t0_callback_callee
@@ -82,7 +82,7 @@ define internal void @t0_callback_callee(i32* %is_not_null, i32* %ptr, i32* %a,
 ; IS__TUNIT_NPM-NEXT:    [[PTR_VAL:%.*]] = load i32, i32* [[PTR]], align 8
 ; IS__TUNIT_NPM-NEXT:    store i32 [[PTR_VAL]], i32* [[IS_NOT_NULL]], align 4
 ; IS__TUNIT_NPM-NEXT:    [[TMP0:%.*]] = load i32*, i32** [[C]], align 64
-; IS__TUNIT_NPM-NEXT:    tail call void @t0_check(i32* align 256 [[A]], i64 noundef 99, i32* nonnull align 32 [[TMP0]])
+; IS__TUNIT_NPM-NEXT:    tail call void @t0_check(i32* align 256 [[A]], i64 noundef 99, i32* noundef nonnull align 32 dereferenceable(4) [[TMP0]])
 ; IS__TUNIT_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@t0_callback_callee
@@ -192,7 +192,7 @@ define internal void @t1_callback_callee(i32* %is_not_null, i32* %ptr, i32* %a,
 ; IS__TUNIT_OPM-NEXT:    [[PTR_VAL:%.*]] = load i32, i32* [[PTR]], align 8
 ; IS__TUNIT_OPM-NEXT:    store i32 [[PTR_VAL]], i32* [[IS_NOT_NULL]], align 4
 ; IS__TUNIT_OPM-NEXT:    [[TMP0:%.*]] = load i32*, i32** [[C]], align 64
-; IS__TUNIT_OPM-NEXT:    tail call void @t1_check(i32* nocapture align 256 [[A]], i64 noundef 99, i32* nocapture nonnull align 32 [[TMP0]])
+; IS__TUNIT_OPM-NEXT:    tail call void @t1_check(i32* nocapture align 256 [[A]], i64 noundef 99, i32* nocapture noundef nonnull align 32 dereferenceable(4) [[TMP0]])
 ; IS__TUNIT_OPM-NEXT:    ret void
 ;
 ; IS__TUNIT_NPM: Function Attrs: nosync
@@ -202,7 +202,7 @@ define internal void @t1_callback_callee(i32* %is_not_null, i32* %ptr, i32* %a,
 ; IS__TUNIT_NPM-NEXT:    [[PTR_VAL:%.*]] = load i32, i32* [[PTR]], align 8
 ; IS__TUNIT_NPM-NEXT:    store i32 [[PTR_VAL]], i32* [[IS_NOT_NULL]], align 4
 ; IS__TUNIT_NPM-NEXT:    [[TMP0:%.*]] = load i32*, i32** [[C]], align 64
-; IS__TUNIT_NPM-NEXT:    tail call void @t1_check(i32* nocapture align 256 [[A]], i64 noundef 99, i32* nocapture nonnull align 32 [[TMP0]])
+; IS__TUNIT_NPM-NEXT:    tail call void @t1_check(i32* nocapture align 256 [[A]], i64 noundef 99, i32* nocapture noundef nonnull align 32 dereferenceable(4) [[TMP0]])
 ; IS__TUNIT_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC_OPM: Function Attrs: nosync
@@ -313,7 +313,7 @@ define internal void @t2_callback_callee(i32* %is_not_null, i32* %ptr, i32* %a,
 ; IS__TUNIT_OPM-NEXT:    [[PTR_VAL:%.*]] = load i32, i32* [[PTR]], align 8
 ; IS__TUNIT_OPM-NEXT:    store i32 [[PTR_VAL]], i32* [[IS_NOT_NULL]], align 4
 ; IS__TUNIT_OPM-NEXT:    [[TMP0:%.*]] = load i32*, i32** [[C]], align 64
-; IS__TUNIT_OPM-NEXT:    tail call void @t2_check(i32* nocapture align 256 [[A]], i64 noundef 99, i32* nocapture nonnull align 32 [[TMP0]])
+; IS__TUNIT_OPM-NEXT:    tail call void @t2_check(i32* nocapture align 256 [[A]], i64 noundef 99, i32* nocapture noundef nonnull align 32 dereferenceable(4) [[TMP0]])
 ; IS__TUNIT_OPM-NEXT:    ret void
 ;
 ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@t2_callback_callee
@@ -322,7 +322,7 @@ define internal void @t2_callback_callee(i32* %is_not_null, i32* %ptr, i32* %a,
 ; IS__TUNIT_NPM-NEXT:    [[PTR_VAL:%.*]] = load i32, i32* [[PTR]], align 8
 ; IS__TUNIT_NPM-NEXT:    store i32 [[PTR_VAL]], i32* [[IS_NOT_NULL]], align 4
 ; IS__TUNIT_NPM-NEXT:    [[TMP0:%.*]] = load i32*, i32** [[C]], align 64
-; IS__TUNIT_NPM-NEXT:    tail call void @t2_check(i32* nocapture align 256 [[A]], i64 noundef 99, i32* nocapture nonnull align 32 [[TMP0]])
+; IS__TUNIT_NPM-NEXT:    tail call void @t2_check(i32* nocapture align 256 [[A]], i64 noundef 99, i32* nocapture noundef nonnull align 32 dereferenceable(4) [[TMP0]])
 ; IS__TUNIT_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@t2_callback_callee
@@ -436,7 +436,7 @@ define internal void @t3_callback_callee(i32* %is_not_null, i32* %ptr, i32* %a,
 ; IS__TUNIT_OPM-NEXT:    [[PTR_VAL:%.*]] = load i32, i32* [[PTR]], align 8
 ; IS__TUNIT_OPM-NEXT:    store i32 [[PTR_VAL]], i32* [[IS_NOT_NULL]], align 4
 ; IS__TUNIT_OPM-NEXT:    [[TMP0:%.*]] = load i32*, i32** [[C]], align 64
-; IS__TUNIT_OPM-NEXT:    tail call void @t3_check(i32* nocapture align 256 [[A]], i64 noundef 99, i32* nocapture nonnull align 32 [[TMP0]])
+; IS__TUNIT_OPM-NEXT:    tail call void @t3_check(i32* nocapture align 256 [[A]], i64 noundef 99, i32* nocapture noundef nonnull align 32 dereferenceable(4) [[TMP0]])
 ; IS__TUNIT_OPM-NEXT:    ret void
 ;
 ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@t3_callback_callee
@@ -445,7 +445,7 @@ define internal void @t3_callback_callee(i32* %is_not_null, i32* %ptr, i32* %a,
 ; IS__TUNIT_NPM-NEXT:    [[PTR_VAL:%.*]] = load i32, i32* [[PTR]], align 8
 ; IS__TUNIT_NPM-NEXT:    store i32 [[PTR_VAL]], i32* [[IS_NOT_NULL]], align 4
 ; IS__TUNIT_NPM-NEXT:    [[TMP0:%.*]] = load i32*, i32** [[C]], align 64
-; IS__TUNIT_NPM-NEXT:    tail call void @t3_check(i32* nocapture align 256 [[A]], i64 noundef 99, i32* nocapture nonnull align 32 [[TMP0]])
+; IS__TUNIT_NPM-NEXT:    tail call void @t3_check(i32* nocapture align 256 [[A]], i64 noundef 99, i32* nocapture noundef nonnull align 32 dereferenceable(4) [[TMP0]])
 ; IS__TUNIT_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@t3_callback_callee

diff  --git a/llvm/test/Transforms/Attributor/cb_liveness_disabled.ll b/llvm/test/Transforms/Attributor/cb_liveness_disabled.ll
index a6a7b0835301e..d6909dfe5c5e4 100644
--- a/llvm/test/Transforms/Attributor/cb_liveness_disabled.ll
+++ b/llvm/test/Transforms/Attributor/cb_liveness_disabled.ll
@@ -68,10 +68,10 @@ define i32 @test(i32 %0, i32 %1) #0 {
 ; IS__TUNIT____-NEXT:    [[TMP3:%.*]] = icmp ne i32 [[TMP1]], 0
 ; IS__TUNIT____-NEXT:    br i1 [[TMP3]], label [[TMP4:%.*]], label [[TMP6:%.*]]
 ; IS__TUNIT____:       4:
-; IS__TUNIT____-NEXT:    [[TMP5:%.*]] = call i32 @test_range1(i32 [[TMP0]])
+; IS__TUNIT____-NEXT:    [[TMP5:%.*]] = call noundef i32 @test_range1(i32 [[TMP0]]) #[[ATTR1:[0-9]+]], !range [[RNG0:![0-9]+]]
 ; IS__TUNIT____-NEXT:    br label [[TMP8:%.*]]
 ; IS__TUNIT____:       6:
-; IS__TUNIT____-NEXT:    [[TMP7:%.*]] = call i32 @test_range2(i32 [[TMP0]])
+; IS__TUNIT____-NEXT:    [[TMP7:%.*]] = call noundef i32 @test_range2(i32 [[TMP0]]) #[[ATTR1]], !range [[RNG1:![0-9]+]]
 ; IS__TUNIT____-NEXT:    br label [[TMP8]]
 ; IS__TUNIT____:       8:
 ; IS__TUNIT____-NEXT:    [[DOT0:%.*]] = phi i32 [ [[TMP5]], [[TMP4]] ], [ [[TMP7]], [[TMP6]] ]
@@ -110,7 +110,7 @@ define i32 @test(i32 %0, i32 %1) #0 {
 define i32 @test_pcheck1(i32 %0) #0 {
 ; IS__TUNIT____-LABEL: define {{[^@]+}}@test_pcheck1
 ; IS__TUNIT____-SAME: (i32 [[TMP0:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT:    [[TMP2:%.*]] = call i32 @test(i32 [[TMP0]], i32 noundef 1)
+; IS__TUNIT____-NEXT:    [[TMP2:%.*]] = call i32 @test(i32 [[TMP0]], i32 noundef 1) #[[ATTR1]], !range [[RNG2:![0-9]+]]
 ; IS__TUNIT____-NEXT:    [[TMP3:%.*]] = icmp slt i32 [[TMP2]], 101
 ; IS__TUNIT____-NEXT:    [[TMP4:%.*]] = zext i1 [[TMP3]] to i32
 ; IS__TUNIT____-NEXT:    ret i32 [[TMP4]]
@@ -131,7 +131,7 @@ define i32 @test_pcheck1(i32 %0) #0 {
 define i32 @test_pcheck2(i32 %0) #0 {
 ; IS__TUNIT____-LABEL: define {{[^@]+}}@test_pcheck2
 ; IS__TUNIT____-SAME: (i32 [[TMP0:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT:    [[TMP2:%.*]] = call i32 @test(i32 [[TMP0]], i32 noundef 0)
+; IS__TUNIT____-NEXT:    [[TMP2:%.*]] = call i32 @test(i32 [[TMP0]], i32 noundef 0) #[[ATTR1]], !range [[RNG2]]
 ; IS__TUNIT____-NEXT:    [[TMP3:%.*]] = icmp sgt i32 [[TMP2]], 99
 ; IS__TUNIT____-NEXT:    [[TMP4:%.*]] = zext i1 [[TMP3]] to i32
 ; IS__TUNIT____-NEXT:    ret i32 [[TMP4]]
@@ -152,7 +152,7 @@ define i32 @test_pcheck2(i32 %0) #0 {
 define i32 @test_ncheck1(i32 %0) #0 {
 ; IS__TUNIT____-LABEL: define {{[^@]+}}@test_ncheck1
 ; IS__TUNIT____-SAME: (i32 [[TMP0:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT:    [[TMP2:%.*]] = call i32 @test(i32 [[TMP0]], i32 noundef 1)
+; IS__TUNIT____-NEXT:    [[TMP2:%.*]] = call i32 @test(i32 [[TMP0]], i32 noundef 1) #[[ATTR1]], !range [[RNG2]]
 ; IS__TUNIT____-NEXT:    [[TMP3:%.*]] = icmp sgt i32 [[TMP2]], 50
 ; IS__TUNIT____-NEXT:    [[TMP4:%.*]] = zext i1 [[TMP3]] to i32
 ; IS__TUNIT____-NEXT:    ret i32 [[TMP4]]
@@ -173,7 +173,7 @@ define i32 @test_ncheck1(i32 %0) #0 {
 define i32 @test_ncheck2(i32 %0) #0 {
 ; IS__TUNIT____-LABEL: define {{[^@]+}}@test_ncheck2
 ; IS__TUNIT____-SAME: (i32 [[TMP0:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT:    [[TMP2:%.*]] = call i32 @test(i32 [[TMP0]], i32 noundef 0)
+; IS__TUNIT____-NEXT:    [[TMP2:%.*]] = call i32 @test(i32 [[TMP0]], i32 noundef 0) #[[ATTR1]], !range [[RNG2]]
 ; IS__TUNIT____-NEXT:    [[TMP3:%.*]] = icmp sgt i32 [[TMP2]], 150
 ; IS__TUNIT____-NEXT:    [[TMP4:%.*]] = zext i1 [[TMP3]] to i32
 ; IS__TUNIT____-NEXT:    ret i32 [[TMP4]]
@@ -197,9 +197,13 @@ attributes #0 = { noinline nounwind sspstrong uwtable}
 ; IS__TUNIT_____: !1 = !{i32 100, i32 201}
 ;.
 ; IS__TUNIT____: attributes #[[ATTR0]] = { nofree noinline norecurse nosync nounwind readnone sspstrong willreturn uwtable }
-; IS__TUNIT____: attributes #[[ATTR1:[0-9]+]] = { nofree nosync nounwind readnone willreturn }
+; IS__TUNIT____: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn }
 ;.
 ; IS__CGSCC____: attributes #[[ATTR0]] = { nofree noinline norecurse nosync nounwind readnone sspstrong willreturn uwtable }
 ; IS__CGSCC____: attributes #[[ATTR1]] = { nofree noinline nosync nounwind readnone sspstrong willreturn uwtable }
 ; IS__CGSCC____: attributes #[[ATTR2:[0-9]+]] = { readnone willreturn }
 ;.
+; IS__TUNIT____: [[RNG0]] = !{i32 0, i32 101}
+; IS__TUNIT____: [[RNG1]] = !{i32 100, i32 201}
+; IS__TUNIT____: [[RNG2]] = !{i32 0, i32 201}
+;.

diff  --git a/llvm/test/Transforms/Attributor/cb_liveness_enabled.ll b/llvm/test/Transforms/Attributor/cb_liveness_enabled.ll
index fe12d16db572b..03537c816d222 100644
--- a/llvm/test/Transforms/Attributor/cb_liveness_enabled.ll
+++ b/llvm/test/Transforms/Attributor/cb_liveness_enabled.ll
@@ -68,10 +68,10 @@ define i32 @test(i32 %0, i32 %1) #0 {
 ; IS__TUNIT____-NEXT:    [[TMP3:%.*]] = icmp ne i32 [[TMP1]], 0
 ; IS__TUNIT____-NEXT:    br i1 [[TMP3]], label [[TMP4:%.*]], label [[TMP6:%.*]]
 ; IS__TUNIT____:       4:
-; IS__TUNIT____-NEXT:    [[TMP5:%.*]] = call i32 @test_range1(i32 [[TMP0]])
+; IS__TUNIT____-NEXT:    [[TMP5:%.*]] = call noundef i32 @test_range1(i32 [[TMP0]]) #[[ATTR1:[0-9]+]], !range [[RNG0:![0-9]+]]
 ; IS__TUNIT____-NEXT:    br label [[TMP8:%.*]]
 ; IS__TUNIT____:       6:
-; IS__TUNIT____-NEXT:    [[TMP7:%.*]] = call i32 @test_range2(i32 [[TMP0]])
+; IS__TUNIT____-NEXT:    [[TMP7:%.*]] = call noundef i32 @test_range2(i32 [[TMP0]]) #[[ATTR1]], !range [[RNG1:![0-9]+]]
 ; IS__TUNIT____-NEXT:    br label [[TMP8]]
 ; IS__TUNIT____:       8:
 ; IS__TUNIT____-NEXT:    [[DOT0:%.*]] = phi i32 [ [[TMP5]], [[TMP4]] ], [ [[TMP7]], [[TMP6]] ]
@@ -110,7 +110,7 @@ define i32 @test(i32 %0, i32 %1) #0 {
 define i32 @test_pcheck1(i32 %0) #0 {
 ; IS__TUNIT____-LABEL: define {{[^@]+}}@test_pcheck1
 ; IS__TUNIT____-SAME: (i32 [[TMP0:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT:    [[TMP2:%.*]] = call i32 @test(i32 [[TMP0]], i32 noundef 1)
+; IS__TUNIT____-NEXT:    [[TMP2:%.*]] = call i32 @test(i32 [[TMP0]], i32 noundef 1) #[[ATTR1]], !range [[RNG2:![0-9]+]]
 ; IS__TUNIT____-NEXT:    [[TMP3:%.*]] = icmp slt i32 [[TMP2]], 101
 ; IS__TUNIT____-NEXT:    [[TMP4:%.*]] = zext i1 [[TMP3]] to i32
 ; IS__TUNIT____-NEXT:    ret i32 [[TMP4]]
@@ -134,7 +134,7 @@ define i32 @test_pcheck1(i32 %0) #0 {
 define i32 @test_pcheck2(i32 %0) #0 {
 ; IS__TUNIT____-LABEL: define {{[^@]+}}@test_pcheck2
 ; IS__TUNIT____-SAME: (i32 [[TMP0:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT:    [[TMP2:%.*]] = call i32 @test(i32 [[TMP0]], i32 noundef 0)
+; IS__TUNIT____-NEXT:    [[TMP2:%.*]] = call i32 @test(i32 [[TMP0]], i32 noundef 0) #[[ATTR1]], !range [[RNG2]]
 ; IS__TUNIT____-NEXT:    [[TMP3:%.*]] = icmp sgt i32 [[TMP2]], 99
 ; IS__TUNIT____-NEXT:    [[TMP4:%.*]] = zext i1 [[TMP3]] to i32
 ; IS__TUNIT____-NEXT:    ret i32 [[TMP4]]
@@ -155,7 +155,7 @@ define i32 @test_pcheck2(i32 %0) #0 {
 define i32 @test_ncheck1(i32 %0) #0 {
 ; IS__TUNIT____-LABEL: define {{[^@]+}}@test_ncheck1
 ; IS__TUNIT____-SAME: (i32 [[TMP0:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT:    [[TMP2:%.*]] = call i32 @test(i32 [[TMP0]], i32 noundef 1)
+; IS__TUNIT____-NEXT:    [[TMP2:%.*]] = call i32 @test(i32 [[TMP0]], i32 noundef 1) #[[ATTR1]], !range [[RNG2]]
 ; IS__TUNIT____-NEXT:    [[TMP3:%.*]] = icmp sgt i32 [[TMP2]], 50
 ; IS__TUNIT____-NEXT:    [[TMP4:%.*]] = zext i1 [[TMP3]] to i32
 ; IS__TUNIT____-NEXT:    ret i32 [[TMP4]]
@@ -176,7 +176,7 @@ define i32 @test_ncheck1(i32 %0) #0 {
 define i32 @test_ncheck2(i32 %0) #0 {
 ; IS__TUNIT____-LABEL: define {{[^@]+}}@test_ncheck2
 ; IS__TUNIT____-SAME: (i32 [[TMP0:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT:    [[TMP2:%.*]] = call i32 @test(i32 [[TMP0]], i32 noundef 0)
+; IS__TUNIT____-NEXT:    [[TMP2:%.*]] = call i32 @test(i32 [[TMP0]], i32 noundef 0) #[[ATTR1]], !range [[RNG2]]
 ; IS__TUNIT____-NEXT:    [[TMP3:%.*]] = icmp sgt i32 [[TMP2]], 150
 ; IS__TUNIT____-NEXT:    [[TMP4:%.*]] = zext i1 [[TMP3]] to i32
 ; IS__TUNIT____-NEXT:    ret i32 [[TMP4]]
@@ -200,9 +200,13 @@ attributes #0 = { noinline nounwind sspstrong uwtable}
 ; IS__TUNIT_____: !1 = !{i32 100, i32 201}
 ;.
 ; IS__TUNIT____: attributes #[[ATTR0]] = { nofree noinline norecurse nosync nounwind readnone sspstrong willreturn uwtable }
-; IS__TUNIT____: attributes #[[ATTR1:[0-9]+]] = { nofree nosync nounwind readnone willreturn }
+; IS__TUNIT____: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn }
 ;.
 ; IS__CGSCC____: attributes #[[ATTR0]] = { nofree noinline norecurse nosync nounwind readnone sspstrong willreturn uwtable }
 ; IS__CGSCC____: attributes #[[ATTR1]] = { nofree noinline nosync nounwind readnone sspstrong willreturn uwtable }
 ; IS__CGSCC____: attributes #[[ATTR2:[0-9]+]] = { readnone willreturn }
 ;.
+; IS__TUNIT____: [[RNG0]] = !{i32 0, i32 101}
+; IS__TUNIT____: [[RNG1]] = !{i32 100, i32 201}
+; IS__TUNIT____: [[RNG2]] = !{i32 0, i32 201}
+;.

diff  --git a/llvm/test/Transforms/Attributor/cb_range_disabled.ll b/llvm/test/Transforms/Attributor/cb_range_disabled.ll
index ce5eb4ae54a01..4a925549bc241 100644
--- a/llvm/test/Transforms/Attributor/cb_range_disabled.ll
+++ b/llvm/test/Transforms/Attributor/cb_range_disabled.ll
@@ -24,7 +24,7 @@ define i32 @test_range(i32 %unknown) {
 define i32 @test1(i32 %unknown, i32 %b) {
 ; IS__TUNIT____-LABEL: define {{[^@]+}}@test1
 ; IS__TUNIT____-SAME: (i32 [[UNKNOWN:%.*]], i32 [[B:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT:    [[TMP1:%.*]] = call i32 @test_range(i32 [[UNKNOWN]])
+; IS__TUNIT____-NEXT:    [[TMP1:%.*]] = call i32 @test_range(i32 [[UNKNOWN]]) #[[ATTR1:[0-9]+]], !range [[RNG0:![0-9]+]]
 ; IS__TUNIT____-NEXT:    [[TMP2:%.*]] = sub nsw i32 [[TMP1]], [[B]]
 ; IS__TUNIT____-NEXT:    ret i32 [[TMP2]]
 ;
@@ -42,7 +42,7 @@ define i32 @test1(i32 %unknown, i32 %b) {
 define i32 @test2(i32 %unknown, i32 %b) {
 ; IS__TUNIT____-LABEL: define {{[^@]+}}@test2
 ; IS__TUNIT____-SAME: (i32 [[UNKNOWN:%.*]], i32 [[B:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT:    [[TMP1:%.*]] = call i32 @test_range(i32 [[UNKNOWN]])
+; IS__TUNIT____-NEXT:    [[TMP1:%.*]] = call i32 @test_range(i32 [[UNKNOWN]]) #[[ATTR1]], !range [[RNG0]]
 ; IS__TUNIT____-NEXT:    [[TMP2:%.*]] = add nsw i32 [[TMP1]], [[B]]
 ; IS__TUNIT____-NEXT:    ret i32 [[TMP2]]
 ;
@@ -146,9 +146,11 @@ define i32 @test2_ncheck(i32 %unknown) {
 }
 ;.
 ; IS__TUNIT____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__TUNIT____: attributes #[[ATTR1:[0-9]+]] = { nofree nosync nounwind readnone willreturn }
+; IS__TUNIT____: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn }
 ;.
 ; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
 ; IS__CGSCC____: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn }
 ; IS__CGSCC____: attributes #[[ATTR2:[0-9]+]] = { readnone willreturn }
 ;.
+; IS__TUNIT____: [[RNG0]] = !{i32 0, i32 101}
+;.

diff  --git a/llvm/test/Transforms/Attributor/cb_range_enabled.ll b/llvm/test/Transforms/Attributor/cb_range_enabled.ll
index b41539e74c608..d61009a37122f 100644
--- a/llvm/test/Transforms/Attributor/cb_range_enabled.ll
+++ b/llvm/test/Transforms/Attributor/cb_range_enabled.ll
@@ -24,7 +24,7 @@ define i32 @test_range(i32 %unknown) {
 define i32 @test1(i32 %unknown, i32 %b) {
 ; IS__TUNIT____-LABEL: define {{[^@]+}}@test1
 ; IS__TUNIT____-SAME: (i32 [[UNKNOWN:%.*]], i32 [[B:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT:    [[TMP1:%.*]] = call i32 @test_range(i32 [[UNKNOWN]])
+; IS__TUNIT____-NEXT:    [[TMP1:%.*]] = call i32 @test_range(i32 [[UNKNOWN]]) #[[ATTR1:[0-9]+]], !range [[RNG0:![0-9]+]]
 ; IS__TUNIT____-NEXT:    [[TMP2:%.*]] = sub nsw i32 [[TMP1]], [[B]]
 ; IS__TUNIT____-NEXT:    ret i32 [[TMP2]]
 ;
@@ -42,7 +42,7 @@ define i32 @test1(i32 %unknown, i32 %b) {
 define i32 @test2(i32 %unknown, i32 %b) {
 ; IS__TUNIT____-LABEL: define {{[^@]+}}@test2
 ; IS__TUNIT____-SAME: (i32 [[UNKNOWN:%.*]], i32 [[B:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT:    [[TMP1:%.*]] = call i32 @test_range(i32 [[UNKNOWN]])
+; IS__TUNIT____-NEXT:    [[TMP1:%.*]] = call i32 @test_range(i32 [[UNKNOWN]]) #[[ATTR1]], !range [[RNG0]]
 ; IS__TUNIT____-NEXT:    [[TMP2:%.*]] = add nsw i32 [[TMP1]], [[B]]
 ; IS__TUNIT____-NEXT:    ret i32 [[TMP2]]
 ;
@@ -66,10 +66,7 @@ define i32 @test2(i32 %unknown, i32 %b) {
 define i32 @test1_pcheck(i32 %unknown) {
 ; IS__TUNIT____-LABEL: define {{[^@]+}}@test1_pcheck
 ; IS__TUNIT____-SAME: (i32 [[UNKNOWN:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT:    [[TMP1:%.*]] = call i32 @test1(i32 [[UNKNOWN]], i32 noundef 20)
-; IS__TUNIT____-NEXT:    [[TMP2:%.*]] = icmp sle i32 [[TMP1]], 90
-; IS__TUNIT____-NEXT:    [[TMP3:%.*]] = zext i1 [[TMP2]] to i32
-; IS__TUNIT____-NEXT:    ret i32 [[TMP3]]
+; IS__TUNIT____-NEXT:    ret i32 1
 ;
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@test1_pcheck
 ; IS__CGSCC____-SAME: (i32 [[UNKNOWN:%.*]]) #[[ATTR1]] {
@@ -87,10 +84,7 @@ define i32 @test1_pcheck(i32 %unknown) {
 define i32 @test2_pcheck(i32 %unknown) {
 ; IS__TUNIT____-LABEL: define {{[^@]+}}@test2_pcheck
 ; IS__TUNIT____-SAME: (i32 [[UNKNOWN:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT:    [[TMP1:%.*]] = call i32 @test2(i32 [[UNKNOWN]], i32 noundef 20)
-; IS__TUNIT____-NEXT:    [[TMP2:%.*]] = icmp sge i32 [[TMP1]], 20
-; IS__TUNIT____-NEXT:    [[TMP3:%.*]] = zext i1 [[TMP2]] to i32
-; IS__TUNIT____-NEXT:    ret i32 [[TMP3]]
+; IS__TUNIT____-NEXT:    ret i32 1
 ;
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@test2_pcheck
 ; IS__CGSCC____-SAME: (i32 [[UNKNOWN:%.*]]) #[[ATTR1]] {
@@ -110,7 +104,7 @@ define i32 @test2_pcheck(i32 %unknown) {
 define i32 @test1_ncheck(i32 %unknown) {
 ; IS__TUNIT____-LABEL: define {{[^@]+}}@test1_ncheck
 ; IS__TUNIT____-SAME: (i32 [[UNKNOWN:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT:    [[TMP1:%.*]] = call i32 @test1(i32 [[UNKNOWN]], i32 noundef 20)
+; IS__TUNIT____-NEXT:    [[TMP1:%.*]] = call i32 @test1(i32 [[UNKNOWN]], i32 noundef 20) #[[ATTR1]], !range [[RNG1:![0-9]+]]
 ; IS__TUNIT____-NEXT:    [[TMP2:%.*]] = icmp sle i32 [[TMP1]], 10
 ; IS__TUNIT____-NEXT:    [[TMP3:%.*]] = zext i1 [[TMP2]] to i32
 ; IS__TUNIT____-NEXT:    ret i32 [[TMP3]]
@@ -131,7 +125,7 @@ define i32 @test1_ncheck(i32 %unknown) {
 define i32 @test2_ncheck(i32 %unknown) {
 ; IS__TUNIT____-LABEL: define {{[^@]+}}@test2_ncheck
 ; IS__TUNIT____-SAME: (i32 [[UNKNOWN:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT:    [[TMP1:%.*]] = call i32 @test2(i32 [[UNKNOWN]], i32 noundef 20)
+; IS__TUNIT____-NEXT:    [[TMP1:%.*]] = call i32 @test2(i32 [[UNKNOWN]], i32 noundef 20) #[[ATTR1]], !range [[RNG2:![0-9]+]]
 ; IS__TUNIT____-NEXT:    [[TMP2:%.*]] = icmp sge i32 [[TMP1]], 30
 ; IS__TUNIT____-NEXT:    [[TMP3:%.*]] = zext i1 [[TMP2]] to i32
 ; IS__TUNIT____-NEXT:    ret i32 [[TMP3]]
@@ -150,9 +144,13 @@ define i32 @test2_ncheck(i32 %unknown) {
 }
 ;.
 ; IS__TUNIT____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__TUNIT____: attributes #[[ATTR1:[0-9]+]] = { nofree nosync nounwind readnone willreturn }
+; IS__TUNIT____: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn }
 ;.
 ; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
 ; IS__CGSCC____: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn }
 ; IS__CGSCC____: attributes #[[ATTR2:[0-9]+]] = { readnone willreturn }
 ;.
+; IS__TUNIT____: [[RNG0]] = !{i32 0, i32 101}
+; IS__TUNIT____: [[RNG1]] = !{i32 -20, i32 81}
+; IS__TUNIT____: [[RNG2]] = !{i32 20, i32 121}
+;.

diff  --git a/llvm/test/Transforms/Attributor/cgscc_bugs.ll b/llvm/test/Transforms/Attributor/cgscc_bugs.ll
index 51e1832822371..c4360ef2345c4 100644
--- a/llvm/test/Transforms/Attributor/cgscc_bugs.ll
+++ b/llvm/test/Transforms/Attributor/cgscc_bugs.ll
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=6 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=6 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
+; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=2 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=2 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
 ; RUN: opt -attributor-cgscc -enable-new-pm=0 -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_NPM,IS__CGSCC____,IS________OPM,IS__CGSCC_OPM
 ; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM
 

diff  --git a/llvm/test/Transforms/Attributor/depgraph.ll b/llvm/test/Transforms/Attributor/depgraph.ll
index bcf820d15a5fc..0769bc0d6e35a 100644
--- a/llvm/test/Transforms/Attributor/depgraph.ll
+++ b/llvm/test/Transforms/Attributor/depgraph.ll
@@ -22,12 +22,12 @@ define i32* @checkAndAdvance(i32* align 16 %0) {
 ; CHECK-NEXT:    br i1 [[TMP3]], label [[TMP4:%.*]], label [[TMP7:%.*]]
 ; CHECK:       4:
 ; CHECK-NEXT:    [[TMP5:%.*]] = getelementptr inbounds i32, i32* [[TMP0]], i64 4
-; CHECK-NEXT:    [[TMP6:%.*]] = call i32* @checkAndAdvance(i32* nofree nonnull readonly align 16 [[TMP5]]) #[[ATTR1:[0-9]+]]
+; CHECK-NEXT:    [[TMP6:%.*]] = call nonnull align 16 i32* @checkAndAdvance(i32* nofree nonnull readonly align 16 [[TMP5]]) #[[ATTR1:[0-9]+]]
 ; CHECK-NEXT:    br label [[TMP8:%.*]]
 ; CHECK:       7:
 ; CHECK-NEXT:    br label [[TMP8]]
 ; CHECK:       8:
-; CHECK-NEXT:    [[DOT0:%.*]] = phi i32* [ [[TMP5]], [[TMP4]] ], [ [[TMP0]], [[TMP7]] ]
+; CHECK-NEXT:    [[DOT0:%.*]] = phi i32* [ [[TMP6]], [[TMP4]] ], [ [[TMP0]], [[TMP7]] ]
 ; CHECK-NEXT:    ret i32* [[DOT0]]
 ;
   %2 = load i32, i32* %0, align 4
@@ -53,17 +53,17 @@ define i32* @checkAndAdvance(i32* align 16 %0) {
 
 ; GRAPH:      [AAIsDead] for CtxI '  %2 = load i32, i32* %0, align 4' at position {fn:checkAndAdvance [checkAndAdvance at -1]} with state Live[#BB 4/4][#TBEP 0][#KDE 1]
 ; GRAPH-EMPTY:
-; GRAPH-NEXT: [AAPotentialValues] for CtxI '  %3 = icmp eq i32 %2, 0' at position {flt: [@-1]} with state set-state(< {  %3 = icmp eq i32 %2, 0[3], } >)
+; GRAPH-NEXT: [AAValueSimplify] for CtxI '  %3 = icmp eq i32 %2, 0' at position {flt: [@-1]} with state not-simple
 ; GRAPH-EMPTY:
-; GRAPH-NEXT: [AAPotentialValues] for CtxI '  %2 = load i32, i32* %0, align 4' at position {flt: [@-1]} with state set-state(< {  %2 = load i32, i32* %0, align 4[3], } >)
+; GRAPH-NEXT: [AAValueSimplify] for CtxI '  %2 = load i32, i32* %0, align 4' at position {flt: [@-1]} with state not-simple
 ; GRAPH-EMPTY:
-; GRAPH-NEXT: [AAPotentialValues] for CtxI '  %2 = load i32, i32* %0, align 4' at position {arg: [@0]} with state set-state(< {i32* %0[3], } >)
+; GRAPH-NEXT: [AAValueSimplify] for CtxI '  %2 = load i32, i32* %0, align 4' at position {arg: [@0]} with state not-simple
 ; GRAPH-EMPTY:
 ; GRAPH-NEXT: [AAValueConstantRange] for CtxI '  %2 = load i32, i32* %0, align 4' at position {flt: [@-1]} with state range(32)<full-set / full-set>
 ; GRAPH-EMPTY:
 ; GRAPH-NEXT: [AAPotentialConstantValues] for CtxI '  %2 = load i32, i32* %0, align 4' at position {flt: [@-1]} with state set-state(< {full-set} >)
 ; GRAPH-EMPTY:
-; GRAPH-NEXT: [AAPotentialValues] for CtxI <<null inst>> at position {flt: [@-1]} with state set-state(< {i32 0[3], } >)
+; GRAPH-NEXT: [AAValueSimplify] for CtxI <<null inst>> at position {flt: [@-1]} with state not-simple
 ; GRAPH-EMPTY:
 ; GRAPH-NEXT: [AAValueConstantRange] for CtxI '  %3 = icmp eq i32 %2, 0' at position {flt: [@-1]} with state range(1)<full-set / full-set>
 ; GRAPH-EMPTY:
@@ -122,41 +122,21 @@ define i32* @checkAndAdvance(i32* align 16 %0) {
 ; GRAPH-NEXT:   updates [AAMemoryBehavior] for CtxI '  %2 = load i32, i32* %0, align 4' at position {fn:checkAndAdvance [checkAndAdvance at -1]} with state readonly
 ; GRAPH-NEXT:   updates [AAMemoryBehavior] for CtxI '  %2 = load i32, i32* %0, align 4' at position {fn:checkAndAdvance [checkAndAdvance at -1]} with state readonly
 ; GRAPH-EMPTY:
-; GRAPH-NEXT: [AAPotentialValues] for CtxI '  %6 = call i32* @checkAndAdvance(i32* %5)' at position {cs_ret: [@-1]} with state set-state(< {  %5 = getelementptr inbounds i32, i32* %0, i64 4[3],   %5 = getelementptr inbounds i32, i32* %0, i64 4[3], } >)
-; GRAPH-NEXT:   updates [AAPotentialValues] for CtxI '  %.0 = phi i32* [ %6, %4 ], [ %0, %7 ]' at position {flt:.0 [.0 at -1]} with state set-state(< {i32* %0[3],   %5 = getelementptr inbounds i32, i32* %0, i64 4[3],   %5 = getelementptr inbounds i32, i32* %0, i64 4[3], } >)
-; GRAPH-NEXT:   updates [AAPotentialValues] for CtxI '  %.0 = phi i32* [ %6, %4 ], [ %0, %7 ]' at position {flt:.0 [.0 at -1]} with state set-state(< {i32* %0[3],   %5 = getelementptr inbounds i32, i32* %0, i64 4[3],   %5 = getelementptr inbounds i32, i32* %0, i64 4[3], } >)
-; GRAPH-NEXT:   updates [AAPotentialValues] for CtxI '  %.0 = phi i32* [ %6, %4 ], [ %0, %7 ]' at position {flt:.0 [.0 at -1]} with state set-state(< {i32* %0[3],   %5 = getelementptr inbounds i32, i32* %0, i64 4[3],   %5 = getelementptr inbounds i32, i32* %0, i64 4[3], } >)
-; GRAPH-NEXT:   updates [AAPotentialValues] for CtxI '  %.0 = phi i32* [ %6, %4 ], [ %0, %7 ]' at position {flt:.0 [.0 at -1]} with state set-state(< {i32* %0[3],   %5 = getelementptr inbounds i32, i32* %0, i64 4[3],   %5 = getelementptr inbounds i32, i32* %0, i64 4[3], } >)
+; GRAPH-NEXT: [AAValueSimplify] for CtxI '  %6 = call i32* @checkAndAdvance(i32* %5)' at position {cs_ret: [@-1]} with state not-simple
 ; GRAPH-EMPTY:
-; GRAPH-NEXT: [AAPotentialValues] for CtxI '  %2 = load i32, i32* %0, align 4' at position {fn_ret:checkAndAdvance [checkAndAdvance at -1]} with state set-state(< {i32* %0[3],   %5 = getelementptr inbounds i32, i32* %0, i64 4[3], } >)
-; GRAPH-NEXT:   updates [AAPotentialValues] for CtxI '  %6 = call i32* @checkAndAdvance(i32* %5)' at position {cs_ret: [@-1]} with state set-state(< {  %5 = getelementptr inbounds i32, i32* %0, i64 4[3],   %5 = getelementptr inbounds i32, i32* %0, i64 4[3], } >)
-; GRAPH-NEXT:   updates [AAPotentialValues] for CtxI '  %6 = call i32* @checkAndAdvance(i32* %5)' at position {cs_ret: [@-1]} with state set-state(< {  %5 = getelementptr inbounds i32, i32* %0, i64 4[3],   %5 = getelementptr inbounds i32, i32* %0, i64 4[3], } >)
+; GRAPH-NEXT: [AAReturnedValues] for CtxI '  %2 = load i32, i32* %0, align 4' at position {fn:checkAndAdvance [checkAndAdvance at -1]} with state returns(#3)
 ; GRAPH-EMPTY:
-; GRAPH-NEXT: [AAReturnedValues] for CtxI '  %2 = load i32, i32* %0, align 4' at position {fn:checkAndAdvance [checkAndAdvance at -1]} with state may-return(#2)
-; GRAPH-NEXT:   updates [AANoCapture] for CtxI '  %2 = load i32, i32* %0, align 4' at position {arg: [@0]} with state assumed not-captured-maybe-returned
-; GRAPH-NEXT:   updates [AANonNull] for CtxI '  %2 = load i32, i32* %0, align 4' at position {fn_ret:checkAndAdvance [checkAndAdvance at -1]} with state nonnull
-; GRAPH-NEXT:   updates [AAAlign] for CtxI '  %2 = load i32, i32* %0, align 4' at position {fn_ret:checkAndAdvance [checkAndAdvance at -1]} with state align<1-16>
-; GRAPH-NEXT:   updates [AAPotentialValues] for CtxI '  %2 = load i32, i32* %0, align 4' at position {fn_ret:checkAndAdvance [checkAndAdvance at -1]} with state set-state(< {i32* %0[3],   %5 = getelementptr inbounds i32, i32* %0, i64 4[3], } >)
-; GRAPH-NEXT:   updates [AAPotentialValues] for CtxI '  %2 = load i32, i32* %0, align 4' at position {fn_ret:checkAndAdvance [checkAndAdvance at -1]} with state set-state(< {i32* %0[3],   %5 = getelementptr inbounds i32, i32* %0, i64 4[3], } >)
-; GRAPH-EMPTY:
-; GRAPH-NEXT: [AAPotentialValues] for CtxI '  %.0 = phi i32* [ %6, %4 ], [ %0, %7 ]' at position {flt:.0 [.0 at -1]} with state set-state(< {i32* %0[3],   %5 = getelementptr inbounds i32, i32* %0, i64 4[3],   %5 = getelementptr inbounds i32, i32* %0, i64 4[3], } >)
-; GRAPH-NEXT:   updates [AAReturnedValues] for CtxI '  %2 = load i32, i32* %0, align 4' at position {fn:checkAndAdvance [checkAndAdvance at -1]} with state may-return(#2)
-; GRAPH-EMPTY:
-; GRAPH-NEXT: [AAPotentialConstantValues] for CtxI '  %2 = load i32, i32* %0, align 4' at position {arg: [@0]} with state set-state(< {full-set} >)
-; GRAPH-EMPTY:
-; GRAPH-NEXT: [AAPotentialValues] for CtxI '  %5 = getelementptr inbounds i32, i32* %0, i64 4' at position {flt: [@-1]} with state set-state(< {  %5 = getelementptr inbounds i32, i32* %0, i64 4[3], } >)
-; GRAPH-EMPTY:
-; GRAPH-NEXT: [AAPotentialValues] for CtxI <<null inst>> at position {flt: [@-1]} with state set-state(< {i64 4[3], } >)
+; GRAPH-NEXT: [AAValueSimplify] for CtxI '  %6 = call i32* @checkAndAdvance(i32* %5)' at position {cs_arg: [@0]} with state simplified
 ; GRAPH-EMPTY:
-; GRAPH-NEXT: [AAPotentialConstantValues] for CtxI '  %5 = getelementptr inbounds i32, i32* %0, i64 4' at position {flt: [@-1]} with state set-state(< {full-set} >)
+; GRAPH-NEXT: [AAValueSimplify] for CtxI '  %5 = getelementptr inbounds i32, i32* %0, i64 4' at position {flt: [@-1]} with state not-simple
 ; GRAPH-EMPTY:
-; GRAPH-NEXT: [AAPotentialValues] for CtxI '  %2 = load i32, i32* %0, align 4' at position {flt:checkAndAdvance [checkAndAdvance at -1]} with state set-state(< {@checkAndAdvance[3], } >)
+; GRAPH-NEXT: [AAValueSimplify] for CtxI <<null inst>> at position {flt: [@-1]} with state not-simple
 ; GRAPH-EMPTY:
-; GRAPH-NEXT: [AAPotentialValues] for CtxI '  %6 = call i32* @checkAndAdvance(i32* %5)' at position {cs_arg: [@0]} with state set-state(< {  %5 = getelementptr inbounds i32, i32* %0, i64 4[3], } >)
+; GRAPH-NEXT: [AAIsDead] for CtxI '  br label %8' at position {flt: [@-1]} with state assumed-live
 ; GRAPH-EMPTY:
-; GRAPH-NEXT: [AAPotentialConstantValues] for CtxI '  %6 = call i32* @checkAndAdvance(i32* %5)' at position {cs_arg: [@0]} with state set-state(< {full-set} >)
+; GRAPH-NEXT: [AAWillReturn] for CtxI '  %6 = call i32* @checkAndAdvance(i32* %5)' at position {cs: [@-1]} with state may-noreturn
 ; GRAPH-EMPTY:
-; GRAPH-NEXT: [AAInstanceInfo] for CtxI '  %5 = getelementptr inbounds i32, i32* %0, i64 4' at position {flt: [@-1]} with state <unique [fAa]>
+; GRAPH-NEXT: [AANoRecurse] for CtxI '  %6 = call i32* @checkAndAdvance(i32* %5)' at position {cs: [@-1]} with state may-recurse
 ; GRAPH-EMPTY:
 ; GRAPH-NEXT: [AANoRecurse] for CtxI '  %2 = load i32, i32* %0, align 4' at position {fn:checkAndAdvance [checkAndAdvance at -1]} with state may-recurse
 ; GRAPH-EMPTY:
@@ -166,12 +146,6 @@ define i32* @checkAndAdvance(i32* align 16 %0) {
 ; GRAPH-EMPTY:
 ; GRAPH-NEXT: [AACallEdges] for CtxI '  %6 = call i32* @checkAndAdvance(i32* %5)' at position {cs: [@-1]} with state CallEdges[0,1]
 ; GRAPH-EMPTY:
-; GRAPH-NEXT: [AAIsDead] for CtxI '  br label %8' at position {flt: [@-1]} with state assumed-live
-; GRAPH-EMPTY:
-; GRAPH-NEXT: [AAWillReturn] for CtxI '  %6 = call i32* @checkAndAdvance(i32* %5)' at position {cs: [@-1]} with state may-noreturn
-; GRAPH-EMPTY:
-; GRAPH-NEXT: [AANoRecurse] for CtxI '  %6 = call i32* @checkAndAdvance(i32* %5)' at position {cs: [@-1]} with state may-recurse
-; GRAPH-EMPTY:
 ; GRAPH-NEXT: [AAUndefinedBehavior] for CtxI '  %2 = load i32, i32* %0, align 4' at position {fn:checkAndAdvance [checkAndAdvance at -1]} with state undefined-behavior
 ; GRAPH-EMPTY:
 ; GRAPH-NEXT: [AANoUndef] for CtxI '  %6 = call i32* @checkAndAdvance(i32* %5)' at position {cs_arg: [@0]} with state may-undef-or-poison
@@ -206,7 +180,13 @@ define i32* @checkAndAdvance(i32* align 16 %0) {
 ; GRAPH-EMPTY:
 ; GRAPH-NEXT: [AAHeapToStack] for CtxI '  %2 = load i32, i32* %0, align 4' at position {fn:checkAndAdvance [checkAndAdvance at -1]} with state [H2S] Mallocs Good/Bad: 0/0
 ; GRAPH-EMPTY:
+; GRAPH-NEXT: [AAValueSimplify] for CtxI '  %2 = load i32, i32* %0, align 4' at position {fn_ret:checkAndAdvance [checkAndAdvance at -1]} with state simplified
+; GRAPH-EMPTY:
+; GRAPH-NEXT: [AAValueSimplify] for CtxI '  %.0 = phi i32* [ %6, %4 ], [ %0, %7 ]' at position {flt:.0 [.0 at -1]} with state not-simple
+; GRAPH-EMPTY:
 ; GRAPH-NEXT: [AAAlign] for CtxI '  %2 = load i32, i32* %0, align 4' at position {fn_ret:checkAndAdvance [checkAndAdvance at -1]} with state align<1-16>
+; GRAPH-NEXT:   updates [AAAlign] for CtxI '  %6 = call i32* @checkAndAdvance(i32* %5)' at position {cs_ret: [@-1]} with state align<1-16>
+; GRAPH-NEXT:   updates [AAAlign] for CtxI '  %6 = call i32* @checkAndAdvance(i32* %5)' at position {cs_ret: [@-1]} with state align<1-16>
 ; GRAPH-EMPTY:
 ; GRAPH-NEXT: [AAAlign] for CtxI '  %2 = load i32, i32* %0, align 4' at position {arg: [@0]} with state align<16-16>
 ; GRAPH-EMPTY:
@@ -215,6 +195,8 @@ define i32* @checkAndAdvance(i32* align 16 %0) {
 ; GRAPH-NEXT: [AAAlign] for CtxI '  %5 = getelementptr inbounds i32, i32* %0, i64 4' at position {flt: [@-1]} with state align<16-16>
 ; GRAPH-EMPTY:
 ; GRAPH-NEXT: [AANonNull] for CtxI '  %2 = load i32, i32* %0, align 4' at position {fn_ret:checkAndAdvance [checkAndAdvance at -1]} with state nonnull
+; GRAPH-NEXT:   updates [AANonNull] for CtxI '  %6 = call i32* @checkAndAdvance(i32* %5)' at position {cs_ret: [@-1]} with state nonnull
+; GRAPH-NEXT:   updates [AANonNull] for CtxI '  %6 = call i32* @checkAndAdvance(i32* %5)' at position {cs_ret: [@-1]} with state nonnull
 ; GRAPH-EMPTY:
 ; GRAPH-NEXT: [AANonNull] for CtxI '  %2 = load i32, i32* %0, align 4' at position {arg: [@0]} with state nonnull
 ; GRAPH-EMPTY:
@@ -232,9 +214,12 @@ define i32* @checkAndAdvance(i32* align 16 %0) {
 ; GRAPH-NEXT: [AANonNull] for CtxI '  %5 = getelementptr inbounds i32, i32* %0, i64 4' at position {flt: [@-1]} with state nonnull
 ; GRAPH-NEXT:   updates [AANonNull] for CtxI '  %5 = getelementptr inbounds i32, i32* %0, i64 4' at position {flt: [@-1]} with state nonnull
 ; GRAPH-NEXT:   updates [AANonNull] for CtxI '  %6 = call i32* @checkAndAdvance(i32* %5)' at position {cs_arg: [@0]} with state nonnull
+; GRAPH-NEXT:   updates [AANonNull] for CtxI '  %2 = load i32, i32* %0, align 4' at position {fn_ret:checkAndAdvance [checkAndAdvance at -1]} with state nonnull
 ; GRAPH-NEXT:   updates [AANonNull] for CtxI '  %6 = call i32* @checkAndAdvance(i32* %5)' at position {cs_arg: [@0]} with state nonnull
 ; GRAPH-NEXT:   updates [AANonNull] for CtxI '  %5 = getelementptr inbounds i32, i32* %0, i64 4' at position {flt: [@-1]} with state nonnull
 ; GRAPH-NEXT:   updates [AANonNull] for CtxI '  %2 = load i32, i32* %0, align 4' at position {fn_ret:checkAndAdvance [checkAndAdvance at -1]} with state nonnull
+; GRAPH-NEXT:   updates [AANonNull] for CtxI '  %2 = load i32, i32* %0, align 4' at position {fn_ret:checkAndAdvance [checkAndAdvance at -1]} with state nonnull
+; GRAPH-NEXT:   updates [AANonNull] for CtxI '  %2 = load i32, i32* %0, align 4' at position {fn_ret:checkAndAdvance [checkAndAdvance at -1]} with state nonnull
 ; GRAPH-EMPTY:
 ; GRAPH-NEXT: [AAIsDead] for CtxI '  %2 = load i32, i32* %0, align 4' at position {arg: [@0]} with state assumed-live
 ; GRAPH-EMPTY:
@@ -281,128 +266,69 @@ define i32* @checkAndAdvance(i32* align 16 %0) {
 ; GRAPH-NEXT: [AANoFree] for CtxI '  %6 = call i32* @checkAndAdvance(i32* %5)' at position {cs_arg: [@0]} with state nofree
 ; GRAPH-EMPTY:
 ; GRAPH-NEXT: [AADereferenceable] for CtxI ' %5 = getelementptr inbounds i32, i32* %0, i64 4' at position {flt: [@-1]} with state unknown-dereferenceable
+; GRAPH-EMPTY:
+; GRAPH-NEXT: [AAAlign] for CtxI '  %6 = call i32* @checkAndAdvance(i32* %5)' at position {cs_ret: [@-1]} with state align<1-16>
+; GRAPH-NEXT:   updates [AAAlign] for CtxI '  %2 = load i32, i32* %0, align 4' at position {fn_ret:checkAndAdvance [checkAndAdvance at -1]} with state align<1-16>
+; GRAPH-EMPTY:
+; GRAPH-NEXT: [AANonNull] for CtxI '  %6 = call i32* @checkAndAdvance(i32* %5)' at position {cs_ret: [@-1]} with state nonnull
+; GRAPH-NEXT:   updates [AANonNull] for CtxI '  %2 = load i32, i32* %0, align 4' at position {fn_ret:checkAndAdvance [checkAndAdvance at -1]} with state nonnull
 
 ; GRAPH-NOT: update
 
 ;
 ; Check for .dot file
 ;
-; DOT-DAG: Node[[Node0:0x[a-z0-9]+]] [shape=record,label="{[AAIsDead]
-; DOT-DAG: Node[[Node1:0x[a-z0-9]+]] [shape=record,label="{[AAPotentialValues]
-; DOT-DAG: Node[[Node2:0x[a-z0-9]+]] [shape=record,label="{[AAPotentialValues]
-; DOT-DAG: Node[[Node3:0x[a-z0-9]+]] [shape=record,label="{[AAPotentialValues]
-; DOT-DAG: Node[[Node4:0x[a-z0-9]+]] [shape=record,label="{[AAValueConstantRange]
-; DOT-DAG: Node[[Node5:0x[a-z0-9]+]] [shape=record,label="{[AAPotentialConstantValues]
-; DOT-DAG: Node[[Node6:0x[a-z0-9]+]] [shape=record,label="{[AAPotentialValues]
-; DOT-DAG: Node[[Node7:0x[a-z0-9]+]] [shape=record,label="{[AAValueConstantRange]
-; DOT-DAG: Node[[Node8:0x[a-z0-9]+]] [shape=record,label="{[AAValueConstantRange]
-; DOT-DAG: Node[[Node9:0x[a-z0-9]+]] [shape=record,label="{[AAPotentialConstantValues]
-; DOT-DAG: Node[[Node10:0x[a-z0-9]+]] [shape=record,label="{[AANoReturn]
-; DOT-DAG: Node[[Node11:0x[a-z0-9]+]] [shape=record,label="{[AANoReturn]
-; DOT-DAG: Node[[Node12:0x[a-z0-9]+]] [shape=record,label="{[AAIsDead]
-; DOT-DAG: Node[[Node13:0x[a-z0-9]+]] [shape=record,label="{[AAWillReturn]
-; DOT-DAG: Node[[Node14:0x[a-z0-9]+]] [shape=record,label="{[AAIsDead]
-; DOT-DAG: Node[[Node15:0x[a-z0-9]+]] [shape=record,label="{[AANoUnwind]
-; DOT-DAG: Node[[Node16:0x[a-z0-9]+]] [shape=record,label="{[AANoUnwind]
-; DOT-DAG: Node[[Node17:0x[a-z0-9]+]] [shape=record,label="{[AAMemoryLocation]
-; DOT-DAG: Node[[Node18:0x[a-z0-9]+]] [shape=record,label="{[AAMemoryLocation]
-; DOT-DAG: Node[[Node19:0x[a-z0-9]+]] [shape=record,label="{[AAMemoryBehavior]
-; DOT-DAG: Node[[Node20:0x[a-z0-9]+]] [shape=record,label="{[AAIsDead]
-; DOT-DAG: Node[[Node21:0x[a-z0-9]+]] [shape=record,label="{[AAIsDead]
-; DOT-DAG: Node[[Node22:0x[a-z0-9]+]] [shape=record,label="{[AAIsDead]
-; DOT-DAG: Node[[Node23:0x[a-z0-9]+]] [shape=record,label="{[AAMemoryBehavior]
-; DOT-DAG: Node[[Node24:0x[a-z0-9]+]] [shape=record,label="{[AAPotentialValues]
-; DOT-DAG: Node[[Node25:0x[a-z0-9]+]] [shape=record,label="{[AAPotentialValues]
-; DOT-DAG: Node[[Node26:0x[a-z0-9]+]] [shape=record,label="{[AAReturnedValues]
-; DOT-DAG: Node[[Node27:0x[a-z0-9]+]] [shape=record,label="{[AAPotentialValues]
-; DOT-DAG: Node[[Node28:0x[a-z0-9]+]] [shape=record,label="{[AAPotentialConstantValues]
-; DOT-DAG: Node[[Node29:0x[a-z0-9]+]] [shape=record,label="{[AAPotentialValues]
-; DOT-DAG: Node[[Node30:0x[a-z0-9]+]] [shape=record,label="{[AAPotentialValues]
-; DOT-DAG: Node[[Node31:0x[a-z0-9]+]] [shape=record,label="{[AAPotentialConstantValues]
-; DOT-DAG: Node[[Node32:0x[a-z0-9]+]] [shape=record,label="{[AAPotentialValues]
-; DOT-DAG: Node[[Node33:0x[a-z0-9]+]] [shape=record,label="{[AAPotentialValues]
-; DOT-DAG: Node[[Node34:0x[a-z0-9]+]] [shape=record,label="{[AAPotentialConstantValues]
-; DOT-DAG: Node[[Node35:0x[a-z0-9]+]] [shape=record,label="{[AAInstanceInfo]
-; DOT-DAG: Node[[Node36:0x[a-z0-9]+]] [shape=record,label="{[AANoRecurse]
-; DOT-DAG: Node[[Node37:0x[a-z0-9]+]] [shape=record,label="{[AAFunctionReachability]
-; DOT-DAG: Node[[Node38:0x[a-z0-9]+]] [shape=record,label="{[AACallEdges]
-; DOT-DAG: Node[[Node39:0x[a-z0-9]+]] [shape=record,label="{[AACallEdges]
-; DOT-DAG: Node[[Node40:0x[a-z0-9]+]] [shape=record,label="{[AAIsDead]
-; DOT-DAG: Node[[Node41:0x[a-z0-9]+]] [shape=record,label="{[AAWillReturn]
-; DOT-DAG: Node[[Node42:0x[a-z0-9]+]] [shape=record,label="{[AANoRecurse]
-; DOT-DAG: Node[[Node43:0x[a-z0-9]+]] [shape=record,label="{[AAUndefinedBehavior]
-; DOT-DAG: Node[[Node44:0x[a-z0-9]+]] [shape=record,label="{[AANoUndef]
-; DOT-DAG: Node[[Node45:0x[a-z0-9]+]] [shape=record,label="{[AANoUndef]
-; DOT-DAG: Node[[Node46:0x[a-z0-9]+]] [shape=record,label="{[AAIsDead]
-; DOT-DAG: Node[[Node47:0x[a-z0-9]+]] [shape=record,label="{[AANoUndef]
-; DOT-DAG: Node[[Node48:0x[a-z0-9]+]] [shape=record,label="{[AANoUndef]
-; DOT-DAG: Node[[Node49:0x[a-z0-9]+]] [shape=record,label="{[AANoSync]
-; DOT-DAG: Node[[Node50:0x[a-z0-9]+]] [shape=record,label="{[AANoSync]
-; DOT-DAG: Node[[Node51:0x[a-z0-9]+]] [shape=record,label="{[AANoFree]
-; DOT-DAG: Node[[Node52:0x[a-z0-9]+]] [shape=record,label="{[AANoFree]
-; DOT-DAG: Node[[Node53:0x[a-z0-9]+]] [shape=record,label="{[AAAssumptionInfo]
-; DOT-DAG: Node[[Node54:0x[a-z0-9]+]] [shape=record,label="{[AAHeapToStack]
-; DOT-DAG: Node[[Node55:0x[a-z0-9]+]] [shape=record,label="{[AAAlign]
-; DOT-DAG: Node[[Node56:0x[a-z0-9]+]] [shape=record,label="{[AAAlign]
-; DOT-DAG: Node[[Node57:0x[a-z0-9]+]] [shape=record,label="{[AAAlign]
-; DOT-DAG: Node[[Node58:0x[a-z0-9]+]] [shape=record,label="{[AAAlign]
-; DOT-DAG: Node[[Node59:0x[a-z0-9]+]] [shape=record,label="{[AANonNull]
-; DOT-DAG: Node[[Node60:0x[a-z0-9]+]] [shape=record,label="{[AANonNull]
-; DOT-DAG: Node[[Node61:0x[a-z0-9]+]] [shape=record,label="{[AANoAlias]
-; DOT-DAG: Node[[Node62:0x[a-z0-9]+]] [shape=record,label="{[AADereferenceable]
-; DOT-DAG: Node[[Node63:0x[a-z0-9]+]] [shape=record,label="{[AADereferenceable]
-; DOT-DAG: Node[[Node64:0x[a-z0-9]+]] [shape=record,label="{[AADereferenceable]
-; DOT-DAG: Node[[Node65:0x[a-z0-9]+]] [shape=record,label="{[AANonNull]
-; DOT-DAG: Node[[Node66:0x[a-z0-9]+]] [shape=record,label="{[AANonNull]
-; DOT-DAG: Node[[Node67:0x[a-z0-9]+]] [shape=record,label="{[AAIsDead]
-; DOT-DAG: Node[[Node68:0x[a-z0-9]+]] [shape=record,label="{[AANoAlias]
-; DOT-DAG: Node[[Node69:0x[a-z0-9]+]] [shape=record,label="{[AANoCapture]
-; DOT-DAG: Node[[Node70:0x[a-z0-9]+]] [shape=record,label="{[AAIsDead]
-; DOT-DAG: Node[[Node71:0x[a-z0-9]+]] [shape=record,label="{[AAIsDead]
-; DOT-DAG: Node[[Node72:0x[a-z0-9]+]] [shape=record,label="{[AANoCapture]
-; DOT-DAG: Node[[Node73:0x[a-z0-9]+]] [shape=record,label="{[AAIsDead]
-; DOT-DAG: Node[[Node74:0x[a-z0-9]+]] [shape=record,label="{[AAMemoryBehavior]
-; DOT-DAG: Node[[Node75:0x[a-z0-9]+]] [shape=record,label="{[AAMemoryBehavior]
-; DOT-DAG: Node[[Node76:0x[a-z0-9]+]] [shape=record,label="{[AANoFree]
-; DOT-DAG: Node[[Node77:0x[a-z0-9]+]] [shape=record,label="{[AAPrivatizablePtr]
-; DOT-DAG: Node[[Node78:0x[a-z0-9]+]] [shape=record,label="{[AAAssumptionInfo]
-; DOT-DAG: Node[[Node79:0x[a-z0-9]+]] [shape=record,label="{[AANoAlias]
-; DOT-DAG: Node[[Node80:0x[a-z0-9]+]] [shape=record,label="{[AANoAlias]
-; DOT-DAG: Node[[Node81:0x[a-z0-9]+]] [shape=record,label="{[AANoFree]
-; DOT-DAG: Node[[Node82:0x[a-z0-9]+]] [shape=record,label="{[AADereferenceable]
 
-; DOT-DAG: Node[[Node50]] -> Node[[Node49]];
-; DOT-DAG: Node[[Node66]] -> Node[[Node65]];
-; DOT-DAG: Node[[Node15]] -> Node[[Node16]];
-; DOT-DAG: Node[[Node52]] -> Node[[Node51]];
-; DOT-DAG: Node[[Node69]] -> Node[[Node72]];
-; DOT-DAG: Node[[Node25]] -> Node[[Node24]];
-; DOT-DAG: Node[[Node16]] -> Node[[Node15]];
-; DOT-DAG: Node[[Node17]] -> Node[[Node18]];
-; DOT-DAG: Node[[Node26]] -> Node[[Node25]];
-; DOT-DAG: Node[[Node23]] -> Node[[Node19]];
-; DOT-DAG: Node[[Node18]] -> Node[[Node17]];
-; DOT-DAG: Node[[Node75]] -> Node[[Node18]];
-; DOT-DAG: Node[[Node16]] -> Node[[Node69]];
-; DOT-DAG: Node[[Node51]] -> Node[[Node76]];
-; DOT-DAG: Node[[Node26]] -> Node[[Node55]];
-; DOT-DAG: Node[[Node27]] -> Node[[Node26]];
-; DOT-DAG: Node[[Node19]] -> Node[[Node74]];
-; DOT-DAG: Node[[Node49]] -> Node[[Node50]];
-; DOT-DAG: Node[[Node26]] -> Node[[Node59]];
-; DOT-DAG: Node[[Node66]] -> Node[[Node59]];
-; DOT-DAG: Node[[Node69]] -> Node[[Node74]];
-; DOT-DAG: Node[[Node24]] -> Node[[Node27]];
-; DOT-DAG: Node[[Node72]] -> Node[[Node69]];
-; DOT-DAG: Node[[Node19]] -> Node[[Node23]];
-; DOT-DAG: Node[[Node26]] -> Node[[Node69]];
-; DOT-DAG: Node[[Node74]] -> Node[[Node75]];
-; DOT-DAG: Node[[Node19]] -> Node[[Node69]];
-; DOT-DAG: Node[[Node76]] -> Node[[Node81]];
-; DOT-DAG: Node[[Node63]] -> Node[[Node64]];
-; DOT-DAG: Node[[Node75]] -> Node[[Node74]];
-; DOT-DAG: Node[[Node66]] -> Node[[Node66]];
-; DOT-DAG: Node[[Node51]] -> Node[[Node52]];
+; DOT-DAG: Node[[Node6:0x[a-z0-9]+]] [shape=record,label="{[AANoUnwind] for CtxI '  %2 = load i32, i32* %0, align 4' at position \{fn:checkAndAdvance [checkAndAdvance at -1]\}
+; DOT-DAG: Node[[Node34:0x[a-z0-9]+]] [shape=record,label="{[AANoCapture] for CtxI '  %2 = load i32, i32* %0, align 4' at position \{arg: [@0]\}
+; DOT-DAG: Node[[Node39:0x[a-z0-9]+]] [shape=record,label="{[AANoUnwind] for CtxI '  %6 = call i32* @checkAndAdvance(i32* %5)' at position \{cs: [@-1]\}
+; DOT-DAG: Node[[Node7:0x[a-z0-9]+]] [shape=record,label="{[AANoSync] for CtxI '  %2 = load i32, i32* %0, align 4' at position \{fn:checkAndAdvance [checkAndAdvance at -1]\}
+; DOT-DAG: Node[[Node61:0x[a-z0-9]+]] [shape=record,label="{[AANoSync] for CtxI '  %6 = call i32* @checkAndAdvance(i32* %5)' at position \{cs: [@-1]\}
+; DOT-DAG: Node[[Node13:0x[a-z0-9]+]] [shape=record,label="{[AANoFree] for CtxI '  %2 = load i32, i32* %0, align 4' at position \{fn:checkAndAdvance [checkAndAdvance at -1]\}
+; DOT-DAG: Node[[Node36:0x[a-z0-9]+]] [shape=record,label="{[AANoFree] for CtxI '  %2 = load i32, i32* %0, align 4' at position \{arg: [@0]\}
+; DOT-DAG: Node[[Node62:0x[a-z0-9]+]] [shape=record,label="{[AANoFree] for CtxI '  %6 = call i32* @checkAndAdvance(i32* %5)' at position \{cs: [@-1]\}
+; DOT-DAG: Node[[Node16:0x[a-z0-9]+]] [shape=record,label="{[AAMemoryBehavior] for CtxI '  %2 = load i32, i32* %0, align 4' at position \{fn:checkAndAdvance [checkAndAdvance at -1]\}
+; DOT-DAG: Node[[Node35:0x[a-z0-9]+]] [shape=record,label="{[AAMemoryBehavior] for CtxI '  %2 = load i32, i32* %0, align 4' at position \{arg: [@0]\}
+; DOT-DAG: Node[[Node40:0x[a-z0-9]+]] [shape=record,label="{[AAMemoryBehavior] for CtxI '  %6 = call i32* @checkAndAdvance(i32* %5)' at position \{cs: [@-1]\}
+; DOT-DAG: Node[[Node17:0x[a-z0-9]+]] [shape=record,label="{[AAMemoryLocation] for CtxI '  %2 = load i32, i32* %0, align 4' at position \{fn:checkAndAdvance [checkAndAdvance at -1]\}
+; DOT-DAG: Node[[Node63:0x[a-z0-9]+]] [shape=record,label="{[AAMemoryLocation] for CtxI '  %6 = call i32* @checkAndAdvance(i32* %5)' at position \{cs: [@-1]\}
+; DOT-DAG: Node[[Node22:0x[a-z0-9]+]] [shape=record,label="{[AAAlign] for CtxI '  %2 = load i32, i32* %0, align 4' at position \{fn_ret:checkAndAdvance [checkAndAdvance at -1]\}
+; DOT-DAG: Node[[Node65:0x[a-z0-9]+]] [shape=record,label="{[AAAlign] for CtxI '  %6 = call i32* @checkAndAdvance(i32* %5)' at position \{cs_ret: [@-1]\}
+; DOT-DAG: Node[[Node23:0x[a-z0-9]+]] [shape=record,label="{[AANonNull] for CtxI '  %2 = load i32, i32* %0, align 4' at position \{fn_ret:checkAndAdvance [checkAndAdvance at -1]\}
+; DOT-DAG: Node[[Node67:0x[a-z0-9]+]] [shape=record,label="{[AANonNull] for CtxI '  %6 = call i32* @checkAndAdvance(i32* %5)' at position \{cs_ret: [@-1]\}
+; DOT-DAG: Node[[Node43:0x[a-z0-9]+]] [shape=record,label="{[AANoCapture] for CtxI '  %6 = call i32* @checkAndAdvance(i32* %5)' at position \{cs_arg: [@0]\}
+; DOT-DAG: Node[[Node45:0x[a-z0-9]+]] [shape=record,label="{[AAMemoryBehavior] for CtxI '  %6 = call i32* @checkAndAdvance(i32* %5)' at position \{cs_arg: [@0]\}
+; DOT-DAG: Node[[Node46:0x[a-z0-9]+]] [shape=record,label="{[AANoFree] for CtxI '  %6 = call i32* @checkAndAdvance(i32* %5)' at position \{cs_arg: [@0]\}
+; DOT-DAG: Node[[Node38:0x[a-z0-9]+]] [shape=record,label="{[AAIsDead] for CtxI '  %6 = call i32* @checkAndAdvance(i32* %5)' at position \{flt: [@-1]\}
+; DOT-DAG: Node[[Node55:0x[a-z0-9]+]] [shape=record,label="{[AANonNull] for CtxI '  %5 = getelementptr inbounds i32, i32* %0, i64 4' at position \{flt: [@-1]\}
+; DOT-DAG: Node[[Node31:0x[a-x0-9]+]] [shape=record,label="{[AANonNull] for CtxI '  %6 = call i32* @checkAndAdvance(i32* %5)' at position \{cs_arg: [@0]\}
+
+; DOT-DAG: Node[[Node6]] -> Node[[Node34]]
+; DOT-DAG: Node[[Node6]] -> Node[[Node39]]
+; DOT-DAG: Node[[Node7]] -> Node[[Node61]]
+; DOT-DAG: Node[[Node13]] -> Node[[Node36]]
+; DOT-DAG: Node[[Node13]] -> Node[[Node62]]
+; DOT-DAG: Node[[Node16]] -> Node[[Node34]]
+; DOT-DAG: Node[[Node16]] -> Node[[Node35]]
+; DOT-DAG: Node[[Node16]] -> Node[[Node40]]
+; DOT-DAG: Node[[Node17]] -> Node[[Node63]]
+; DOT-DAG: Node[[Node22]] -> Node[[Node65]]
+; DOT-DAG: Node[[Node23]] -> Node[[Node67]]
+; DOT-DAG: Node[[Node34]] -> Node[[Node43]]
+; DOT-DAG: Node[[Node35]] -> Node[[Node45]]
+; DOT-DAG: Node[[Node36]] -> Node[[Node46]]
+; DOT-DAG: Node[[Node39]] -> Node[[Node6]]
+; DOT-DAG: Node[[Node40]] -> Node[[Node16]]
+; DOT-DAG: Node[[Node43]] -> Node[[Node34]]
+; DOT-DAG: Node[[Node45]] -> Node[[Node17]]
+; DOT-DAG: Node[[Node55]] -> Node[[Node55]]
+; DOT-DAG: Node[[Node55]] -> Node[[Node31]]
+; DOT-DAG: Node[[Node55]] -> Node[[Node23]]
+; DOT-DAG: Node[[Node61]] -> Node[[Node7]]
+; DOT-DAG: Node[[Node62]] -> Node[[Node13]]
+; DOT-DAG: Node[[Node63]] -> Node[[Node17]]
+; DOT-DAG: Node[[Node65]] -> Node[[Node22]]
+; DOT-DAG: Node[[Node67]] -> Node[[Node23]]
 ;.
 ; CHECK: attributes #[[ATTR0]] = { argmemonly nofree nosync nounwind readonly }
 ; CHECK: attributes #[[ATTR1]] = { nofree nosync nounwind readonly }

diff  --git a/llvm/test/Transforms/Attributor/dereferenceable-1.ll b/llvm/test/Transforms/Attributor/dereferenceable-1.ll
index e32b4520eba2b..fa552f82c6b43 100644
--- a/llvm/test/Transforms/Attributor/dereferenceable-1.ll
+++ b/llvm/test/Transforms/Attributor/dereferenceable-1.ll
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=21 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=21 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
+; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=16 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=16 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
 ; RUN: opt -attributor-cgscc -enable-new-pm=0 -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_NPM,IS__CGSCC____,IS________OPM,IS__CGSCC_OPM
 ; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM
 ; FIXME: Figure out why we need 16 iterations here.
@@ -945,10 +945,9 @@ define void @max_offset(i1 %c) {
 ; CHECK-NEXT:  entry:
 ; CHECK-NEXT:    br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
 ; CHECK:       t:
-; CHECK-NEXT:    [[GEP:%.*]] = getelementptr i8, i8* bitcast (i64* @g to i8*), i64 2
 ; CHECK-NEXT:    br label [[F]]
 ; CHECK:       f:
-; CHECK-NEXT:    [[PHI:%.*]] = phi i8* [ [[GEP]], [[T]] ], [ bitcast (i64* @g to i8*), [[ENTRY:%.*]] ]
+; CHECK-NEXT:    [[PHI:%.*]] = phi i8* [ getelementptr (i8, i8* bitcast (i64* @g to i8*), i64 2), [[T]] ], [ bitcast (i64* @g to i8*), [[ENTRY:%.*]] ]
 ; CHECK-NEXT:    call void @unknown_use8(i8* noundef align 2 dereferenceable_or_null(6) [[PHI]]) #[[ATTR1]]
 ; CHECK-NEXT:    ret void
 ;

diff  --git a/llvm/test/Transforms/Attributor/heap_to_stack.ll b/llvm/test/Transforms/Attributor/heap_to_stack.ll
index bdc8eafdf46ca..edcec139401c1 100644
--- a/llvm/test/Transforms/Attributor/heap_to_stack.ll
+++ b/llvm/test/Transforms/Attributor/heap_to_stack.ll
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
 ; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=5 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=12 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=8 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
 ; RUN: opt -attributor-cgscc -enable-new-pm=0 -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_NPM,IS__CGSCC____,IS________OPM,IS__CGSCC_OPM
 ; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM
 
@@ -587,8 +587,9 @@ define i32 @irreducible_cfg(i32 %0) {
 ; IS________NPM-NEXT:    [[TMP14]] = add nsw i32 [[DOT1]], 1
 ; IS________NPM-NEXT:    br label [[TMP8]]
 ; IS________NPM:       15:
-; IS________NPM-NEXT:    [[TMP16:%.*]] = load i32, i32* [[TMP3]], align 4
-; IS________NPM-NEXT:    ret i32 [[TMP16]]
+; IS________NPM-NEXT:    [[TMP16:%.*]] = bitcast i32* [[TMP3]] to i8*
+; IS________NPM-NEXT:    [[TMP17:%.*]] = load i32, i32* [[TMP3]], align 4
+; IS________NPM-NEXT:    ret i32 [[TMP17]]
 ;
   %2 = call noalias i8* @malloc(i64 4)
   %3 = bitcast i8* %2 to i32*

diff  --git a/llvm/test/Transforms/Attributor/internal-noalias.ll b/llvm/test/Transforms/Attributor/internal-noalias.ll
index a9b4bb4d178c5..95046349bb6c5 100644
--- a/llvm/test/Transforms/Attributor/internal-noalias.ll
+++ b/llvm/test/Transforms/Attributor/internal-noalias.ll
@@ -1,13 +1,13 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=7 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=7 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
+; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=2 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=2 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
 ; RUN: opt -attributor-cgscc -enable-new-pm=0 -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_NPM,IS__CGSCC____,IS________OPM,IS__CGSCC_OPM
 ; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM
 
 define dso_local i32 @visible(i32* noalias %A, i32* noalias %B) #0 {
 ; IS__TUNIT____: Function Attrs: argmemonly nofree noinline norecurse nosync nounwind readonly willreturn uwtable
 ; IS__TUNIT____-LABEL: define {{[^@]+}}@visible
-; IS__TUNIT____-SAME: (i32* noalias nocapture nofree readonly [[A:%.*]], i32* noalias nocapture nofree readonly align 4 [[B:%.*]]) #[[ATTR0:[0-9]+]] {
+; IS__TUNIT____-SAME: (i32* noalias nocapture nofree readonly align 4 [[A:%.*]], i32* noalias nocapture nofree readonly align 4 [[B:%.*]]) #[[ATTR0:[0-9]+]] {
 ; IS__TUNIT____-NEXT:  entry:
 ; IS__TUNIT____-NEXT:    [[CALL1:%.*]] = call i32 @noalias_args(i32* noalias nocapture nofree readonly align 4 [[A]], i32* noalias nocapture nofree readonly align 4 [[B]]) #[[ATTR3:[0-9]+]]
 ; IS__TUNIT____-NEXT:    [[CALL2:%.*]] = call i32 @noalias_args_argmem(i32* noalias nocapture nofree readonly align 4 [[A]], i32* noalias nocapture nofree readonly align 4 [[B]]) #[[ATTR3]]
@@ -166,7 +166,7 @@ define i32 @visible_local_2() {
 ; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
 ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@visible_local_2
 ; IS__CGSCC_NPM-SAME: () #[[ATTR3:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT:    [[CALL:%.*]] = call i32 @noalias_args_argmem_ro(i32 5, i32 5) #[[ATTR6:[0-9]+]]
+; IS__CGSCC_NPM-NEXT:    [[CALL:%.*]] = call i32 @noalias_args_argmem_ro(i32 noundef 5, i32 noundef 5) #[[ATTR6:[0-9]+]]
 ; IS__CGSCC_NPM-NEXT:    ret i32 [[CALL]]
 ;
   %B = alloca i32, align 4

diff  --git a/llvm/test/Transforms/Attributor/liveness.ll b/llvm/test/Transforms/Attributor/liveness.ll
index 781d99ad1072e..1af967dafd983 100644
--- a/llvm/test/Transforms/Attributor/liveness.ll
+++ b/llvm/test/Transforms/Attributor/liveness.ll
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=43 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=43 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
+; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=30 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=30 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
 ; TODO: The old pass manager cgscc run is disabled as it causes a crash on windows which is under investigation: http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/23151
 ; opt -attributor-cgscc -enable-new-pm=0 -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_NPM,IS__CGSCC____,IS________OPM,IS__CGSCC_OPM
 ; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM
@@ -507,15 +507,17 @@ define void @ub(i32* %0) {
 ; IS________OPM-NEXT:    store i32 0, i32* [[TMP0]], align 4
 ; IS________OPM-NEXT:    ret void
 ;
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; IS__TUNIT_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
 ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@ub
 ; IS__TUNIT_NPM-SAME: (i32* nocapture nofree readnone [[TMP0:%.*]]) #[[ATTR7:[0-9]+]] {
-; IS__TUNIT_NPM-NEXT:    unreachable
+; IS__TUNIT_NPM-NEXT:    store i32 0, i32* undef, align 4294967296
+; IS__TUNIT_NPM-NEXT:    ret void
 ;
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@ub
-; IS__CGSCC____-SAME: (i32* nocapture nofree readnone [[TMP0:%.*]]) #[[ATTR6]] {
-; IS__CGSCC____-NEXT:    unreachable
+; IS__CGSCC____-SAME: (i32* nocapture nofree readnone [[TMP0:%.*]]) #[[ATTR9:[0-9]+]] {
+; IS__CGSCC____-NEXT:    store i32 0, i32* undef, align 4294967296
+; IS__CGSCC____-NEXT:    ret void
 ;
   %poison = sub nuw i32 0, 1           ; Results in a poison value.
   %still_poison = and i32 %poison, 0   ; 0, but also poison.
@@ -535,7 +537,7 @@ define void @inf_loop() #0 {
 ;
 ; IS__CGSCC____: Function Attrs: nofree norecurse noreturn nosync nounwind readnone
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@inf_loop
-; IS__CGSCC____-SAME: () #[[ATTR9:[0-9]+]] {
+; IS__CGSCC____-SAME: () #[[ATTR10:[0-9]+]] {
 ; IS__CGSCC____-NEXT:  entry:
 ; IS__CGSCC____-NEXT:    br label [[WHILE_BODY:%.*]]
 ; IS__CGSCC____:       while.body:
@@ -597,7 +599,7 @@ define void @rec() #0 {
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@rec
-; IS__CGSCC____-SAME: () #[[ATTR10:[0-9]+]] {
+; IS__CGSCC____-SAME: () #[[ATTR11:[0-9]+]] {
 ; IS__CGSCC____-NEXT:  entry:
 ; IS__CGSCC____-NEXT:    ret void
 ;
@@ -793,24 +795,17 @@ define internal i8* @f3(i8* readnone %0) local_unnamed_addr #0 {
 
 declare void @sink() nofree nosync nounwind willreturn
 define void @test_unreachable() {
-; IS________OPM: Function Attrs: nofree noreturn nosync nounwind
-; IS________OPM-LABEL: define {{[^@]+}}@test_unreachable
-; IS________OPM-SAME: () #[[ATTR0]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13:[0-9]+]]
-; IS________OPM-NEXT:    call void @test_unreachable() #[[ATTR0]]
-; IS________OPM-NEXT:    unreachable
-;
-; IS__TUNIT_NPM: Function Attrs: nofree noreturn nosync nounwind
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@test_unreachable
-; IS__TUNIT_NPM-SAME: () #[[ATTR0]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12:[0-9]+]]
-; IS__TUNIT_NPM-NEXT:    call void @test_unreachable() #[[ATTR0]]
-; IS__TUNIT_NPM-NEXT:    unreachable
+; NOT_CGSCC_NPM: Function Attrs: nofree noreturn nosync nounwind
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@test_unreachable
+; NOT_CGSCC_NPM-SAME: () #[[ATTR0]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13:[0-9]+]]
+; NOT_CGSCC_NPM-NEXT:    call void @test_unreachable() #[[ATTR0]]
+; NOT_CGSCC_NPM-NEXT:    unreachable
 ;
 ; IS__CGSCC____: Function Attrs: nofree noreturn nosync nounwind
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@test_unreachable
 ; IS__CGSCC____-SAME: () #[[ATTR0]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14:[0-9]+]]
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15:[0-9]+]]
 ; IS__CGSCC____-NEXT:    call void @test_unreachable() #[[ATTR0]]
 ; IS__CGSCC____-NEXT:    unreachable
 ;
@@ -891,28 +886,28 @@ define internal void @middle() {
 ;
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@middle() {
 ; IS__CGSCC____-NEXT:  bb0:
-; IS__CGSCC____-NEXT:    call void @non_dead_b0() #[[ATTR14]]
-; IS__CGSCC____-NEXT:    call void @non_dead_b1() #[[ATTR14]]
-; IS__CGSCC____-NEXT:    call void @non_dead_b2() #[[ATTR14]]
-; IS__CGSCC____-NEXT:    call void @non_dead_b3() #[[ATTR14]]
+; IS__CGSCC____-NEXT:    call void @non_dead_b0() #[[ATTR15]]
+; IS__CGSCC____-NEXT:    call void @non_dead_b1() #[[ATTR15]]
+; IS__CGSCC____-NEXT:    call void @non_dead_b2() #[[ATTR15]]
+; IS__CGSCC____-NEXT:    call void @non_dead_b3() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    br label [[BB1:%.*]]
 ; IS__CGSCC____:       bb1:
-; IS__CGSCC____-NEXT:    call void @non_dead_b4() #[[ATTR14]]
-; IS__CGSCC____-NEXT:    call void @non_dead_b5() #[[ATTR14]]
-; IS__CGSCC____-NEXT:    call void @non_dead_b6() #[[ATTR14]]
-; IS__CGSCC____-NEXT:    call void @non_dead_b7() #[[ATTR14]]
+; IS__CGSCC____-NEXT:    call void @non_dead_b4() #[[ATTR15]]
+; IS__CGSCC____-NEXT:    call void @non_dead_b5() #[[ATTR15]]
+; IS__CGSCC____-NEXT:    call void @non_dead_b6() #[[ATTR15]]
+; IS__CGSCC____-NEXT:    call void @non_dead_b7() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    br label [[BB2:%.*]]
 ; IS__CGSCC____:       bb2:
-; IS__CGSCC____-NEXT:    call void @non_dead_b8() #[[ATTR14]]
-; IS__CGSCC____-NEXT:    call void @non_dead_b9() #[[ATTR14]]
-; IS__CGSCC____-NEXT:    call void @non_dead_b10() #[[ATTR14]]
-; IS__CGSCC____-NEXT:    call void @non_dead_b11() #[[ATTR14]]
+; IS__CGSCC____-NEXT:    call void @non_dead_b8() #[[ATTR15]]
+; IS__CGSCC____-NEXT:    call void @non_dead_b9() #[[ATTR15]]
+; IS__CGSCC____-NEXT:    call void @non_dead_b10() #[[ATTR15]]
+; IS__CGSCC____-NEXT:    call void @non_dead_b11() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    br label [[BB3:%.*]]
 ; IS__CGSCC____:       bb3:
-; IS__CGSCC____-NEXT:    call void @non_dead_b12() #[[ATTR14]]
-; IS__CGSCC____-NEXT:    call void @non_dead_b13() #[[ATTR14]]
-; IS__CGSCC____-NEXT:    call void @non_dead_b14() #[[ATTR14]]
-; IS__CGSCC____-NEXT:    call void @non_dead_b15() #[[ATTR14]]
+; IS__CGSCC____-NEXT:    call void @non_dead_b12() #[[ATTR15]]
+; IS__CGSCC____-NEXT:    call void @non_dead_b13() #[[ATTR15]]
+; IS__CGSCC____-NEXT:    call void @non_dead_b14() #[[ATTR15]]
+; IS__CGSCC____-NEXT:    call void @non_dead_b15() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    br label [[BB4:%.*]]
 ; IS__CGSCC____:       bb4:
 ; IS__CGSCC____-NEXT:    call void @non_exact2()
@@ -1029,1408 +1024,1024 @@ define linkonce_odr void @non_exact3() {
 }
 
 define internal void @non_dead_a0() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_a0
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_a0
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a0
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a0
-; IS__CGSCC____-SAME: () #[[ATTR11:[0-9]+]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12:[0-9]+]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_a1() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_a1
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_a1
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a1
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a1
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_a2() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_a2
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_a2
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a2
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a2
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_a3() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_a3
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_a3
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a3
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a3
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_a4() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_a4
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_a4
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a4
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a4
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_a5() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_a5
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_a5
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a5
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a5
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_a6() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_a6
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_a6
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a6
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a6
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_a7() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_a7
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_a7
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a7
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a7
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_a8() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_a8
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_a8
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a8
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a8
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_a9() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_a9
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_a9
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a9
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a9
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_a10() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_a10
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_a10
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a10
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a10
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_a11() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_a11
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_a11
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a11
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a11
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_a12() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_a12
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_a12
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a12
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a12
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_a13() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_a13
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_a13
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a13
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a13
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_a14() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_a14
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_a14
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a14
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a14
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_a15() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_a15
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_a15
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_a15
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_a15
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_b0() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_b0
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_b0
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b0
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b0
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_b1() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_b1
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_b1
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b1
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b1
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_b2() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_b2
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_b2
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b2
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b2
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_b3() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_b3
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_b3
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b3
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b3
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_b4() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_b4
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_b4
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b4
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b4
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_b5() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_b5
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_b5
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b5
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b5
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_b6() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_b6
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_b6
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b6
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b6
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_b7() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_b7
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_b7
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b7
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b7
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_b8() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_b8
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_b8
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b8
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b8
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_b9() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_b9
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_b9
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b9
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b9
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_b10() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_b10
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_b10
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b10
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b10
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_b11() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_b11
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_b11
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b11
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b11
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_b12() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_b12
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_b12
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b12
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b12
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_b13() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_b13
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_b13
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b13
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b13
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_b14() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_b14
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_b14
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b14
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b14
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_b15() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_b15
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_b15
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_b15
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_b15
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_c0() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_c0
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_c0
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c0
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c0
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_c1() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_c1
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_c1
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c1
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c1
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_c2() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_c2
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_c2
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c2
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c2
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_c3() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_c3
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_c3
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c3
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c3
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_c4() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_c4
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_c4
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c4
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c4
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_c5() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_c5
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_c5
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c5
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c5
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_c6() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_c6
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_c6
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c6
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c6
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_c7() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_c7
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_c7
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c7
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c7
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_c8() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_c8
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_c8
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c8
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c8
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_c9() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_c9
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_c9
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c9
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c9
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_c10() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_c10
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_c10
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c10
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c10
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_c11() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_c11
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_c11
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c11
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c11
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_c12() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_c12
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_c12
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c12
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c12
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_c13() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_c13
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_c13
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c13
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c13
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_c14() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_c14
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_c14
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c14
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c14
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_c15() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_c15
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_c15
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_c15
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_c15
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_d0() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_d0
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_d0
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d0
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d0
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_d1() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_d1
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_d1
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d1
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d1
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_d2() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_d2
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_d2
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d2
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d2
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_d3() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_d3
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_d3
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d3
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d3
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_d4() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_d4
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_d4
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d4
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d4
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_d5() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_d5
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_d5
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d5
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d5
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_d6() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_d6
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_d6
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d6
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d6
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_d7() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_d7
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_d7
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d7
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d7
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_d8() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_d8
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_d8
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d8
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d8
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_d9() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_d9
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_d9
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d9
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d9
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_d10() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_d10
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_d10
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d10
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d10
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_d11() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_d11
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_d11
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d11
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d11
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_d12() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_d12
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_d12
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d12
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d12
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_d13() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_d13
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_d13
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d13
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d13
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_d14() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_d14
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_d14
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d14
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d14
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
   ret void
 }
 define internal void @non_dead_d15() {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@non_dead_d15
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@non_dead_d15
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@non_dead_d15
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@non_dead_d15
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
@@ -2493,22 +2104,16 @@ live_with_dead_entry:
 }
 
 define internal void @useless_arg_sink(i32* %a) {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@useless_arg_sink
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@useless_arg_sink
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@useless_arg_sink
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@useless_arg_sink
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @sink()
@@ -2524,8 +2129,8 @@ define internal void @useless_arg_almost_sink(i32* %a) {
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@useless_arg_almost_sink
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    call void @useless_arg_sink() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    call void @useless_arg_sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @useless_arg_sink(i32* %a)
@@ -2566,44 +2171,30 @@ define void @useless_arg_ext_int_ext(i32* %a) {
 ; FIXME: We should fold terminators.
 
 define internal i32 @switch_default(i64 %i) nounwind {
-; IS________OPM: Function Attrs: nofree nosync nounwind willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@switch_default
-; IS________OPM-SAME: () #[[ATTR10]] {
-; IS________OPM-NEXT:  entry:
-; IS________OPM-NEXT:    switch i64 0, label [[SW_DEFAULT:%.*]] [
-; IS________OPM-NEXT:    i64 3, label [[RETURN:%.*]]
-; IS________OPM-NEXT:    i64 10, label [[RETURN]]
-; IS________OPM-NEXT:    ]
-; IS________OPM:       sw.default:
-; IS________OPM-NEXT:    call void @sink() #[[ATTR13]]
-; IS________OPM-NEXT:    ret i32 undef
-; IS________OPM:       return:
-; IS________OPM-NEXT:    unreachable
-;
-; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@switch_default
-; IS__TUNIT_NPM-SAME: () #[[ATTR10]] {
-; IS__TUNIT_NPM-NEXT:  entry:
-; IS__TUNIT_NPM-NEXT:    switch i64 0, label [[SW_DEFAULT:%.*]] [
-; IS__TUNIT_NPM-NEXT:    i64 3, label [[RETURN:%.*]]
-; IS__TUNIT_NPM-NEXT:    i64 10, label [[RETURN]]
-; IS__TUNIT_NPM-NEXT:    ]
-; IS__TUNIT_NPM:       sw.default:
-; IS__TUNIT_NPM-NEXT:    call void @sink() #[[ATTR12]]
-; IS__TUNIT_NPM-NEXT:    ret i32 undef
-; IS__TUNIT_NPM:       return:
-; IS__TUNIT_NPM-NEXT:    unreachable
+; NOT_CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@switch_default
+; NOT_CGSCC_NPM-SAME: () #[[ATTR10]] {
+; NOT_CGSCC_NPM-NEXT:  entry:
+; NOT_CGSCC_NPM-NEXT:    switch i64 0, label [[SW_DEFAULT:%.*]] [
+; NOT_CGSCC_NPM-NEXT:    i64 3, label [[RETURN:%.*]]
+; NOT_CGSCC_NPM-NEXT:    i64 10, label [[RETURN]]
+; NOT_CGSCC_NPM-NEXT:    ]
+; NOT_CGSCC_NPM:       sw.default:
+; NOT_CGSCC_NPM-NEXT:    call void @sink() #[[ATTR13]]
+; NOT_CGSCC_NPM-NEXT:    ret i32 undef
+; NOT_CGSCC_NPM:       return:
+; NOT_CGSCC_NPM-NEXT:    unreachable
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@switch_default
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
 ; IS__CGSCC____-NEXT:  entry:
 ; IS__CGSCC____-NEXT:    switch i64 0, label [[SW_DEFAULT:%.*]] [
 ; IS__CGSCC____-NEXT:    i64 3, label [[RETURN:%.*]]
 ; IS__CGSCC____-NEXT:    i64 10, label [[RETURN]]
 ; IS__CGSCC____-NEXT:    ]
 ; IS__CGSCC____:       sw.default:
-; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR14]]
+; IS__CGSCC____-NEXT:    call void @sink() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret i32 123
 ; IS__CGSCC____:       return:
 ; IS__CGSCC____-NEXT:    unreachable
@@ -2631,8 +2222,8 @@ define i32 @switch_default_caller() {
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@switch_default_caller
-; IS__CGSCC____-SAME: () #[[ATTR11]] {
-; IS__CGSCC____-NEXT:    [[CALL2:%.*]] = tail call noundef i32 @switch_default() #[[ATTR14]]
+; IS__CGSCC____-SAME: () #[[ATTR12]] {
+; IS__CGSCC____-NEXT:    [[CALL2:%.*]] = tail call noundef i32 @switch_default() #[[ATTR15]]
 ; IS__CGSCC____-NEXT:    ret i32 [[CALL2]]
 ;
   %call2 = tail call i32 @switch_default(i64 0)
@@ -2667,20 +2258,15 @@ return:
 }
 
 define i32 @switch_default_dead_caller() {
-; IS________OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@switch_default_dead_caller
-; IS________OPM-SAME: () #[[ATTR11:[0-9]+]] {
-; IS________OPM-NEXT:    ret i32 123
-;
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@switch_default_dead_caller
-; IS__TUNIT_NPM-SAME: () #[[ATTR7]] {
-; IS__TUNIT_NPM-NEXT:    ret i32 123
+; NOT_CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@switch_default_dead_caller
+; NOT_CGSCC_NPM-SAME: () #[[ATTR11:[0-9]+]] {
+; NOT_CGSCC_NPM-NEXT:    ret i32 123
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@switch_default_dead_caller
-; IS__CGSCC____-SAME: () #[[ATTR10]] {
-; IS__CGSCC____-NEXT:    [[CALL2:%.*]] = tail call noundef i32 @switch_default_dead() #[[ATTR15:[0-9]+]]
+; IS__CGSCC____-SAME: () #[[ATTR11]] {
+; IS__CGSCC____-NEXT:    [[CALL2:%.*]] = tail call noundef i32 @switch_default_dead() #[[ATTR16:[0-9]+]]
 ; IS__CGSCC____-NEXT:    ret i32 [[CALL2]]
 ;
   %call2 = tail call i32 @switch_default_dead(i64 0)
@@ -2698,19 +2284,29 @@ define void @call_via_pointer_with_dead_args(i32* %a, i32* %b, void (i32*, i32*,
 }
 
 define internal void @call_via_pointer_with_dead_args_internal_a(i32* %a, i32* %b, void (i32*, i32*, i32*, i64, i32**)* %fp) {
-; CHECK-LABEL: define {{[^@]+}}@call_via_pointer_with_dead_args_internal_a
-; CHECK-SAME: (i32* [[A:%.*]], i32* noundef nonnull align 128 dereferenceable(4) [[B:%.*]]) {
-; CHECK-NEXT:    call void poison(i32* [[A]], i32* nonnull align 128 dereferenceable(4) [[B]], i32* [[A]], i64 -1, i32** null)
-; CHECK-NEXT:    ret void
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@call_via_pointer_with_dead_args_internal_a
+; NOT_CGSCC_NPM-SAME: (i32* [[A:%.*]], i32* noundef nonnull align 128 dereferenceable(4) [[B:%.*]]) {
+; NOT_CGSCC_NPM-NEXT:    call void poison(i32* [[A]], i32* nonnull align 128 dereferenceable(4) [[B]], i32* [[A]], i64 -1, i32** null)
+; NOT_CGSCC_NPM-NEXT:    ret void
+;
+; IS__CGSCC____-LABEL: define {{[^@]+}}@call_via_pointer_with_dead_args_internal_a
+; IS__CGSCC____-SAME: (i32* [[A:%.*]], i32* noundef nonnull align 128 dereferenceable(4) [[B:%.*]], void (i32*, i32*, i32*, i64, i32**)* nocapture nofree noundef nonnull [[FP:%.*]]) {
+; IS__CGSCC____-NEXT:    call void [[FP]](i32* [[A]], i32* nonnull align 128 dereferenceable(4) [[B]], i32* [[A]], i64 -1, i32** null)
+; IS__CGSCC____-NEXT:    ret void
 ;
   call void %fp(i32* %a, i32* %b, i32* %a, i64 -1, i32** null)
   ret void
 }
 define internal void @call_via_pointer_with_dead_args_internal_b(i32* %a, i32* %b, void (i32*, i32*, i32*, i64, i32**)* %fp) {
-; CHECK-LABEL: define {{[^@]+}}@call_via_pointer_with_dead_args_internal_b
-; CHECK-SAME: (i32* [[A:%.*]], i32* noundef nonnull align 128 dereferenceable(4) [[B:%.*]]) {
-; CHECK-NEXT:    call void poison(i32* [[A]], i32* nonnull align 128 dereferenceable(4) [[B]], i32* [[A]], i64 -1, i32** null)
-; CHECK-NEXT:    ret void
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@call_via_pointer_with_dead_args_internal_b
+; NOT_CGSCC_NPM-SAME: (i32* [[A:%.*]], i32* noundef nonnull align 128 dereferenceable(4) [[B:%.*]]) {
+; NOT_CGSCC_NPM-NEXT:    call void poison(i32* [[A]], i32* nonnull align 128 dereferenceable(4) [[B]], i32* [[A]], i64 -1, i32** null)
+; NOT_CGSCC_NPM-NEXT:    ret void
+;
+; IS__CGSCC____-LABEL: define {{[^@]+}}@call_via_pointer_with_dead_args_internal_b
+; IS__CGSCC____-SAME: (i32* [[A:%.*]], i32* noundef nonnull align 128 dereferenceable(4) [[B:%.*]], void (i32*, i32*, i32*, i64, i32**)* nocapture nofree noundef nonnull [[FP:%.*]]) {
+; IS__CGSCC____-NEXT:    call void [[FP]](i32* [[A]], i32* nonnull align 128 dereferenceable(4) [[B]], i32* [[A]], i64 -1, i32** null)
+; IS__CGSCC____-NEXT:    ret void
 ;
   call void %fp(i32* %a, i32* %b, i32* %a, i64 -1, i32** null)
   ret void
@@ -2736,8 +2332,8 @@ define void @call_via_pointer_with_dead_args_caller(i32* %a, i32* %b) {
 ; IS__CGSCC____-NEXT:    [[PTR4:%.*]] = alloca i32, align 128
 ; IS__CGSCC____-NEXT:    call void @call_via_pointer_with_dead_args(i32* [[A]], i32* noundef nonnull align 128 dereferenceable(4) [[PTR1]], void (i32*, i32*, i32*, i64, i32**)* nocapture nofree noundef nonnull @called_via_pointer)
 ; IS__CGSCC____-NEXT:    call void @call_via_pointer_with_dead_args(i32* [[A]], i32* noundef nonnull align 128 dereferenceable(4) [[PTR2]], void (i32*, i32*, i32*, i64, i32**)* nocapture nofree noundef nonnull @called_via_pointer_internal_1)
-; IS__CGSCC____-NEXT:    call void @call_via_pointer_with_dead_args_internal_a(i32* [[B]], i32* noundef nonnull align 128 dereferenceable(4) [[PTR3]])
-; IS__CGSCC____-NEXT:    call void @call_via_pointer_with_dead_args_internal_b(i32* [[B]], i32* noundef nonnull align 128 dereferenceable(4) [[PTR4]])
+; IS__CGSCC____-NEXT:    call void @call_via_pointer_with_dead_args_internal_a(i32* [[B]], i32* noundef nonnull align 128 dereferenceable(4) [[PTR3]], void (i32*, i32*, i32*, i64, i32**)* nocapture nofree noundef nonnull @called_via_pointer)
+; IS__CGSCC____-NEXT:    call void @call_via_pointer_with_dead_args_internal_b(i32* [[B]], i32* noundef nonnull align 128 dereferenceable(4) [[PTR4]], void (i32*, i32*, i32*, i64, i32**)* nocapture nofree noundef nonnull @called_via_pointer_internal_2)
 ; IS__CGSCC____-NEXT:    ret void
 ;
   %ptr1 = alloca i32, align 128
@@ -2779,7 +2375,7 @@ entry:
 ; FIXME: Figure out why the MODULE has the unused arguments still
 define internal void @called_via_pointer_internal_2(i32* %a, i32* %b, i32* %c, i64 %d, i32** %e) {
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@called_via_pointer_internal_2
-; IS__CGSCC____-SAME: (i32* [[A:%.*]], i32* [[B:%.*]], i32* [[C:%.*]], i64 [[D:%.*]], i32** [[E:%.*]]) {
+; IS__CGSCC____-SAME: (i32* [[A:%.*]], i32* nocapture nofree readnone [[B:%.*]], i32* nocapture nofree readnone [[C:%.*]], i64 [[D:%.*]], i32** nocapture nofree readnone [[E:%.*]]) {
 ; IS__CGSCC____-NEXT:  entry:
 ; IS__CGSCC____-NEXT:    tail call void @use_i32p(i32* [[A]])
 ; IS__CGSCC____-NEXT:    tail call void @use_i32p(i32* [[A]])
@@ -2813,7 +2409,7 @@ define internal void @dead_with_blockaddress_users(i32* nocapture %pc) nounwind
 ;
 ; IS__CGSCC____: Function Attrs: nounwind readonly
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@dead_with_blockaddress_users
-; IS__CGSCC____-SAME: (i32* nocapture [[PC:%.*]]) #[[ATTR12:[0-9]+]] {
+; IS__CGSCC____-SAME: (i32* nocapture [[PC:%.*]]) #[[ATTR13:[0-9]+]] {
 ; IS__CGSCC____-NEXT:  entry:
 ; IS__CGSCC____-NEXT:    br label [[INDIRECTGOTO:%.*]]
 ; IS__CGSCC____:       lab0:
@@ -2947,15 +2543,10 @@ for.end.1:
 declare noalias i8* @malloc(i64)
 
 define i32 @h(i32 %i) {
-; IS________OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@h
-; IS________OPM-SAME: (i32 [[I:%.*]]) #[[ATTR11]] {
-; IS________OPM-NEXT:    ret i32 0
-;
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@h
-; IS__TUNIT_NPM-SAME: (i32 [[I:%.*]]) #[[ATTR7]] {
-; IS__TUNIT_NPM-NEXT:    ret i32 0
+; NOT_CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@h
+; NOT_CGSCC_NPM-SAME: (i32 [[I:%.*]]) #[[ATTR11]] {
+; NOT_CGSCC_NPM-NEXT:    ret i32 0
 ;
 ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@h
@@ -2971,41 +2562,23 @@ define i32 @h(i32 %i) {
 @p = global i8 0
 
 define void @bad_gep() {
-; IS________OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@bad_gep
-; IS________OPM-SAME: () #[[ATTR11]] {
-; IS________OPM-NEXT:  entry:
-; IS________OPM-NEXT:    [[N:%.*]] = alloca i8, align 1
-; IS________OPM-NEXT:    [[M:%.*]] = alloca i8, align 1
-; IS________OPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 1, i8* noalias nocapture nofree noundef nonnull dereferenceable(1) [[N]]) #[[ATTR14:[0-9]+]]
-; IS________OPM-NEXT:    br label [[EXIT:%.*]]
-; IS________OPM:       while.body:
-; IS________OPM-NEXT:    unreachable
-; IS________OPM:       if.then:
-; IS________OPM-NEXT:    unreachable
-; IS________OPM:       if.end:
-; IS________OPM-NEXT:    unreachable
-; IS________OPM:       exit:
-; IS________OPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 1, i8* noalias nocapture nofree noundef nonnull dereferenceable(1) [[N]]) #[[ATTR14]]
-; IS________OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@bad_gep
-; IS__TUNIT_NPM-SAME: () #[[ATTR7]] {
-; IS__TUNIT_NPM-NEXT:  entry:
-; IS__TUNIT_NPM-NEXT:    [[N:%.*]] = alloca i8, align 1
-; IS__TUNIT_NPM-NEXT:    [[M:%.*]] = alloca i8, align 1
-; IS__TUNIT_NPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 1, i8* noalias nocapture nofree noundef nonnull dereferenceable(1) [[N]]) #[[ATTR13:[0-9]+]]
-; IS__TUNIT_NPM-NEXT:    br label [[EXIT:%.*]]
-; IS__TUNIT_NPM:       while.body:
-; IS__TUNIT_NPM-NEXT:    unreachable
-; IS__TUNIT_NPM:       if.then:
-; IS__TUNIT_NPM-NEXT:    unreachable
-; IS__TUNIT_NPM:       if.end:
-; IS__TUNIT_NPM-NEXT:    unreachable
-; IS__TUNIT_NPM:       exit:
-; IS__TUNIT_NPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 1, i8* noalias nocapture nofree noundef nonnull dereferenceable(1) [[N]]) #[[ATTR13]]
-; IS__TUNIT_NPM-NEXT:    ret void
+; NOT_CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@bad_gep
+; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
+; NOT_CGSCC_NPM-NEXT:  entry:
+; NOT_CGSCC_NPM-NEXT:    [[N:%.*]] = alloca i8, align 1
+; NOT_CGSCC_NPM-NEXT:    [[M:%.*]] = alloca i8, align 1
+; NOT_CGSCC_NPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 1, i8* noalias nocapture nofree noundef nonnull dereferenceable(1) [[N]]) #[[ATTR14:[0-9]+]]
+; NOT_CGSCC_NPM-NEXT:    br label [[EXIT:%.*]]
+; NOT_CGSCC_NPM:       while.body:
+; NOT_CGSCC_NPM-NEXT:    unreachable
+; NOT_CGSCC_NPM:       if.then:
+; NOT_CGSCC_NPM-NEXT:    unreachable
+; NOT_CGSCC_NPM:       if.end:
+; NOT_CGSCC_NPM-NEXT:    unreachable
+; NOT_CGSCC_NPM:       exit:
+; NOT_CGSCC_NPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 1, i8* noalias nocapture nofree noundef nonnull dereferenceable(1) [[N]]) #[[ATTR14]]
+; NOT_CGSCC_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@bad_gep
@@ -3013,7 +2586,7 @@ define void @bad_gep() {
 ; IS__CGSCC____-NEXT:  entry:
 ; IS__CGSCC____-NEXT:    [[N:%.*]] = alloca i8, align 1
 ; IS__CGSCC____-NEXT:    [[M:%.*]] = alloca i8, align 1
-; IS__CGSCC____-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 1, i8* noalias nocapture nofree noundef nonnull dereferenceable(1) [[N]]) #[[ATTR16:[0-9]+]]
+; IS__CGSCC____-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 1, i8* noalias nocapture nofree noundef nonnull dereferenceable(1) [[N]]) #[[ATTR17:[0-9]+]]
 ; IS__CGSCC____-NEXT:    br label [[EXIT:%.*]]
 ; IS__CGSCC____:       while.body:
 ; IS__CGSCC____-NEXT:    unreachable
@@ -3022,7 +2595,7 @@ define void @bad_gep() {
 ; IS__CGSCC____:       if.end:
 ; IS__CGSCC____-NEXT:    unreachable
 ; IS__CGSCC____:       exit:
-; IS__CGSCC____-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 1, i8* noalias nocapture nofree noundef nonnull dereferenceable(1) [[N]]) #[[ATTR16]]
+; IS__CGSCC____-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 1, i8* noalias nocapture nofree noundef nonnull dereferenceable(1) [[N]]) #[[ATTR17]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
 entry:
@@ -3051,27 +2624,16 @@ exit:
 }
 
 define i8 @edge_vs_block_liveness() {
-; IS________OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS________OPM-LABEL: define {{[^@]+}}@edge_vs_block_liveness
-; IS________OPM-SAME: () #[[ATTR11]] {
-; IS________OPM-NEXT:  entry:
-; IS________OPM-NEXT:    br i1 true, label [[B1:%.*]], label [[B2:%.*]]
-; IS________OPM:       b1:
-; IS________OPM-NEXT:    br label [[B2]]
-; IS________OPM:       b2:
-; IS________OPM-NEXT:    [[PHI:%.*]] = phi i8 [ 0, [[ENTRY:%.*]] ], [ 1, [[B1]] ]
-; IS________OPM-NEXT:    ret i8 1
-;
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@edge_vs_block_liveness
-; IS__TUNIT_NPM-SAME: () #[[ATTR7]] {
-; IS__TUNIT_NPM-NEXT:  entry:
-; IS__TUNIT_NPM-NEXT:    br i1 true, label [[B1:%.*]], label [[B2:%.*]]
-; IS__TUNIT_NPM:       b1:
-; IS__TUNIT_NPM-NEXT:    br label [[B2]]
-; IS__TUNIT_NPM:       b2:
-; IS__TUNIT_NPM-NEXT:    [[PHI:%.*]] = phi i8 [ 0, [[ENTRY:%.*]] ], [ 1, [[B1]] ]
-; IS__TUNIT_NPM-NEXT:    ret i8 1
+; NOT_CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; NOT_CGSCC_NPM-LABEL: define {{[^@]+}}@edge_vs_block_liveness
+; NOT_CGSCC_NPM-SAME: () #[[ATTR11]] {
+; NOT_CGSCC_NPM-NEXT:  entry:
+; NOT_CGSCC_NPM-NEXT:    br i1 true, label [[B1:%.*]], label [[B2:%.*]]
+; NOT_CGSCC_NPM:       b1:
+; NOT_CGSCC_NPM-NEXT:    br label [[B2]]
+; NOT_CGSCC_NPM:       b2:
+; NOT_CGSCC_NPM-NEXT:    [[PHI:%.*]] = phi i8 [ 0, [[ENTRY:%.*]] ], [ 1, [[B1]] ]
+; NOT_CGSCC_NPM-NEXT:    ret i8 1
 ;
 ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@edge_vs_block_liveness
@@ -3099,36 +2661,21 @@ declare void @bad_gep_helper2(i8)
 declare void @llvm.lifetime.start.p0i8(i64 %0, i8* %1)
 declare void @llvm.lifetime.end.p0i8(i64 %0, i8* %1)
 ;.
-; IS________OPM: attributes #[[ATTR0]] = { nofree noreturn nosync nounwind }
-; IS________OPM: attributes #[[ATTR1:[0-9]+]] = { readnone }
-; IS________OPM: attributes #[[ATTR2]] = { nounwind }
-; IS________OPM: attributes #[[ATTR3]] = { noreturn nounwind }
-; IS________OPM: attributes #[[ATTR4]] = { noreturn }
-; IS________OPM: attributes #[[ATTR5]] = { nosync readnone }
-; IS________OPM: attributes #[[ATTR6]] = { argmemonly nofree norecurse nounwind willreturn uwtable }
-; IS________OPM: attributes #[[ATTR7]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
-; IS________OPM: attributes #[[ATTR8]] = { nofree norecurse noreturn nosync nounwind readnone }
-; IS________OPM: attributes #[[ATTR9]] = { nofree nosync nounwind readnone willreturn }
-; IS________OPM: attributes #[[ATTR10]] = { nofree nosync nounwind willreturn }
-; IS________OPM: attributes #[[ATTR11]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS________OPM: attributes #[[ATTR12:[0-9]+]] = { argmemonly nocallback nofree nosync nounwind willreturn }
-; IS________OPM: attributes #[[ATTR13]] = { nounwind willreturn }
-; IS________OPM: attributes #[[ATTR14]] = { willreturn }
-;.
-; IS__TUNIT_NPM: attributes #[[ATTR0]] = { nofree noreturn nosync nounwind }
-; IS__TUNIT_NPM: attributes #[[ATTR1:[0-9]+]] = { readnone }
-; IS__TUNIT_NPM: attributes #[[ATTR2]] = { nounwind }
-; IS__TUNIT_NPM: attributes #[[ATTR3]] = { noreturn nounwind }
-; IS__TUNIT_NPM: attributes #[[ATTR4]] = { noreturn }
-; IS__TUNIT_NPM: attributes #[[ATTR5]] = { nosync readnone }
-; IS__TUNIT_NPM: attributes #[[ATTR6]] = { argmemonly nofree norecurse nounwind willreturn uwtable }
-; IS__TUNIT_NPM: attributes #[[ATTR7]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__TUNIT_NPM: attributes #[[ATTR8]] = { nofree norecurse noreturn nosync nounwind readnone }
-; IS__TUNIT_NPM: attributes #[[ATTR9]] = { nofree nosync nounwind readnone willreturn }
-; IS__TUNIT_NPM: attributes #[[ATTR10]] = { nofree nosync nounwind willreturn }
-; IS__TUNIT_NPM: attributes #[[ATTR11:[0-9]+]] = { argmemonly nocallback nofree nosync nounwind willreturn }
-; IS__TUNIT_NPM: attributes #[[ATTR12]] = { nounwind willreturn }
-; IS__TUNIT_NPM: attributes #[[ATTR13]] = { willreturn }
+; NOT_CGSCC_NPM: attributes #[[ATTR0]] = { nofree noreturn nosync nounwind }
+; NOT_CGSCC_NPM: attributes #[[ATTR1:[0-9]+]] = { readnone }
+; NOT_CGSCC_NPM: attributes #[[ATTR2]] = { nounwind }
+; NOT_CGSCC_NPM: attributes #[[ATTR3]] = { noreturn nounwind }
+; NOT_CGSCC_NPM: attributes #[[ATTR4]] = { noreturn }
+; NOT_CGSCC_NPM: attributes #[[ATTR5]] = { nosync readnone }
+; NOT_CGSCC_NPM: attributes #[[ATTR6]] = { argmemonly nofree norecurse nounwind willreturn uwtable }
+; NOT_CGSCC_NPM: attributes #[[ATTR7:[0-9]+]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
+; NOT_CGSCC_NPM: attributes #[[ATTR8]] = { nofree norecurse noreturn nosync nounwind readnone }
+; NOT_CGSCC_NPM: attributes #[[ATTR9]] = { nofree nosync nounwind readnone willreturn }
+; NOT_CGSCC_NPM: attributes #[[ATTR10]] = { nofree nosync nounwind willreturn }
+; NOT_CGSCC_NPM: attributes #[[ATTR11]] = { nofree norecurse nosync nounwind readnone willreturn }
+; NOT_CGSCC_NPM: attributes #[[ATTR12:[0-9]+]] = { argmemonly nocallback nofree nosync nounwind willreturn }
+; NOT_CGSCC_NPM: attributes #[[ATTR13]] = { nounwind willreturn }
+; NOT_CGSCC_NPM: attributes #[[ATTR14]] = { willreturn }
 ;.
 ; IS__CGSCC____: attributes #[[ATTR0]] = { nofree noreturn nosync nounwind }
 ; IS__CGSCC____: attributes #[[ATTR1:[0-9]+]] = { readnone }
@@ -3139,12 +2686,13 @@ declare void @llvm.lifetime.end.p0i8(i64 %0, i8* %1)
 ; IS__CGSCC____: attributes #[[ATTR6]] = { nofree norecurse nosync nounwind readnone willreturn }
 ; IS__CGSCC____: attributes #[[ATTR7]] = { argmemonly nofree norecurse nounwind willreturn uwtable }
 ; IS__CGSCC____: attributes #[[ATTR8]] = { nofree norecurse nosync nounwind readnone willreturn uwtable }
-; IS__CGSCC____: attributes #[[ATTR9]] = { nofree norecurse noreturn nosync nounwind readnone }
-; IS__CGSCC____: attributes #[[ATTR10]] = { nofree nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR11]] = { nofree nosync nounwind willreturn }
-; IS__CGSCC____: attributes #[[ATTR12]] = { nounwind readonly }
-; IS__CGSCC____: attributes #[[ATTR13:[0-9]+]] = { argmemonly nocallback nofree nosync nounwind willreturn }
-; IS__CGSCC____: attributes #[[ATTR14]] = { nounwind willreturn }
-; IS__CGSCC____: attributes #[[ATTR15]] = { readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR16]] = { willreturn }
+; IS__CGSCC____: attributes #[[ATTR9]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
+; IS__CGSCC____: attributes #[[ATTR10]] = { nofree norecurse noreturn nosync nounwind readnone }
+; IS__CGSCC____: attributes #[[ATTR11]] = { nofree nosync nounwind readnone willreturn }
+; IS__CGSCC____: attributes #[[ATTR12]] = { nofree nosync nounwind willreturn }
+; IS__CGSCC____: attributes #[[ATTR13]] = { nounwind readonly }
+; IS__CGSCC____: attributes #[[ATTR14:[0-9]+]] = { argmemonly nocallback nofree nosync nounwind willreturn }
+; IS__CGSCC____: attributes #[[ATTR15]] = { nounwind willreturn }
+; IS__CGSCC____: attributes #[[ATTR16]] = { readnone willreturn }
+; IS__CGSCC____: attributes #[[ATTR17]] = { willreturn }
 ;.

diff  --git a/llvm/test/Transforms/Attributor/lvi-after-jumpthreading.ll b/llvm/test/Transforms/Attributor/lvi-after-jumpthreading.ll
index a11ea565b5bc4..8cb27115ce265 100644
--- a/llvm/test/Transforms/Attributor/lvi-after-jumpthreading.ll
+++ b/llvm/test/Transforms/Attributor/lvi-after-jumpthreading.ll
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=21 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=21 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
+; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=16 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=16 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
 ; RUN: opt -attributor-cgscc -enable-new-pm=0 -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_NPM,IS__CGSCC____,IS________OPM,IS__CGSCC_OPM
 ; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM
 

diff  --git a/llvm/test/Transforms/Attributor/lvi-for-ashr.ll b/llvm/test/Transforms/Attributor/lvi-for-ashr.ll
index e6bafb36a60e0..a30fe1faff92a 100644
--- a/llvm/test/Transforms/Attributor/lvi-for-ashr.ll
+++ b/llvm/test/Transforms/Attributor/lvi-for-ashr.ll
@@ -42,10 +42,9 @@ define i32 @test-ashr(i32 %c) {
 ; IS________NPM-NEXT:    [[CMP2:%.*]] = icmp sgt i32 [[ASHR_VAL]], 15
 ; IS________NPM-NEXT:    br i1 [[CMP2]], label [[BB_THEN:%.*]], label [[RETURN]]
 ; IS________NPM:       bb_then:
-; IS________NPM-NEXT:    [[DOT:%.*]] = select i1 true, i32 3, i32 2
 ; IS________NPM-NEXT:    br label [[RETURN]]
 ; IS________NPM:       return:
-; IS________NPM-NEXT:    [[RETVAL:%.*]] = phi i32 [ 0, [[CHK65:%.*]] ], [ 1, [[CHK0]] ], [ [[DOT]], [[BB_THEN]] ], [ 4, [[BB_IF]] ]
+; IS________NPM-NEXT:    [[RETVAL:%.*]] = phi i32 [ 0, [[CHK65:%.*]] ], [ 1, [[CHK0]] ], [ 3, [[BB_THEN]] ], [ 4, [[BB_IF]] ]
 ; IS________NPM-NEXT:    ret i32 [[RETVAL]]
 ;
 chk65:

diff  --git a/llvm/test/Transforms/Attributor/memory_locations.ll b/llvm/test/Transforms/Attributor/memory_locations.ll
index 853a865bd3f72..9937dd649c5ce 100644
--- a/llvm/test/Transforms/Attributor/memory_locations.ll
+++ b/llvm/test/Transforms/Attributor/memory_locations.ll
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=10 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=10 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
+; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=7 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=7 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
 ; RUN: opt -attributor-cgscc -enable-new-pm=0 -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_NPM,IS__CGSCC____,IS________OPM,IS__CGSCC_OPM
 ; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM
 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
@@ -528,7 +528,6 @@ define internal i8 @recursive_not_readnone_internal(i8* %ptr, i1 %c) {
 ; IS__TUNIT____-NEXT:    [[TMP1:%.*]] = call i8 @recursive_not_readnone_internal(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[ALLOC]], i1 noundef false) #[[ATTR11]]
 ; IS__TUNIT____-NEXT:    ret i8 1
 ; IS__TUNIT____:       f:
-; IS__TUNIT____-NEXT:    store i8 1, i8* [[PTR]], align 1
 ; IS__TUNIT____-NEXT:    ret i8 0
 ;
 ; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind writeonly
@@ -559,14 +558,14 @@ define i8 @readnone_caller(i1 %c) {
 ; IS__TUNIT____-LABEL: define {{[^@]+}}@readnone_caller
 ; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR9:[0-9]+]] {
 ; IS__TUNIT____-NEXT:    [[A:%.*]] = alloca i8, align 1
-; IS__TUNIT____-NEXT:    [[R:%.*]] = call i8 @recursive_not_readnone_internal(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[A]], i1 [[C]]) #[[ATTR11]]
+; IS__TUNIT____-NEXT:    [[R:%.*]] = call noundef i8 @recursive_not_readnone_internal(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[A]], i1 [[C]]) #[[ATTR11]], !range [[RNG0:![0-9]+]]
 ; IS__TUNIT____-NEXT:    ret i8 [[R]]
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@readnone_caller
 ; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR10:[0-9]+]] {
 ; IS__CGSCC____-NEXT:    [[A:%.*]] = alloca i8, align 1
-; IS__CGSCC____-NEXT:    [[R:%.*]] = call i8 @recursive_not_readnone_internal(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[A]], i1 [[C]]) #[[ATTR13:[0-9]+]]
+; IS__CGSCC____-NEXT:    [[R:%.*]] = call noundef i8 @recursive_not_readnone_internal(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[A]], i1 [[C]]) #[[ATTR13:[0-9]+]]
 ; IS__CGSCC____-NEXT:    ret i8 [[R]]
 ;
   %a = alloca i8
@@ -584,7 +583,6 @@ define internal i8 @recursive_readnone_internal2(i8* %ptr, i1 %c) {
 ; IS__TUNIT____-NEXT:    [[TMP1:%.*]] = call i8 @recursive_readnone_internal2(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[ALLOC]], i1 noundef false) #[[ATTR11]]
 ; IS__TUNIT____-NEXT:    ret i8 1
 ; IS__TUNIT____:       f:
-; IS__TUNIT____-NEXT:    store i8 1, i8* [[PTR]], align 1
 ; IS__TUNIT____-NEXT:    ret i8 0
 ;
 ; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind writeonly
@@ -596,7 +594,6 @@ define internal i8 @recursive_readnone_internal2(i8* %ptr, i1 %c) {
 ; IS__CGSCC____-NEXT:    [[TMP1:%.*]] = call i8 @recursive_readnone_internal2(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[ALLOC]], i1 noundef false) #[[ATTR12]]
 ; IS__CGSCC____-NEXT:    ret i8 1
 ; IS__CGSCC____:       f:
-; IS__CGSCC____-NEXT:    store i8 1, i8* [[PTR]], align 1
 ; IS__CGSCC____-NEXT:    ret i8 0
 ;
   %alloc = alloca i8
@@ -614,13 +611,13 @@ define i8 @readnone_caller2(i1 %c) {
 ; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone
 ; IS__TUNIT____-LABEL: define {{[^@]+}}@readnone_caller2
 ; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR9]] {
-; IS__TUNIT____-NEXT:    [[R:%.*]] = call i8 @recursive_readnone_internal2(i8* undef, i1 [[C]]) #[[ATTR11]]
+; IS__TUNIT____-NEXT:    [[R:%.*]] = call noundef i8 @recursive_readnone_internal2(i8* undef, i1 [[C]]) #[[ATTR11]], !range [[RNG0]]
 ; IS__TUNIT____-NEXT:    ret i8 [[R]]
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@readnone_caller2
 ; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR10]] {
-; IS__CGSCC____-NEXT:    [[R:%.*]] = call i8 @recursive_readnone_internal2(i8* undef, i1 [[C]]) #[[ATTR13]]
+; IS__CGSCC____-NEXT:    [[R:%.*]] = call noundef i8 @recursive_readnone_internal2(i8* undef, i1 [[C]]) #[[ATTR13]]
 ; IS__CGSCC____-NEXT:    ret i8 [[R]]
 ;
   %r = call i8 @recursive_readnone_internal2(i8* undef, i1 %c)
@@ -637,7 +634,6 @@ define internal i8 @recursive_not_readnone_internal3(i8* %ptr, i1 %c) {
 ; IS__TUNIT____-NEXT:    [[TMP1:%.*]] = call i8 @recursive_not_readnone_internal3(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[ALLOC]], i1 noundef false) #[[ATTR11]]
 ; IS__TUNIT____-NEXT:    ret i8 1
 ; IS__TUNIT____:       f:
-; IS__TUNIT____-NEXT:    store i8 1, i8* [[PTR]], align 1
 ; IS__TUNIT____-NEXT:    ret i8 0
 ;
 ; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind writeonly
@@ -668,14 +664,14 @@ define i8 @readnone_caller3(i1 %c) {
 ; IS__TUNIT____-LABEL: define {{[^@]+}}@readnone_caller3
 ; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR9]] {
 ; IS__TUNIT____-NEXT:    [[ALLOC:%.*]] = alloca i8, align 1
-; IS__TUNIT____-NEXT:    [[R:%.*]] = call i8 @recursive_not_readnone_internal3(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[ALLOC]], i1 [[C]]) #[[ATTR11]]
+; IS__TUNIT____-NEXT:    [[R:%.*]] = call noundef i8 @recursive_not_readnone_internal3(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[ALLOC]], i1 [[C]]) #[[ATTR11]], !range [[RNG0]]
 ; IS__TUNIT____-NEXT:    ret i8 [[R]]
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@readnone_caller3
 ; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR10]] {
 ; IS__CGSCC____-NEXT:    [[ALLOC:%.*]] = alloca i8, align 1
-; IS__CGSCC____-NEXT:    [[R:%.*]] = call i8 @recursive_not_readnone_internal3(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[ALLOC]], i1 [[C]]) #[[ATTR13]]
+; IS__CGSCC____-NEXT:    [[R:%.*]] = call noundef i8 @recursive_not_readnone_internal3(i8* noalias nocapture nofree noundef nonnull writeonly dereferenceable(1) [[ALLOC]], i1 [[C]]) #[[ATTR13]]
 ; IS__CGSCC____-NEXT:    ret i8 [[R]]
 ;
   %alloc = alloca i8
@@ -739,3 +735,5 @@ define void @argmemonky_caller() {
 ; IS__CGSCC____: attributes #[[ATTR12]] = { nofree nosync nounwind writeonly }
 ; IS__CGSCC____: attributes #[[ATTR13]] = { nounwind writeonly }
 ;.
+; IS__TUNIT____: [[RNG0]] = !{i8 0, i8 2}
+;.

diff  --git a/llvm/test/Transforms/Attributor/noalias.ll b/llvm/test/Transforms/Attributor/noalias.ll
index 0116afd9471f3..6b49c3e1f7e1a 100644
--- a/llvm/test/Transforms/Attributor/noalias.ll
+++ b/llvm/test/Transforms/Attributor/noalias.ll
@@ -461,11 +461,13 @@ define void @test12_4(){
 ; NOT_TUNIT_OPM-LABEL: define {{[^@]+}}@test12_4() {
 ; NOT_TUNIT_OPM-NEXT:    [[A:%.*]] = tail call noalias i8* @malloc(i64 noundef 4)
 ; NOT_TUNIT_OPM-NEXT:    [[B:%.*]] = tail call noalias i8* @malloc(i64 noundef 4)
+; NOT_TUNIT_OPM-NEXT:    [[A_0:%.*]] = getelementptr i8, i8* [[A]], i64 0
 ; NOT_TUNIT_OPM-NEXT:    [[A_1:%.*]] = getelementptr i8, i8* [[A]], i64 1
+; NOT_TUNIT_OPM-NEXT:    [[B_0:%.*]] = getelementptr i8, i8* [[B]], i64 0
 ; NOT_TUNIT_OPM-NEXT:    tail call void @two_args(i8* noalias nocapture [[A]], i8* noalias nocapture [[B]])
-; NOT_TUNIT_OPM-NEXT:    tail call void @two_args(i8* nocapture [[A]], i8* nocapture [[A]])
+; NOT_TUNIT_OPM-NEXT:    tail call void @two_args(i8* nocapture [[A]], i8* nocapture [[A_0]])
 ; NOT_TUNIT_OPM-NEXT:    tail call void @two_args(i8* nocapture [[A]], i8* nocapture [[A_1]])
-; NOT_TUNIT_OPM-NEXT:    tail call void @two_args(i8* nocapture [[A]], i8* nocapture [[B]])
+; NOT_TUNIT_OPM-NEXT:    tail call void @two_args(i8* nocapture [[A_0]], i8* nocapture [[B_0]])
 ; NOT_TUNIT_OPM-NEXT:    ret void
 ;
   %A = tail call noalias i8* @malloc(i64 4)
@@ -497,10 +499,17 @@ define void @use_i8_internal(i8* %a) {
 }
 
 define void @test13_use_noalias(){
-; CHECK-LABEL: define {{[^@]+}}@test13_use_noalias() {
-; CHECK-NEXT:    [[M1:%.*]] = tail call noalias i8* @malloc(i64 noundef 4)
-; CHECK-NEXT:    call void @use_i8_internal(i8* noalias nocapture [[M1]])
-; CHECK-NEXT:    ret void
+; IS________OPM-LABEL: define {{[^@]+}}@test13_use_noalias() {
+; IS________OPM-NEXT:    [[M1:%.*]] = tail call noalias i8* @malloc(i64 noundef 4)
+; IS________OPM-NEXT:    call void @use_i8_internal(i8* noalias nocapture [[M1]])
+; IS________OPM-NEXT:    ret void
+;
+; NOT_TUNIT_OPM-LABEL: define {{[^@]+}}@test13_use_noalias() {
+; NOT_TUNIT_OPM-NEXT:    [[M1:%.*]] = tail call noalias i8* @malloc(i64 noundef 4)
+; NOT_TUNIT_OPM-NEXT:    [[C1:%.*]] = bitcast i8* [[M1]] to i16*
+; NOT_TUNIT_OPM-NEXT:    [[C2:%.*]] = bitcast i16* [[C1]] to i8*
+; NOT_TUNIT_OPM-NEXT:    call void @use_i8_internal(i8* noalias nocapture [[C2]])
+; NOT_TUNIT_OPM-NEXT:    ret void
 ;
 ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test13_use_noalias()
 ; IS__CGSCC_OPM-NEXT:    [[M1:%.*]] = tail call noalias i8* @malloc(i64 4)
@@ -516,11 +525,20 @@ define void @test13_use_noalias(){
 }
 
 define void @test13_use_alias(){
-; CHECK-LABEL: define {{[^@]+}}@test13_use_alias() {
-; CHECK-NEXT:    [[M1:%.*]] = tail call noalias i8* @malloc(i64 noundef 4)
-; CHECK-NEXT:    call void @use_i8_internal(i8* nocapture [[M1]])
-; CHECK-NEXT:    call void @use_i8_internal(i8* nocapture [[M1]])
-; CHECK-NEXT:    ret void
+; IS________OPM-LABEL: define {{[^@]+}}@test13_use_alias() {
+; IS________OPM-NEXT:    [[M1:%.*]] = tail call noalias i8* @malloc(i64 noundef 4)
+; IS________OPM-NEXT:    call void @use_i8_internal(i8* nocapture [[M1]])
+; IS________OPM-NEXT:    call void @use_i8_internal(i8* nocapture [[M1]])
+; IS________OPM-NEXT:    ret void
+;
+; NOT_TUNIT_OPM-LABEL: define {{[^@]+}}@test13_use_alias() {
+; NOT_TUNIT_OPM-NEXT:    [[M1:%.*]] = tail call noalias i8* @malloc(i64 noundef 4)
+; NOT_TUNIT_OPM-NEXT:    [[C1:%.*]] = bitcast i8* [[M1]] to i16*
+; NOT_TUNIT_OPM-NEXT:    [[C2A:%.*]] = bitcast i16* [[C1]] to i8*
+; NOT_TUNIT_OPM-NEXT:    [[C2B:%.*]] = bitcast i16* [[C1]] to i8*
+; NOT_TUNIT_OPM-NEXT:    call void @use_i8_internal(i8* nocapture [[C2A]])
+; NOT_TUNIT_OPM-NEXT:    call void @use_i8_internal(i8* nocapture [[C2B]])
+; NOT_TUNIT_OPM-NEXT:    ret void
 ;
   %m1 = tail call noalias i8* @malloc(i64 4)
   %c1 = bitcast i8* %m1 to i16*

diff  --git a/llvm/test/Transforms/Attributor/nocapture-1.ll b/llvm/test/Transforms/Attributor/nocapture-1.ll
index 05d6c0e701e84..a6cf38646e056 100644
--- a/llvm/test/Transforms/Attributor/nocapture-1.ll
+++ b/llvm/test/Transforms/Attributor/nocapture-1.ll
@@ -37,13 +37,13 @@ define void @c3(i32* %q) {
 ; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
 ; IS__TUNIT____-LABEL: define {{[^@]+}}@c3
 ; IS__TUNIT____-SAME: (i32* nofree writeonly [[Q:%.*]]) #[[ATTR1]] {
-; IS__TUNIT____-NEXT:    call void @c2(i32* nofree writeonly [[Q]]) #[[ATTR14:[0-9]+]]
+; IS__TUNIT____-NEXT:    call void @c2(i32* nofree writeonly [[Q]]) #[[ATTR16:[0-9]+]]
 ; IS__TUNIT____-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn writeonly
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@c3
 ; IS__CGSCC____-SAME: (i32* nofree writeonly [[Q:%.*]]) #[[ATTR2:[0-9]+]] {
-; IS__CGSCC____-NEXT:    call void @c2(i32* nofree writeonly [[Q]]) #[[ATTR17:[0-9]+]]
+; IS__CGSCC____-NEXT:    call void @c2(i32* nofree writeonly [[Q]]) #[[ATTR19:[0-9]+]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @c2(i32* %q)
@@ -189,14 +189,14 @@ define i1 @c7(i32* %q, i32 %bitno) {
 ; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readonly willreturn
 ; IS__TUNIT____-LABEL: define {{[^@]+}}@c7
 ; IS__TUNIT____-SAME: (i32* nofree readonly [[Q:%.*]], i32 [[BITNO:%.*]]) #[[ATTR2]] {
-; IS__TUNIT____-NEXT:    [[PTR:%.*]] = call i1* @lookup_bit(i32* noalias nofree readnone [[Q]], i32 [[BITNO]]) #[[ATTR15:[0-9]+]]
+; IS__TUNIT____-NEXT:    [[PTR:%.*]] = call i1* @lookup_bit(i32* noalias nofree readnone [[Q]], i32 [[BITNO]]) #[[ATTR17:[0-9]+]]
 ; IS__TUNIT____-NEXT:    [[VAL:%.*]] = load i1, i1* [[PTR]], align 1
 ; IS__TUNIT____-NEXT:    ret i1 [[VAL]]
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind readonly willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@c7
 ; IS__CGSCC____-SAME: (i32* nofree readonly [[Q:%.*]], i32 [[BITNO:%.*]]) #[[ATTR6:[0-9]+]] {
-; IS__CGSCC____-NEXT:    [[PTR:%.*]] = call i1* @lookup_bit(i32* noalias nofree readnone [[Q]], i32 [[BITNO]]) #[[ATTR18:[0-9]+]]
+; IS__CGSCC____-NEXT:    [[PTR:%.*]] = call i1* @lookup_bit(i32* noalias nofree readnone [[Q]], i32 [[BITNO]]) #[[ATTR20:[0-9]+]]
 ; IS__CGSCC____-NEXT:    [[VAL:%.*]] = load i1, i1* [[PTR]], align 1
 ; IS__CGSCC____-NEXT:    ret i1 [[VAL]]
 ;
@@ -255,7 +255,7 @@ define i32 @nc1_addrspace(i32* %q, i32 addrspace(1)* %p, i1 %b) {
 ; IS__TUNIT____:       l:
 ; IS__TUNIT____-NEXT:    [[X:%.*]] = phi i32 addrspace(1)* [ [[P]], [[E:%.*]] ]
 ; IS__TUNIT____-NEXT:    [[Y:%.*]] = phi i32* [ [[Q]], [[E]] ]
-; IS__TUNIT____-NEXT:    [[TMP:%.*]] = addrspacecast i32 addrspace(1)* [[P]] to i32*
+; IS__TUNIT____-NEXT:    [[TMP:%.*]] = addrspacecast i32 addrspace(1)* [[X]] to i32*
 ; IS__TUNIT____-NEXT:    [[TMP2:%.*]] = select i1 [[B]], i32* [[TMP]], i32* [[Q]]
 ; IS__TUNIT____-NEXT:    [[VAL:%.*]] = load i32, i32* [[TMP2]], align 4
 ; IS__TUNIT____-NEXT:    store i32 0, i32* [[TMP]], align 4
@@ -270,7 +270,7 @@ define i32 @nc1_addrspace(i32* %q, i32 addrspace(1)* %p, i1 %b) {
 ; IS__CGSCC____:       l:
 ; IS__CGSCC____-NEXT:    [[X:%.*]] = phi i32 addrspace(1)* [ [[P]], [[E:%.*]] ]
 ; IS__CGSCC____-NEXT:    [[Y:%.*]] = phi i32* [ [[Q]], [[E]] ]
-; IS__CGSCC____-NEXT:    [[TMP:%.*]] = addrspacecast i32 addrspace(1)* [[P]] to i32*
+; IS__CGSCC____-NEXT:    [[TMP:%.*]] = addrspacecast i32 addrspace(1)* [[X]] to i32*
 ; IS__CGSCC____-NEXT:    [[TMP2:%.*]] = select i1 [[B]], i32* [[TMP]], i32* [[Q]]
 ; IS__CGSCC____-NEXT:    [[VAL:%.*]] = load i32, i32* [[TMP2]], align 4
 ; IS__CGSCC____-NEXT:    store i32 0, i32* [[TMP]], align 4
@@ -294,13 +294,13 @@ define void @nc2(i32* %p, i32* %q) {
 ; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind willreturn
 ; IS__TUNIT____-LABEL: define {{[^@]+}}@nc2
 ; IS__TUNIT____-SAME: (i32* nocapture nofree [[P:%.*]], i32* nofree [[Q:%.*]]) #[[ATTR5]] {
-; IS__TUNIT____-NEXT:    [[TMP1:%.*]] = call i32 @nc1(i32* nofree [[Q]], i32* nocapture nofree [[P]], i1 noundef false) #[[ATTR16:[0-9]+]]
+; IS__TUNIT____-NEXT:    [[TMP1:%.*]] = call i32 @nc1(i32* nofree [[Q]], i32* nocapture nofree [[P]], i1 noundef false) #[[ATTR18:[0-9]+]]
 ; IS__TUNIT____-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@nc2
 ; IS__CGSCC____-SAME: (i32* nocapture nofree align 4 [[P:%.*]], i32* nofree [[Q:%.*]]) #[[ATTR8:[0-9]+]] {
-; IS__CGSCC____-NEXT:    [[TMP1:%.*]] = call i32 @nc1(i32* nofree [[Q]], i32* nocapture nofree align 4 [[P]], i1 noundef false) #[[ATTR14:[0-9]+]]
+; IS__CGSCC____-NEXT:    [[TMP1:%.*]] = call i32 @nc1(i32* nofree [[Q]], i32* nocapture nofree align 4 [[P]], i1 noundef false) #[[ATTR16:[0-9]+]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   %1 = call i32 @nc1(i32* %q, i32* %p, i1 0)		; <i32> [#uses=0]
@@ -325,13 +325,13 @@ define void @nc4(i8* %p) {
 ; IS__TUNIT____: Function Attrs: argmemonly nounwind
 ; IS__TUNIT____-LABEL: define {{[^@]+}}@nc4
 ; IS__TUNIT____-SAME: (i8* [[P:%.*]]) #[[ATTR6:[0-9]+]] {
-; IS__TUNIT____-NEXT:    call void @external(i8* readonly [[P]]) #[[ATTR17:[0-9]+]]
+; IS__TUNIT____-NEXT:    call void @external(i8* readonly [[P]]) #[[ATTR19:[0-9]+]]
 ; IS__TUNIT____-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: argmemonly nounwind
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@nc4
 ; IS__CGSCC____-SAME: (i8* [[P:%.*]]) #[[ATTR9:[0-9]+]] {
-; IS__CGSCC____-NEXT:    call void @external(i8* readonly [[P]]) #[[ATTR19:[0-9]+]]
+; IS__CGSCC____-NEXT:    call void @external(i8* readonly [[P]]) #[[ATTR21:[0-9]+]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @external(i8* %p)
@@ -641,19 +641,19 @@ entry:
 }
 
 define void @nocaptureLaunder(i8* %p) {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind willreturn
+; IS__TUNIT____: Function Attrs: inaccessiblemem_or_argmemonly nofree norecurse nosync nounwind willreturn
 ; IS__TUNIT____-LABEL: define {{[^@]+}}@nocaptureLaunder
-; IS__TUNIT____-SAME: (i8* nocapture nofree [[P:%.*]]) #[[ATTR5]] {
+; IS__TUNIT____-SAME: (i8* nocapture nofree [[P:%.*]]) #[[ATTR9:[0-9]+]] {
 ; IS__TUNIT____-NEXT:  entry:
-; IS__TUNIT____-NEXT:    [[B:%.*]] = call i8* @llvm.launder.invariant.group.p0i8(i8* nofree [[P]]) #[[ATTR18:[0-9]+]]
+; IS__TUNIT____-NEXT:    [[B:%.*]] = call i8* @llvm.launder.invariant.group.p0i8(i8* nofree [[P]]) #[[ATTR20:[0-9]+]]
 ; IS__TUNIT____-NEXT:    store i8 42, i8* [[B]], align 1
 ; IS__TUNIT____-NEXT:    ret void
 ;
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn
+; IS__CGSCC____: Function Attrs: inaccessiblemem_or_argmemonly nofree norecurse nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@nocaptureLaunder
-; IS__CGSCC____-SAME: (i8* nocapture nofree [[P:%.*]]) #[[ATTR7]] {
+; IS__CGSCC____-SAME: (i8* nocapture nofree [[P:%.*]]) #[[ATTR12:[0-9]+]] {
 ; IS__CGSCC____-NEXT:  entry:
-; IS__CGSCC____-NEXT:    [[B:%.*]] = call i8* @llvm.launder.invariant.group.p0i8(i8* nofree [[P]]) #[[ATTR20:[0-9]+]]
+; IS__CGSCC____-NEXT:    [[B:%.*]] = call i8* @llvm.launder.invariant.group.p0i8(i8* nofree [[P]]) #[[ATTR22:[0-9]+]]
 ; IS__CGSCC____-NEXT:    store i8 42, i8* [[B]], align 1
 ; IS__CGSCC____-NEXT:    ret void
 ;
@@ -668,14 +668,14 @@ define void @captureLaunder(i8* %p) {
 ; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind willreturn
 ; IS__TUNIT____-LABEL: define {{[^@]+}}@captureLaunder
 ; IS__TUNIT____-SAME: (i8* nofree [[P:%.*]]) #[[ATTR5]] {
-; IS__TUNIT____-NEXT:    [[B:%.*]] = call i8* @llvm.launder.invariant.group.p0i8(i8* nofree [[P]]) #[[ATTR18]]
+; IS__TUNIT____-NEXT:    [[B:%.*]] = call i8* @llvm.launder.invariant.group.p0i8(i8* nofree [[P]]) #[[ATTR20]]
 ; IS__TUNIT____-NEXT:    store i8* [[B]], i8** @g2, align 8
 ; IS__TUNIT____-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@captureLaunder
 ; IS__CGSCC____-SAME: (i8* nofree [[P:%.*]]) #[[ATTR7]] {
-; IS__CGSCC____-NEXT:    [[B:%.*]] = call i8* @llvm.launder.invariant.group.p0i8(i8* nofree [[P]]) #[[ATTR20]]
+; IS__CGSCC____-NEXT:    [[B:%.*]] = call i8* @llvm.launder.invariant.group.p0i8(i8* nofree [[P]]) #[[ATTR22]]
 ; IS__CGSCC____-NEXT:    store i8* [[B]], i8** @g2, align 8
 ; IS__CGSCC____-NEXT:    ret void
 ;
@@ -685,19 +685,19 @@ define void @captureLaunder(i8* %p) {
 }
 
 define void @nocaptureStrip(i8* %p) {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
 ; IS__TUNIT____-LABEL: define {{[^@]+}}@nocaptureStrip
-; IS__TUNIT____-SAME: (i8* nocapture nofree writeonly [[P:%.*]]) #[[ATTR1]] {
+; IS__TUNIT____-SAME: (i8* nocapture nofree writeonly [[P:%.*]]) #[[ATTR10:[0-9]+]] {
 ; IS__TUNIT____-NEXT:  entry:
-; IS__TUNIT____-NEXT:    [[B:%.*]] = call i8* @llvm.strip.invariant.group.p0i8(i8* noalias nofree readnone [[P]]) #[[ATTR19:[0-9]+]]
+; IS__TUNIT____-NEXT:    [[B:%.*]] = call i8* @llvm.strip.invariant.group.p0i8(i8* noalias nofree readnone [[P]]) #[[ATTR21:[0-9]+]]
 ; IS__TUNIT____-NEXT:    store i8 42, i8* [[B]], align 1
 ; IS__TUNIT____-NEXT:    ret void
 ;
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@nocaptureStrip
-; IS__CGSCC____-SAME: (i8* nocapture nofree writeonly [[P:%.*]]) #[[ATTR1]] {
+; IS__CGSCC____-SAME: (i8* nocapture nofree writeonly [[P:%.*]]) #[[ATTR13:[0-9]+]] {
 ; IS__CGSCC____-NEXT:  entry:
-; IS__CGSCC____-NEXT:    [[B:%.*]] = call i8* @llvm.strip.invariant.group.p0i8(i8* noalias nofree readnone [[P]]) #[[ATTR18]]
+; IS__CGSCC____-NEXT:    [[B:%.*]] = call i8* @llvm.strip.invariant.group.p0i8(i8* noalias nofree readnone [[P]]) #[[ATTR20]]
 ; IS__CGSCC____-NEXT:    store i8 42, i8* [[B]], align 1
 ; IS__CGSCC____-NEXT:    ret void
 ;
@@ -712,14 +712,14 @@ define void @captureStrip(i8* %p) {
 ; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
 ; IS__TUNIT____-LABEL: define {{[^@]+}}@captureStrip
 ; IS__TUNIT____-SAME: (i8* nofree writeonly [[P:%.*]]) #[[ATTR1]] {
-; IS__TUNIT____-NEXT:    [[B:%.*]] = call i8* @llvm.strip.invariant.group.p0i8(i8* noalias nofree readnone [[P]]) #[[ATTR19]]
+; IS__TUNIT____-NEXT:    [[B:%.*]] = call i8* @llvm.strip.invariant.group.p0i8(i8* noalias nofree readnone [[P]]) #[[ATTR21]]
 ; IS__TUNIT____-NEXT:    store i8* [[B]], i8** @g3, align 8
 ; IS__TUNIT____-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@captureStrip
 ; IS__CGSCC____-SAME: (i8* nofree writeonly [[P:%.*]]) #[[ATTR1]] {
-; IS__CGSCC____-NEXT:    [[B:%.*]] = call i8* @llvm.strip.invariant.group.p0i8(i8* noalias nofree readnone [[P]]) #[[ATTR18]]
+; IS__CGSCC____-NEXT:    [[B:%.*]] = call i8* @llvm.strip.invariant.group.p0i8(i8* noalias nofree readnone [[P]]) #[[ATTR20]]
 ; IS__CGSCC____-NEXT:    store i8* [[B]], i8** @g3, align 8
 ; IS__CGSCC____-NEXT:    ret void
 ;
@@ -790,14 +790,14 @@ define i1 @nocaptureDereferenceableOrNullICmp(i32* dereferenceable_or_null(4) %x
 define i1 @captureDereferenceableOrNullICmp(i32* dereferenceable_or_null(4) %x) null_pointer_is_valid {
 ; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind null_pointer_is_valid readnone willreturn
 ; IS__TUNIT____-LABEL: define {{[^@]+}}@captureDereferenceableOrNullICmp
-; IS__TUNIT____-SAME: (i32* nofree readnone dereferenceable_or_null(4) [[X:%.*]]) #[[ATTR9:[0-9]+]] {
+; IS__TUNIT____-SAME: (i32* nofree readnone dereferenceable_or_null(4) [[X:%.*]]) #[[ATTR11:[0-9]+]] {
 ; IS__TUNIT____-NEXT:    [[TMP1:%.*]] = bitcast i32* [[X]] to i8*
 ; IS__TUNIT____-NEXT:    [[TMP2:%.*]] = icmp eq i8* [[TMP1]], null
 ; IS__TUNIT____-NEXT:    ret i1 [[TMP2]]
 ;
 ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind null_pointer_is_valid readnone willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@captureDereferenceableOrNullICmp
-; IS__CGSCC____-SAME: (i32* nofree readnone dereferenceable_or_null(4) [[X:%.*]]) #[[ATTR12:[0-9]+]] {
+; IS__CGSCC____-SAME: (i32* nofree readnone dereferenceable_or_null(4) [[X:%.*]]) #[[ATTR14:[0-9]+]] {
 ; IS__CGSCC____-NEXT:    [[TMP1:%.*]] = bitcast i32* [[X]] to i8*
 ; IS__CGSCC____-NEXT:    [[TMP2:%.*]] = icmp eq i8* [[TMP1]], null
 ; IS__CGSCC____-NEXT:    ret i1 [[TMP2]]
@@ -827,14 +827,14 @@ define i8* @test_returned1(i8* %A, i8* returned %B) nounwind readonly {
 ; IS__TUNIT____-SAME: (i8* nocapture readonly [[A:%.*]], i8* readonly returned [[B:%.*]]) #[[ATTR4]] {
 ; IS__TUNIT____-NEXT:  entry:
 ; IS__TUNIT____-NEXT:    [[P:%.*]] = call i8* @unknownpi8pi8(i8* [[A]], i8* [[B]])
-; IS__TUNIT____-NEXT:    ret i8* [[P]]
+; IS__TUNIT____-NEXT:    ret i8* [[B]]
 ;
 ; IS__CGSCC____: Function Attrs: nounwind readonly
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@test_returned1
 ; IS__CGSCC____-SAME: (i8* nocapture readonly [[A:%.*]], i8* readonly returned [[B:%.*]]) #[[ATTR5]] {
 ; IS__CGSCC____-NEXT:  entry:
 ; IS__CGSCC____-NEXT:    [[P:%.*]] = call i8* @unknownpi8pi8(i8* [[A]], i8* [[B]])
-; IS__CGSCC____-NEXT:    ret i8* [[P]]
+; IS__CGSCC____-NEXT:    ret i8* [[B]]
 ;
 entry:
   %p = call i8* @unknownpi8pi8(i8* %A, i8* %B)
@@ -844,17 +844,17 @@ entry:
 define i8* @test_returned2(i8* %A, i8* %B) {
 ; IS__TUNIT____: Function Attrs: nounwind readonly
 ; IS__TUNIT____-LABEL: define {{[^@]+}}@test_returned2
-; IS__TUNIT____-SAME: (i8* readonly [[A:%.*]], i8* readonly [[B:%.*]]) #[[ATTR4]] {
+; IS__TUNIT____-SAME: (i8* nocapture readonly [[A:%.*]], i8* readonly returned [[B:%.*]]) #[[ATTR4]] {
 ; IS__TUNIT____-NEXT:  entry:
 ; IS__TUNIT____-NEXT:    [[P:%.*]] = call i8* @unknownpi8pi8(i8* readonly [[A]], i8* readonly [[B]]) #[[ATTR4]]
-; IS__TUNIT____-NEXT:    ret i8* [[P]]
+; IS__TUNIT____-NEXT:    ret i8* [[B]]
 ;
 ; IS__CGSCC____: Function Attrs: nounwind readonly
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@test_returned2
-; IS__CGSCC____-SAME: (i8* readonly [[A:%.*]], i8* readonly [[B:%.*]]) #[[ATTR5]] {
+; IS__CGSCC____-SAME: (i8* nocapture readonly [[A:%.*]], i8* readonly returned [[B:%.*]]) #[[ATTR5]] {
 ; IS__CGSCC____-NEXT:  entry:
 ; IS__CGSCC____-NEXT:    [[P:%.*]] = call i8* @unknownpi8pi8(i8* readonly [[A]], i8* readonly [[B]]) #[[ATTR5]]
-; IS__CGSCC____-NEXT:    ret i8* [[P]]
+; IS__CGSCC____-NEXT:    ret i8* [[B]]
 ;
 entry:
   %p = call i8* @unknownpi8pi8(i8* %A, i8* %B) nounwind readonly
@@ -869,13 +869,13 @@ declare void @val_use(i8 %ptr) readonly nounwind willreturn
 define void @ptr_uses(i8* %ptr, i8* %wptr) {
 ; IS__TUNIT____: Function Attrs: nounwind willreturn
 ; IS__TUNIT____-LABEL: define {{[^@]+}}@ptr_uses
-; IS__TUNIT____-SAME: (i8* [[PTR:%.*]], i8* nocapture nofree noundef nonnull writeonly dereferenceable(1) [[WPTR:%.*]]) #[[ATTR11:[0-9]+]] {
+; IS__TUNIT____-SAME: (i8* [[PTR:%.*]], i8* nocapture nofree noundef nonnull writeonly dereferenceable(1) [[WPTR:%.*]]) #[[ATTR13:[0-9]+]] {
 ; IS__TUNIT____-NEXT:    store i8 0, i8* [[WPTR]], align 1
 ; IS__TUNIT____-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@ptr_uses
-; IS__CGSCC____-SAME: (i8* [[PTR:%.*]], i8* nocapture nofree noundef nonnull writeonly dereferenceable(1) [[WPTR:%.*]]) #[[ATTR14]] {
+; IS__CGSCC____-SAME: (i8* [[PTR:%.*]], i8* nocapture nofree noundef nonnull writeonly dereferenceable(1) [[WPTR:%.*]]) #[[ATTR16]] {
 ; IS__CGSCC____-NEXT:    store i8 0, i8* [[WPTR]], align 1
 ; IS__CGSCC____-NEXT:    ret void
 ;
@@ -898,17 +898,19 @@ declare i8* @llvm.strip.invariant.group.p0i8(i8*)
 ; IS__TUNIT____: attributes #[[ATTR6]] = { argmemonly nounwind }
 ; IS__TUNIT____: attributes #[[ATTR7]] = { nofree nosync nounwind writeonly }
 ; IS__TUNIT____: attributes #[[ATTR8]] = { argmemonly nofree norecurse nounwind willreturn }
-; IS__TUNIT____: attributes #[[ATTR9]] = { nofree norecurse nosync nounwind null_pointer_is_valid readnone willreturn }
-; IS__TUNIT____: attributes #[[ATTR10:[0-9]+]] = { nounwind readonly willreturn }
-; IS__TUNIT____: attributes #[[ATTR11]] = { nounwind willreturn }
-; IS__TUNIT____: attributes #[[ATTR12:[0-9]+]] = { inaccessiblememonly nocallback nofree nosync nounwind speculatable willreturn }
-; IS__TUNIT____: attributes #[[ATTR13:[0-9]+]] = { nocallback nofree nosync nounwind readnone speculatable willreturn }
-; IS__TUNIT____: attributes #[[ATTR14]] = { nofree nosync nounwind willreturn writeonly }
-; IS__TUNIT____: attributes #[[ATTR15]] = { nofree nounwind readnone willreturn }
-; IS__TUNIT____: attributes #[[ATTR16]] = { nofree nosync nounwind willreturn }
-; IS__TUNIT____: attributes #[[ATTR17]] = { nounwind }
-; IS__TUNIT____: attributes #[[ATTR18]] = { willreturn }
-; IS__TUNIT____: attributes #[[ATTR19]] = { readnone willreturn }
+; IS__TUNIT____: attributes #[[ATTR9]] = { inaccessiblemem_or_argmemonly nofree norecurse nosync nounwind willreturn }
+; IS__TUNIT____: attributes #[[ATTR10]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
+; IS__TUNIT____: attributes #[[ATTR11]] = { nofree norecurse nosync nounwind null_pointer_is_valid readnone willreturn }
+; IS__TUNIT____: attributes #[[ATTR12:[0-9]+]] = { nounwind readonly willreturn }
+; IS__TUNIT____: attributes #[[ATTR13]] = { nounwind willreturn }
+; IS__TUNIT____: attributes #[[ATTR14:[0-9]+]] = { inaccessiblememonly nocallback nofree nosync nounwind speculatable willreturn }
+; IS__TUNIT____: attributes #[[ATTR15:[0-9]+]] = { nocallback nofree nosync nounwind readnone speculatable willreturn }
+; IS__TUNIT____: attributes #[[ATTR16]] = { nofree nosync nounwind willreturn writeonly }
+; IS__TUNIT____: attributes #[[ATTR17]] = { nofree nounwind readnone willreturn }
+; IS__TUNIT____: attributes #[[ATTR18]] = { nofree nosync nounwind willreturn }
+; IS__TUNIT____: attributes #[[ATTR19]] = { nounwind }
+; IS__TUNIT____: attributes #[[ATTR20]] = { willreturn }
+; IS__TUNIT____: attributes #[[ATTR21]] = { readnone willreturn }
 ;.
 ; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
 ; IS__CGSCC____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind willreturn writeonly }
@@ -922,13 +924,15 @@ declare i8* @llvm.strip.invariant.group.p0i8(i8*)
 ; IS__CGSCC____: attributes #[[ATTR9]] = { argmemonly nounwind }
 ; IS__CGSCC____: attributes #[[ATTR10]] = { nofree nosync nounwind writeonly }
 ; IS__CGSCC____: attributes #[[ATTR11]] = { argmemonly nofree norecurse nounwind willreturn }
-; IS__CGSCC____: attributes #[[ATTR12]] = { nofree norecurse nosync nounwind null_pointer_is_valid readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR13:[0-9]+]] = { nounwind readonly willreturn }
-; IS__CGSCC____: attributes #[[ATTR14]] = { nounwind willreturn }
-; IS__CGSCC____: attributes #[[ATTR15:[0-9]+]] = { inaccessiblememonly nocallback nofree nosync nounwind speculatable willreturn }
-; IS__CGSCC____: attributes #[[ATTR16:[0-9]+]] = { nocallback nofree nosync nounwind readnone speculatable willreturn }
-; IS__CGSCC____: attributes #[[ATTR17]] = { nounwind willreturn writeonly }
-; IS__CGSCC____: attributes #[[ATTR18]] = { readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR19]] = { nounwind }
-; IS__CGSCC____: attributes #[[ATTR20]] = { willreturn }
+; IS__CGSCC____: attributes #[[ATTR12]] = { inaccessiblemem_or_argmemonly nofree norecurse nosync nounwind willreturn }
+; IS__CGSCC____: attributes #[[ATTR13]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
+; IS__CGSCC____: attributes #[[ATTR14]] = { nofree norecurse nosync nounwind null_pointer_is_valid readnone willreturn }
+; IS__CGSCC____: attributes #[[ATTR15:[0-9]+]] = { nounwind readonly willreturn }
+; IS__CGSCC____: attributes #[[ATTR16]] = { nounwind willreturn }
+; IS__CGSCC____: attributes #[[ATTR17:[0-9]+]] = { inaccessiblememonly nocallback nofree nosync nounwind speculatable willreturn }
+; IS__CGSCC____: attributes #[[ATTR18:[0-9]+]] = { nocallback nofree nosync nounwind readnone speculatable willreturn }
+; IS__CGSCC____: attributes #[[ATTR19]] = { nounwind willreturn writeonly }
+; IS__CGSCC____: attributes #[[ATTR20]] = { readnone willreturn }
+; IS__CGSCC____: attributes #[[ATTR21]] = { nounwind }
+; IS__CGSCC____: attributes #[[ATTR22]] = { willreturn }
 ;.

diff  --git a/llvm/test/Transforms/Attributor/nocapture-2.ll b/llvm/test/Transforms/Attributor/nocapture-2.ll
index 465bcd74d7319..6f368e3ed68ec 100644
--- a/llvm/test/Transforms/Attributor/nocapture-2.ll
+++ b/llvm/test/Transforms/Attributor/nocapture-2.ll
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=6 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=6 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
+; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=4 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=4 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
 ; RUN: opt -attributor-cgscc -enable-new-pm=0 -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_NPM,IS__CGSCC____,IS________OPM,IS__CGSCC_OPM
 ; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM
 ;
@@ -166,49 +166,27 @@ entry:
 ;   return scc_A((int*)(scc_A(a) ? scc_B((double*)a) : scc_C(a)));
 ; }
 define float* @scc_A(i32* dereferenceable_or_null(4) %a) {
-; IS________OPM: Function Attrs: nofree nosync nounwind readnone
-; IS________OPM-LABEL: define {{[^@]+}}@scc_A
-; IS________OPM-SAME: (i32* nofree readnone dereferenceable_or_null(4) "no-capture-maybe-returned" [[A:%.*]]) #[[ATTR2:[0-9]+]] {
-; IS________OPM-NEXT:  entry:
-; IS________OPM-NEXT:    [[TOBOOL:%.*]] = icmp ne i32* [[A]], null
-; IS________OPM-NEXT:    br i1 [[TOBOOL]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
-; IS________OPM:       cond.true:
-; IS________OPM-NEXT:    [[TMP0:%.*]] = bitcast i32* [[A]] to i16*
-; IS________OPM-NEXT:    [[CALL:%.*]] = call dereferenceable_or_null(4) i8* @scc_C(i16* noalias nofree readnone dereferenceable_or_null(4) "no-capture-maybe-returned" [[TMP0]]) #[[ATTR2]]
-; IS________OPM-NEXT:    [[TMP1:%.*]] = bitcast i8* [[CALL]] to double*
-; IS________OPM-NEXT:    [[CALL1:%.*]] = call dereferenceable_or_null(4) i64* @scc_B(double* noalias nofree readnone dereferenceable_or_null(8) "no-capture-maybe-returned" [[TMP1]]) #[[ATTR2]]
-; IS________OPM-NEXT:    [[TMP2:%.*]] = bitcast i64* [[CALL1]] to i32*
-; IS________OPM-NEXT:    [[CALL2:%.*]] = call dereferenceable_or_null(4) float* @scc_A(i32* noalias nofree readnone dereferenceable_or_null(4) "no-capture-maybe-returned" [[TMP2]]) #[[ATTR2]]
-; IS________OPM-NEXT:    [[TMP3:%.*]] = bitcast float* [[CALL2]] to i32*
-; IS________OPM-NEXT:    br label [[COND_END:%.*]]
-; IS________OPM:       cond.false:
-; IS________OPM-NEXT:    br label [[COND_END]]
-; IS________OPM:       cond.end:
-; IS________OPM-NEXT:    [[COND:%.*]] = phi i32* [ [[TMP3]], [[COND_TRUE]] ], [ [[A]], [[COND_FALSE]] ]
-; IS________OPM-NEXT:    [[TMP4:%.*]] = bitcast i32* [[COND]] to float*
-; IS________OPM-NEXT:    ret float* [[TMP4]]
-;
-; IS________NPM: Function Attrs: nofree nosync nounwind readnone
-; IS________NPM-LABEL: define {{[^@]+}}@scc_A
-; IS________NPM-SAME: (i32* nofree readnone dereferenceable_or_null(4) "no-capture-maybe-returned" [[A:%.*]]) #[[ATTR2:[0-9]+]] {
-; IS________NPM-NEXT:  entry:
-; IS________NPM-NEXT:    [[TOBOOL:%.*]] = icmp ne i32* [[A]], null
-; IS________NPM-NEXT:    br i1 [[TOBOOL]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
-; IS________NPM:       cond.true:
-; IS________NPM-NEXT:    [[TMP0:%.*]] = bitcast i32* [[A]] to i16*
-; IS________NPM-NEXT:    [[CALL:%.*]] = call dereferenceable_or_null(4) i8* @scc_C(i16* noalias nofree nonnull readnone dereferenceable(4) "no-capture-maybe-returned" [[TMP0]]) #[[ATTR2]]
-; IS________NPM-NEXT:    [[TMP1:%.*]] = bitcast i8* [[CALL]] to double*
-; IS________NPM-NEXT:    [[CALL1:%.*]] = call dereferenceable_or_null(4) i64* @scc_B(double* noalias nofree readnone dereferenceable_or_null(8) "no-capture-maybe-returned" [[TMP1]]) #[[ATTR2]]
-; IS________NPM-NEXT:    [[TMP2:%.*]] = bitcast i64* [[CALL1]] to i32*
-; IS________NPM-NEXT:    [[CALL2:%.*]] = call dereferenceable_or_null(4) float* @scc_A(i32* noalias nofree readnone dereferenceable_or_null(4) "no-capture-maybe-returned" [[TMP2]]) #[[ATTR2]]
-; IS________NPM-NEXT:    [[TMP3:%.*]] = bitcast float* [[CALL2]] to i32*
-; IS________NPM-NEXT:    br label [[COND_END:%.*]]
-; IS________NPM:       cond.false:
-; IS________NPM-NEXT:    br label [[COND_END]]
-; IS________NPM:       cond.end:
-; IS________NPM-NEXT:    [[COND:%.*]] = phi i32* [ [[TMP3]], [[COND_TRUE]] ], [ [[A]], [[COND_FALSE]] ]
-; IS________NPM-NEXT:    [[TMP4:%.*]] = bitcast i32* [[COND]] to float*
-; IS________NPM-NEXT:    ret float* [[TMP4]]
+; CHECK: Function Attrs: nofree nosync nounwind readnone
+; CHECK-LABEL: define {{[^@]+}}@scc_A
+; CHECK-SAME: (i32* nofree readnone dereferenceable_or_null(4) "no-capture-maybe-returned" [[A:%.*]]) #[[ATTR2:[0-9]+]] {
+; CHECK-NEXT:  entry:
+; CHECK-NEXT:    [[TOBOOL:%.*]] = icmp ne i32* [[A]], null
+; CHECK-NEXT:    br i1 [[TOBOOL]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
+; CHECK:       cond.true:
+; CHECK-NEXT:    [[TMP0:%.*]] = bitcast i32* [[A]] to i16*
+; CHECK-NEXT:    [[CALL:%.*]] = call dereferenceable_or_null(4) i8* @scc_C(i16* noalias nofree readnone dereferenceable_or_null(4) "no-capture-maybe-returned" [[TMP0]]) #[[ATTR2]]
+; CHECK-NEXT:    [[TMP1:%.*]] = bitcast i8* [[CALL]] to double*
+; CHECK-NEXT:    [[CALL1:%.*]] = call dereferenceable_or_null(4) i64* @scc_B(double* noalias nofree readnone dereferenceable_or_null(8) "no-capture-maybe-returned" [[TMP1]]) #[[ATTR2]]
+; CHECK-NEXT:    [[TMP2:%.*]] = bitcast i64* [[CALL1]] to i32*
+; CHECK-NEXT:    [[CALL2:%.*]] = call dereferenceable_or_null(4) float* @scc_A(i32* noalias nofree readnone dereferenceable_or_null(4) "no-capture-maybe-returned" [[TMP2]]) #[[ATTR2]]
+; CHECK-NEXT:    [[TMP3:%.*]] = bitcast float* [[CALL2]] to i32*
+; CHECK-NEXT:    br label [[COND_END:%.*]]
+; CHECK:       cond.false:
+; CHECK-NEXT:    br label [[COND_END]]
+; CHECK:       cond.end:
+; CHECK-NEXT:    [[COND:%.*]] = phi i32* [ [[TMP3]], [[COND_TRUE]] ], [ [[A]], [[COND_FALSE]] ]
+; CHECK-NEXT:    [[TMP4:%.*]] = bitcast i32* [[COND]] to float*
+; CHECK-NEXT:    ret float* [[TMP4]]
 ;
 entry:
   %tobool = icmp ne i32* %a, null
@@ -235,49 +213,27 @@ cond.end:                                         ; preds = %cond.false, %cond.t
 
 ; FIXME: the call1 below to scc_B should return dereferenceable_or_null(8) (as the callee does). Something prevented that deduction and needs to be investigated.
 define i64* @scc_B(double* dereferenceable_or_null(8) %a) {
-; IS________OPM: Function Attrs: nofree nosync nounwind readnone
-; IS________OPM-LABEL: define {{[^@]+}}@scc_B
-; IS________OPM-SAME: (double* nofree readnone dereferenceable_or_null(8) "no-capture-maybe-returned" [[A:%.*]]) #[[ATTR2]] {
-; IS________OPM-NEXT:  entry:
-; IS________OPM-NEXT:    [[TOBOOL:%.*]] = icmp ne double* [[A]], null
-; IS________OPM-NEXT:    br i1 [[TOBOOL]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
-; IS________OPM:       cond.true:
-; IS________OPM-NEXT:    [[TMP0:%.*]] = bitcast double* [[A]] to i32*
-; IS________OPM-NEXT:    [[CALL:%.*]] = call dereferenceable_or_null(4) float* @scc_A(i32* noalias nofree readnone dereferenceable_or_null(8) "no-capture-maybe-returned" [[TMP0]]) #[[ATTR2]]
-; IS________OPM-NEXT:    [[TMP1:%.*]] = bitcast float* [[CALL]] to double*
-; IS________OPM-NEXT:    [[CALL1:%.*]] = call dereferenceable_or_null(4) i64* @scc_B(double* noalias nofree readnone dereferenceable_or_null(8) "no-capture-maybe-returned" [[TMP1]]) #[[ATTR2]]
-; IS________OPM-NEXT:    [[TMP2:%.*]] = bitcast i64* [[CALL1]] to i16*
-; IS________OPM-NEXT:    [[CALL2:%.*]] = call dereferenceable_or_null(4) i8* @scc_C(i16* noalias nofree readnone dereferenceable_or_null(4) "no-capture-maybe-returned" [[TMP2]]) #[[ATTR2]]
-; IS________OPM-NEXT:    br label [[COND_END:%.*]]
-; IS________OPM:       cond.false:
-; IS________OPM-NEXT:    [[TMP3:%.*]] = bitcast double* [[A]] to i8*
-; IS________OPM-NEXT:    br label [[COND_END]]
-; IS________OPM:       cond.end:
-; IS________OPM-NEXT:    [[COND:%.*]] = phi i8* [ [[CALL2]], [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
-; IS________OPM-NEXT:    [[TMP4:%.*]] = bitcast i8* [[COND]] to i64*
-; IS________OPM-NEXT:    ret i64* [[TMP4]]
-;
-; IS________NPM: Function Attrs: nofree nosync nounwind readnone
-; IS________NPM-LABEL: define {{[^@]+}}@scc_B
-; IS________NPM-SAME: (double* nofree readnone dereferenceable_or_null(8) "no-capture-maybe-returned" [[A:%.*]]) #[[ATTR2]] {
-; IS________NPM-NEXT:  entry:
-; IS________NPM-NEXT:    [[TOBOOL:%.*]] = icmp ne double* [[A]], null
-; IS________NPM-NEXT:    br i1 [[TOBOOL]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
-; IS________NPM:       cond.true:
-; IS________NPM-NEXT:    [[TMP0:%.*]] = bitcast double* [[A]] to i32*
-; IS________NPM-NEXT:    [[CALL:%.*]] = call dereferenceable_or_null(4) float* @scc_A(i32* noalias nofree nonnull readnone dereferenceable(8) "no-capture-maybe-returned" [[TMP0]]) #[[ATTR2]]
-; IS________NPM-NEXT:    [[TMP1:%.*]] = bitcast float* [[CALL]] to double*
-; IS________NPM-NEXT:    [[CALL1:%.*]] = call dereferenceable_or_null(4) i64* @scc_B(double* noalias nofree readnone dereferenceable_or_null(8) "no-capture-maybe-returned" [[TMP1]]) #[[ATTR2]]
-; IS________NPM-NEXT:    [[TMP2:%.*]] = bitcast i64* [[CALL1]] to i16*
-; IS________NPM-NEXT:    [[CALL2:%.*]] = call dereferenceable_or_null(4) i8* @scc_C(i16* noalias nofree readnone dereferenceable_or_null(4) "no-capture-maybe-returned" [[TMP2]]) #[[ATTR2]]
-; IS________NPM-NEXT:    br label [[COND_END:%.*]]
-; IS________NPM:       cond.false:
-; IS________NPM-NEXT:    [[TMP3:%.*]] = bitcast double* [[A]] to i8*
-; IS________NPM-NEXT:    br label [[COND_END]]
-; IS________NPM:       cond.end:
-; IS________NPM-NEXT:    [[COND:%.*]] = phi i8* [ [[CALL2]], [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
-; IS________NPM-NEXT:    [[TMP4:%.*]] = bitcast i8* [[COND]] to i64*
-; IS________NPM-NEXT:    ret i64* [[TMP4]]
+; CHECK: Function Attrs: nofree nosync nounwind readnone
+; CHECK-LABEL: define {{[^@]+}}@scc_B
+; CHECK-SAME: (double* nofree readnone dereferenceable_or_null(8) "no-capture-maybe-returned" [[A:%.*]]) #[[ATTR2]] {
+; CHECK-NEXT:  entry:
+; CHECK-NEXT:    [[TOBOOL:%.*]] = icmp ne double* [[A]], null
+; CHECK-NEXT:    br i1 [[TOBOOL]], label [[COND_TRUE:%.*]], label [[COND_FALSE:%.*]]
+; CHECK:       cond.true:
+; CHECK-NEXT:    [[TMP0:%.*]] = bitcast double* [[A]] to i32*
+; CHECK-NEXT:    [[CALL:%.*]] = call dereferenceable_or_null(4) float* @scc_A(i32* noalias nofree readnone dereferenceable_or_null(8) "no-capture-maybe-returned" [[TMP0]]) #[[ATTR2]]
+; CHECK-NEXT:    [[TMP1:%.*]] = bitcast float* [[CALL]] to double*
+; CHECK-NEXT:    [[CALL1:%.*]] = call dereferenceable_or_null(4) i64* @scc_B(double* noalias nofree readnone dereferenceable_or_null(8) "no-capture-maybe-returned" [[TMP1]]) #[[ATTR2]]
+; CHECK-NEXT:    [[TMP2:%.*]] = bitcast i64* [[CALL1]] to i16*
+; CHECK-NEXT:    [[CALL2:%.*]] = call dereferenceable_or_null(4) i8* @scc_C(i16* noalias nofree readnone dereferenceable_or_null(4) "no-capture-maybe-returned" [[TMP2]]) #[[ATTR2]]
+; CHECK-NEXT:    br label [[COND_END:%.*]]
+; CHECK:       cond.false:
+; CHECK-NEXT:    [[TMP3:%.*]] = bitcast double* [[A]] to i8*
+; CHECK-NEXT:    br label [[COND_END]]
+; CHECK:       cond.end:
+; CHECK-NEXT:    [[COND:%.*]] = phi i8* [ [[CALL2]], [[COND_TRUE]] ], [ [[TMP3]], [[COND_FALSE]] ]
+; CHECK-NEXT:    [[TMP4:%.*]] = bitcast i8* [[COND]] to i64*
+; CHECK-NEXT:    ret i64* [[TMP4]]
 ;
 entry:
   %tobool = icmp ne double* %a, null
@@ -305,7 +261,7 @@ cond.end:                                         ; preds = %cond.false, %cond.t
 define i8* @scc_C(i16* dereferenceable_or_null(2) %a) {
 ; CHECK: Function Attrs: nofree nosync nounwind readnone
 ; CHECK-LABEL: define {{[^@]+}}@scc_C
-; CHECK-SAME: (i16* nofree readnone dereferenceable_or_null(4) "no-capture-maybe-returned" [[A:%.*]]) #[[ATTR2:[0-9]+]] {
+; CHECK-SAME: (i16* nofree readnone dereferenceable_or_null(4) "no-capture-maybe-returned" [[A:%.*]]) #[[ATTR2]] {
 ; CHECK-NEXT:  entry:
 ; CHECK-NEXT:    [[BC:%.*]] = bitcast i16* [[A]] to i32*
 ; CHECK-NEXT:    [[CALL:%.*]] = call dereferenceable_or_null(4) float* @scc_A(i32* noalias nofree readnone dereferenceable_or_null(4) "no-capture-maybe-returned" [[BC]]) #[[ATTR2]]
@@ -488,10 +444,10 @@ define i64* @negative_test_not_captured_but_returned_call_0a(i64* %a) #0 {
 ;
 ; IS__CGSCC____: Function Attrs: argmemonly nofree noinline nosync nounwind willreturn writeonly uwtable
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@negative_test_not_captured_but_returned_call_0a
-; IS__CGSCC____-SAME: (i64* nofree noundef nonnull writeonly align 8 dereferenceable(8) [[A:%.*]]) #[[ATTR5]] {
+; IS__CGSCC____-SAME: (i64* nofree noundef nonnull returned writeonly align 8 dereferenceable(8) [[A:%.*]]) #[[ATTR5]] {
 ; IS__CGSCC____-NEXT:  entry:
-; IS__CGSCC____-NEXT:    [[CALL:%.*]] = call noundef nonnull align 8 dereferenceable(8) i64* @not_captured_but_returned_0(i64* nofree noundef nonnull writeonly align 8 dereferenceable(8) [[A]]) #[[ATTR10]]
-; IS__CGSCC____-NEXT:    ret i64* [[CALL]]
+; IS__CGSCC____-NEXT:    [[CALL:%.*]] = call i64* @not_captured_but_returned_0(i64* nofree noundef nonnull writeonly align 8 dereferenceable(8) [[A]]) #[[ATTR10]]
+; IS__CGSCC____-NEXT:    ret i64* [[A]]
 ;
 entry:
   %call = call i64* @not_captured_but_returned_0(i64* %a)
@@ -520,7 +476,7 @@ define void @negative_test_not_captured_but_returned_call_0b(i64* %a) #0 {
 ; IS__CGSCC____-SAME: (i64* nofree noundef nonnull writeonly align 8 dereferenceable(8) [[A:%.*]]) #[[ATTR5]] {
 ; IS__CGSCC____-NEXT:  entry:
 ; IS__CGSCC____-NEXT:    [[CALL:%.*]] = call i64* @not_captured_but_returned_0(i64* nofree noundef nonnull writeonly align 8 dereferenceable(8) [[A]]) #[[ATTR10]]
-; IS__CGSCC____-NEXT:    [[TMP0:%.*]] = ptrtoint i64* [[CALL]] to i64
+; IS__CGSCC____-NEXT:    [[TMP0:%.*]] = ptrtoint i64* [[A]] to i64
 ; IS__CGSCC____-NEXT:    store i64 [[TMP0]], i64* [[A]], align 8
 ; IS__CGSCC____-NEXT:    ret void
 ;
@@ -713,17 +669,17 @@ declare i32* @readonly_unknown_r1a(i32*, i32* returned) readonly
 define i32* @not_captured_by_readonly_call_not_returned_either2(i32* %b, i32* %r) {
 ; IS__TUNIT____: Function Attrs: nounwind readonly
 ; IS__TUNIT____-LABEL: define {{[^@]+}}@not_captured_by_readonly_call_not_returned_either2
-; IS__TUNIT____-SAME: (i32* readonly [[B:%.*]], i32* readonly [[R:%.*]]) #[[ATTR8]] {
+; IS__TUNIT____-SAME: (i32* nocapture readonly [[B:%.*]], i32* readonly returned [[R:%.*]]) #[[ATTR8]] {
 ; IS__TUNIT____-NEXT:  entry:
 ; IS__TUNIT____-NEXT:    [[CALL:%.*]] = call i32* @readonly_unknown_r1a(i32* readonly [[B]], i32* readonly [[R]]) #[[ATTR8]]
-; IS__TUNIT____-NEXT:    ret i32* [[CALL]]
+; IS__TUNIT____-NEXT:    ret i32* [[R]]
 ;
 ; IS__CGSCC____: Function Attrs: nounwind readonly
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@not_captured_by_readonly_call_not_returned_either2
-; IS__CGSCC____-SAME: (i32* readonly [[B:%.*]], i32* readonly [[R:%.*]]) #[[ATTR9]] {
+; IS__CGSCC____-SAME: (i32* nocapture readonly [[B:%.*]], i32* readonly returned [[R:%.*]]) #[[ATTR9]] {
 ; IS__CGSCC____-NEXT:  entry:
 ; IS__CGSCC____-NEXT:    [[CALL:%.*]] = call i32* @readonly_unknown_r1a(i32* readonly [[B]], i32* readonly [[R]]) #[[ATTR9]]
-; IS__CGSCC____-NEXT:    ret i32* [[CALL]]
+; IS__CGSCC____-NEXT:    ret i32* [[R]]
 ;
 entry:
   %call = call i32* @readonly_unknown_r1a(i32* %b, i32* %r) nounwind
@@ -734,17 +690,17 @@ declare i32* @readonly_unknown_r1b(i32*, i32* returned) readonly nounwind
 define i32* @not_captured_by_readonly_call_not_returned_either3(i32* %b, i32* %r) {
 ; IS__TUNIT____: Function Attrs: nounwind readonly
 ; IS__TUNIT____-LABEL: define {{[^@]+}}@not_captured_by_readonly_call_not_returned_either3
-; IS__TUNIT____-SAME: (i32* nocapture readonly [[B:%.*]], i32* readonly [[R:%.*]]) #[[ATTR8]] {
+; IS__TUNIT____-SAME: (i32* nocapture readonly [[B:%.*]], i32* readonly returned [[R:%.*]]) #[[ATTR8]] {
 ; IS__TUNIT____-NEXT:  entry:
 ; IS__TUNIT____-NEXT:    [[CALL:%.*]] = call i32* @readonly_unknown_r1b(i32* nocapture readonly [[B]], i32* readonly [[R]]) #[[ATTR8]]
-; IS__TUNIT____-NEXT:    ret i32* [[CALL]]
+; IS__TUNIT____-NEXT:    ret i32* [[R]]
 ;
 ; IS__CGSCC____: Function Attrs: nounwind readonly
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@not_captured_by_readonly_call_not_returned_either3
-; IS__CGSCC____-SAME: (i32* nocapture readonly [[B:%.*]], i32* readonly [[R:%.*]]) #[[ATTR9]] {
+; IS__CGSCC____-SAME: (i32* nocapture readonly [[B:%.*]], i32* readonly returned [[R:%.*]]) #[[ATTR9]] {
 ; IS__CGSCC____-NEXT:  entry:
 ; IS__CGSCC____-NEXT:    [[CALL:%.*]] = call i32* @readonly_unknown_r1b(i32* nocapture readonly [[B]], i32* readonly [[R]]) #[[ATTR9]]
-; IS__CGSCC____-NEXT:    ret i32* [[CALL]]
+; IS__CGSCC____-NEXT:    ret i32* [[R]]
 ;
 entry:
   %call = call i32* @readonly_unknown_r1b(i32* %b, i32* %r)
@@ -754,17 +710,17 @@ entry:
 define i32* @not_captured_by_readonly_call_not_returned_either4(i32* %b, i32* %r) nounwind {
 ; IS__TUNIT____: Function Attrs: nounwind readonly
 ; IS__TUNIT____-LABEL: define {{[^@]+}}@not_captured_by_readonly_call_not_returned_either4
-; IS__TUNIT____-SAME: (i32* readonly [[B:%.*]], i32* readonly [[R:%.*]]) #[[ATTR8]] {
+; IS__TUNIT____-SAME: (i32* nocapture readonly [[B:%.*]], i32* readonly returned [[R:%.*]]) #[[ATTR8]] {
 ; IS__TUNIT____-NEXT:  entry:
 ; IS__TUNIT____-NEXT:    [[CALL:%.*]] = call i32* @readonly_unknown_r1a(i32* readonly [[B]], i32* readonly [[R]]) #[[ATTR6]]
-; IS__TUNIT____-NEXT:    ret i32* [[CALL]]
+; IS__TUNIT____-NEXT:    ret i32* [[R]]
 ;
 ; IS__CGSCC____: Function Attrs: nounwind readonly
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@not_captured_by_readonly_call_not_returned_either4
-; IS__CGSCC____-SAME: (i32* readonly [[B:%.*]], i32* readonly [[R:%.*]]) #[[ATTR9]] {
+; IS__CGSCC____-SAME: (i32* nocapture readonly [[B:%.*]], i32* readonly returned [[R:%.*]]) #[[ATTR9]] {
 ; IS__CGSCC____-NEXT:  entry:
 ; IS__CGSCC____-NEXT:    [[CALL:%.*]] = call i32* @readonly_unknown_r1a(i32* readonly [[B]], i32* readonly [[R]]) #[[ATTR7]]
-; IS__CGSCC____-NEXT:    ret i32* [[CALL]]
+; IS__CGSCC____-NEXT:    ret i32* [[R]]
 ;
 entry:
   %call = call i32* @readonly_unknown_r1a(i32* %b, i32* %r)

diff  --git a/llvm/test/Transforms/Attributor/nonnull.ll b/llvm/test/Transforms/Attributor/nonnull.ll
index f13d23b81b5c4..17e9ff9c26470 100644
--- a/llvm/test/Transforms/Attributor/nonnull.ll
+++ b/llvm/test/Transforms/Attributor/nonnull.ll
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=18 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=18 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
+; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=13 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=13 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
 ; RUN: opt -attributor-cgscc -enable-new-pm=0 -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_NPM,IS__CGSCC____,IS________OPM,IS__CGSCC_OPM
 ; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM
 

diff  --git a/llvm/test/Transforms/Attributor/norecurse.ll b/llvm/test/Transforms/Attributor/norecurse.ll
index 3aa9c4f4cbd2e..945c0f93fe738 100644
--- a/llvm/test/Transforms/Attributor/norecurse.ll
+++ b/llvm/test/Transforms/Attributor/norecurse.ll
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=8 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=8 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
+; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=7 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=7 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
 ; RUN: opt -attributor-cgscc -enable-new-pm=0 -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_NPM,IS__CGSCC____,IS________OPM,IS__CGSCC_OPM
 ; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM
 
@@ -257,27 +257,16 @@ Dead:
 }
 
 define i1 @test_rec_neg(i1 %c) norecurse {
-; IS__TUNIT____: Function Attrs: norecurse
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test_rec_neg
-; IS__TUNIT____-SAME: (i1 [[C:%.*]]) #[[ATTR8:[0-9]+]] {
-; IS__TUNIT____-NEXT:    [[RC1:%.*]] = call i1 @rec(i1 noundef true)
-; IS__TUNIT____-NEXT:    br i1 [[RC1]], label [[T:%.*]], label [[F:%.*]]
-; IS__TUNIT____:       t:
-; IS__TUNIT____-NEXT:    [[RC2:%.*]] = call i1 @rec(i1 [[C]])
-; IS__TUNIT____-NEXT:    ret i1 [[RC2]]
-; IS__TUNIT____:       f:
-; IS__TUNIT____-NEXT:    ret i1 [[RC1]]
-;
-; IS__CGSCC____: Function Attrs: norecurse
-; IS__CGSCC____-LABEL: define {{[^@]+}}@test_rec_neg
-; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR8:[0-9]+]] {
-; IS__CGSCC____-NEXT:    [[RC1:%.*]] = call noundef i1 @rec(i1 noundef true)
-; IS__CGSCC____-NEXT:    br i1 [[RC1]], label [[T:%.*]], label [[F:%.*]]
-; IS__CGSCC____:       t:
-; IS__CGSCC____-NEXT:    [[RC2:%.*]] = call noundef i1 @rec(i1 [[C]])
-; IS__CGSCC____-NEXT:    ret i1 [[RC2]]
-; IS__CGSCC____:       f:
-; IS__CGSCC____-NEXT:    ret i1 [[RC1]]
+; CHECK: Function Attrs: norecurse
+; CHECK-LABEL: define {{[^@]+}}@test_rec_neg
+; CHECK-SAME: (i1 [[C:%.*]]) #[[ATTR8:[0-9]+]] {
+; CHECK-NEXT:    [[RC1:%.*]] = call noundef i1 @rec(i1 noundef true)
+; CHECK-NEXT:    br i1 [[RC1]], label [[T:%.*]], label [[F:%.*]]
+; CHECK:       t:
+; CHECK-NEXT:    [[RC2:%.*]] = call noundef i1 @rec(i1 [[C]])
+; CHECK-NEXT:    ret i1 [[RC2]]
+; CHECK:       f:
+; CHECK-NEXT:    ret i1 [[RC1]]
 ;
   %rc1 = call i1 @rec(i1 true)
   br i1 %rc1, label %t, label %f
@@ -317,6 +306,6 @@ f:
 ; CHECK: attributes #[[ATTR5:[0-9]+]] = { argmemonly nofree nounwind willreturn }
 ; CHECK: attributes #[[ATTR6]] = { norecurse nosync readnone }
 ; CHECK: attributes #[[ATTR7]] = { null_pointer_is_valid }
-; CHECK: attributes #[[ATTR8:[0-9]+]] = { norecurse }
+; CHECK: attributes #[[ATTR8]] = { norecurse }
 ; CHECK: attributes #[[ATTR9]] = { willreturn }
 ;.

diff  --git a/llvm/test/Transforms/Attributor/potential.ll b/llvm/test/Transforms/Attributor/potential.ll
index 5dda32217c2ba..b90e7d16a4b4d 100644
--- a/llvm/test/Transforms/Attributor/potential.ll
+++ b/llvm/test/Transforms/Attributor/potential.ll
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; RUN: opt -enable-new-pm=0 -attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=24 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=24 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
+; RUN: opt -enable-new-pm=0 -attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=20 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=20 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
 ; RUN: opt -enable-new-pm=0 -attributor-cgscc -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_NPM,IS__CGSCC____,IS________OPM,IS__CGSCC_OPM
 ; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM
 ;
@@ -13,8 +13,9 @@
 define internal i1 @iszero1(i32 %c) {
 ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@iszero1
-; IS__CGSCC____-SAME: () #[[ATTR0:[0-9]+]] {
-; IS__CGSCC____-NEXT:    ret i1 false
+; IS__CGSCC____-SAME: (i32 noundef [[C:%.*]]) #[[ATTR0:[0-9]+]] {
+; IS__CGSCC____-NEXT:    [[CMP:%.*]] = icmp eq i32 [[C]], 0
+; IS__CGSCC____-NEXT:    ret i1 [[CMP]]
 ;
   %cmp = icmp eq i32 %c, 0
   ret i1 %cmp
@@ -29,13 +30,15 @@ define i1 @potential_test1(i1 %c) {
 ; IS__CGSCC_OPM: Function Attrs: nofree nosync nounwind readnone willreturn
 ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@potential_test1
 ; IS__CGSCC_OPM-SAME: (i1 [[C:%.*]]) #[[ATTR1:[0-9]+]] {
-; IS__CGSCC_OPM-NEXT:    [[RET:%.*]] = call noundef i1 @iszero1() #[[ATTR3:[0-9]+]]
+; IS__CGSCC_OPM-NEXT:    [[ARG:%.*]] = select i1 [[C]], i32 -1, i32 1
+; IS__CGSCC_OPM-NEXT:    [[RET:%.*]] = call i1 @iszero1(i32 noundef [[ARG]]) #[[ATTR3:[0-9]+]]
 ; IS__CGSCC_OPM-NEXT:    ret i1 [[RET]]
 ;
 ; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
 ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@potential_test1
 ; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]]) #[[ATTR1:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT:    [[RET:%.*]] = call noundef i1 @iszero1() #[[ATTR2:[0-9]+]]
+; IS__CGSCC_NPM-NEXT:    [[ARG:%.*]] = select i1 [[C]], i32 -1, i32 1
+; IS__CGSCC_NPM-NEXT:    [[RET:%.*]] = call i1 @iszero1(i32 noundef [[ARG]]) #[[ATTR2:[0-9]+]]
 ; IS__CGSCC_NPM-NEXT:    ret i1 [[RET]]
 ;
   %arg = select i1 %c, i32 -1, i32 1
@@ -71,7 +74,7 @@ define internal i32 @call_with_two_values(i32 %c) {
 ; IS__CGSCC_OPM-SAME: (i32 noundef [[C:%.*]]) #[[ATTR1]] {
 ; IS__CGSCC_OPM-NEXT:    [[CSRET1:%.*]] = call i32 @iszero2(i32 noundef [[C]]) #[[ATTR3]]
 ; IS__CGSCC_OPM-NEXT:    [[MINUSC:%.*]] = sub i32 0, [[C]]
-; IS__CGSCC_OPM-NEXT:    [[CSRET2:%.*]] = call i32 @iszero2(i32 noundef [[MINUSC]]) #[[ATTR3]]
+; IS__CGSCC_OPM-NEXT:    [[CSRET2:%.*]] = call i32 @iszero2(i32 [[MINUSC]]) #[[ATTR3]]
 ; IS__CGSCC_OPM-NEXT:    [[RET:%.*]] = add i32 [[CSRET1]], [[CSRET2]]
 ; IS__CGSCC_OPM-NEXT:    ret i32 [[RET]]
 ;
@@ -80,7 +83,7 @@ define internal i32 @call_with_two_values(i32 %c) {
 ; IS__CGSCC_NPM-SAME: (i32 noundef [[C:%.*]]) #[[ATTR1]] {
 ; IS__CGSCC_NPM-NEXT:    [[CSRET1:%.*]] = call i32 @iszero2(i32 noundef [[C]]) #[[ATTR2]]
 ; IS__CGSCC_NPM-NEXT:    [[MINUSC:%.*]] = sub i32 0, [[C]]
-; IS__CGSCC_NPM-NEXT:    [[CSRET2:%.*]] = call i32 @iszero2(i32 noundef [[MINUSC]]) #[[ATTR2]]
+; IS__CGSCC_NPM-NEXT:    [[CSRET2:%.*]] = call i32 @iszero2(i32 [[MINUSC]]) #[[ATTR2]]
 ; IS__CGSCC_NPM-NEXT:    [[RET:%.*]] = add i32 [[CSRET1]], [[CSRET2]]
 ; IS__CGSCC_NPM-NEXT:    ret i32 [[RET]]
 ;
@@ -264,14 +267,14 @@ define i1 @potential_test6(i32 %c) {
 ; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
 ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@potential_test6
 ; IS__TUNIT_OPM-SAME: (i32 [[C:%.*]]) #[[ATTR0]] {
-; IS__TUNIT_OPM-NEXT:    [[CSRET1:%.*]] = call i32 @return1or3(i32 [[C]]) #[[ATTR2:[0-9]+]]
+; IS__TUNIT_OPM-NEXT:    [[CSRET1:%.*]] = call i32 @return1or3(i32 [[C]]) #[[ATTR2:[0-9]+]], !range [[RNG0:![0-9]+]]
 ; IS__TUNIT_OPM-NEXT:    [[RET:%.*]] = icmp eq i32 [[CSRET1]], 3
 ; IS__TUNIT_OPM-NEXT:    ret i1 [[RET]]
 ;
 ; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
 ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@potential_test6
 ; IS__TUNIT_NPM-SAME: (i32 [[C:%.*]]) #[[ATTR0]] {
-; IS__TUNIT_NPM-NEXT:    [[CSRET1:%.*]] = call i32 @return1or3(i32 [[C]]) #[[ATTR1:[0-9]+]]
+; IS__TUNIT_NPM-NEXT:    [[CSRET1:%.*]] = call i32 @return1or3(i32 [[C]]) #[[ATTR1:[0-9]+]], !range [[RNG0:![0-9]+]]
 ; IS__TUNIT_NPM-NEXT:    [[RET:%.*]] = icmp eq i32 [[CSRET1]], 3
 ; IS__TUNIT_NPM-NEXT:    ret i1 [[RET]]
 ;
@@ -298,16 +301,16 @@ define i1 @potential_test7(i32 %c) {
 ; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
 ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@potential_test7
 ; IS__TUNIT_OPM-SAME: (i32 [[C:%.*]]) #[[ATTR0]] {
-; IS__TUNIT_OPM-NEXT:    [[CSRET1:%.*]] = call i32 @return1or3(i32 [[C]]) #[[ATTR2]]
-; IS__TUNIT_OPM-NEXT:    [[CSRET2:%.*]] = call i32 @return3or4(i32 [[C]]) #[[ATTR2]]
+; IS__TUNIT_OPM-NEXT:    [[CSRET1:%.*]] = call i32 @return1or3(i32 [[C]]) #[[ATTR2]], !range [[RNG0]]
+; IS__TUNIT_OPM-NEXT:    [[CSRET2:%.*]] = call i32 @return3or4(i32 [[C]]) #[[ATTR2]], !range [[RNG1:![0-9]+]]
 ; IS__TUNIT_OPM-NEXT:    [[RET:%.*]] = icmp eq i32 [[CSRET1]], [[CSRET2]]
 ; IS__TUNIT_OPM-NEXT:    ret i1 [[RET]]
 ;
 ; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
 ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@potential_test7
 ; IS__TUNIT_NPM-SAME: (i32 [[C:%.*]]) #[[ATTR0]] {
-; IS__TUNIT_NPM-NEXT:    [[CSRET1:%.*]] = call i32 @return1or3(i32 [[C]]) #[[ATTR1]]
-; IS__TUNIT_NPM-NEXT:    [[CSRET2:%.*]] = call i32 @return3or4(i32 [[C]]) #[[ATTR1]]
+; IS__TUNIT_NPM-NEXT:    [[CSRET1:%.*]] = call i32 @return1or3(i32 [[C]]) #[[ATTR1]], !range [[RNG0]]
+; IS__TUNIT_NPM-NEXT:    [[CSRET2:%.*]] = call i32 @return3or4(i32 [[C]]) #[[ATTR1]], !range [[RNG1:![0-9]+]]
 ; IS__TUNIT_NPM-NEXT:    [[RET:%.*]] = icmp eq i32 [[CSRET1]], [[CSRET2]]
 ; IS__TUNIT_NPM-NEXT:    ret i1 [[RET]]
 ;
@@ -379,7 +382,7 @@ define internal i32 @return3or4(i32 %c) {
 define internal i1 @cmp_with_four(i32 %c) {
 ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@cmp_with_four
-; IS__CGSCC____-SAME: (i32 [[C:%.*]]) #[[ATTR0]] {
+; IS__CGSCC____-SAME: (i32 noundef [[C:%.*]]) #[[ATTR0]] {
 ; IS__CGSCC____-NEXT:    [[CMP:%.*]] = icmp eq i32 [[C]], 4
 ; IS__CGSCC____-NEXT:    ret i1 [[CMP]]
 ;
@@ -629,9 +632,9 @@ define i32 @potential_test11(i1 %c) {
 ; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
 ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@potential_test11
 ; IS__TUNIT_OPM-SAME: (i1 [[C:%.*]]) #[[ATTR0]] {
-; IS__TUNIT_OPM-NEXT:    [[ZERO1:%.*]] = call i32 @optimize_undef_1(i1 [[C]]) #[[ATTR2]]
-; IS__TUNIT_OPM-NEXT:    [[ZERO2:%.*]] = call i32 @optimize_undef_2(i1 [[C]]) #[[ATTR2]]
-; IS__TUNIT_OPM-NEXT:    [[ZERO3:%.*]] = call i32 @optimize_undef_3(i1 [[C]]) #[[ATTR2]]
+; IS__TUNIT_OPM-NEXT:    [[ZERO1:%.*]] = call i32 @optimize_undef_1(i1 [[C]]) #[[ATTR2]], !range [[RNG2:![0-9]+]]
+; IS__TUNIT_OPM-NEXT:    [[ZERO2:%.*]] = call i32 @optimize_undef_2(i1 [[C]]) #[[ATTR2]], !range [[RNG3:![0-9]+]]
+; IS__TUNIT_OPM-NEXT:    [[ZERO3:%.*]] = call i32 @optimize_undef_3(i1 [[C]]) #[[ATTR2]], !range [[RNG2]]
 ; IS__TUNIT_OPM-NEXT:    [[ACC1:%.*]] = add i32 [[ZERO1]], [[ZERO2]]
 ; IS__TUNIT_OPM-NEXT:    [[ACC2:%.*]] = add i32 [[ACC1]], [[ZERO3]]
 ; IS__TUNIT_OPM-NEXT:    ret i32 [[ACC2]]
@@ -639,9 +642,9 @@ define i32 @potential_test11(i1 %c) {
 ; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
 ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@potential_test11
 ; IS__TUNIT_NPM-SAME: (i1 [[C:%.*]]) #[[ATTR0]] {
-; IS__TUNIT_NPM-NEXT:    [[ZERO1:%.*]] = call i32 @optimize_undef_1(i1 [[C]]) #[[ATTR1]]
-; IS__TUNIT_NPM-NEXT:    [[ZERO2:%.*]] = call i32 @optimize_undef_2(i1 [[C]]) #[[ATTR1]]
-; IS__TUNIT_NPM-NEXT:    [[ZERO3:%.*]] = call i32 @optimize_undef_3(i1 [[C]]) #[[ATTR1]]
+; IS__TUNIT_NPM-NEXT:    [[ZERO1:%.*]] = call i32 @optimize_undef_1(i1 [[C]]) #[[ATTR1]], !range [[RNG2:![0-9]+]]
+; IS__TUNIT_NPM-NEXT:    [[ZERO2:%.*]] = call i32 @optimize_undef_2(i1 [[C]]) #[[ATTR1]], !range [[RNG3:![0-9]+]]
+; IS__TUNIT_NPM-NEXT:    [[ZERO3:%.*]] = call i32 @optimize_undef_3(i1 [[C]]) #[[ATTR1]], !range [[RNG2]]
 ; IS__TUNIT_NPM-NEXT:    [[ACC1:%.*]] = add i32 [[ZERO1]], [[ZERO2]]
 ; IS__TUNIT_NPM-NEXT:    [[ACC2:%.*]] = add i32 [[ACC1]], [[ZERO3]]
 ; IS__TUNIT_NPM-NEXT:    ret i32 [[ACC2]]
@@ -691,7 +694,7 @@ define i32 @optimize_poison_1(i1 %c) {
 ; IS________NPM:       t:
 ; IS________NPM-NEXT:    ret i32 0
 ; IS________NPM:       f:
-; IS________NPM-NEXT:    unreachable
+; IS________NPM-NEXT:    ret i32 undef
 ;
   br i1 %c, label %t, label %f
 t:
@@ -706,7 +709,7 @@ define i32 @potential_test12(i1 %c) {
 ; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
 ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@potential_test12
 ; IS__TUNIT_OPM-SAME: (i1 [[C:%.*]]) #[[ATTR0]] {
-; IS__TUNIT_OPM-NEXT:    [[ZERO:%.*]] = call i32 @optimize_poison_1(i1 [[C]]) #[[ATTR2]]
+; IS__TUNIT_OPM-NEXT:    [[ZERO:%.*]] = call noundef i32 @optimize_poison_1(i1 [[C]]) #[[ATTR2]], !range [[RNG3]]
 ; IS__TUNIT_OPM-NEXT:    ret i32 [[ZERO]]
 ;
 ; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
@@ -750,25 +753,25 @@ define i32 @potential_test13_caller1() {
 ; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
 ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@potential_test13_caller1
 ; IS__TUNIT_OPM-SAME: () #[[ATTR0]] {
-; IS__TUNIT_OPM-NEXT:    [[RET:%.*]] = call i32 @potential_test13_callee(i32 noundef 0) #[[ATTR2]]
+; IS__TUNIT_OPM-NEXT:    [[RET:%.*]] = call i32 @potential_test13_callee(i32 noundef 0) #[[ATTR2]], !range [[RNG2]]
 ; IS__TUNIT_OPM-NEXT:    ret i32 [[RET]]
 ;
 ; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
 ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@potential_test13_caller1
 ; IS__TUNIT_NPM-SAME: () #[[ATTR0]] {
-; IS__TUNIT_NPM-NEXT:    [[RET:%.*]] = call i32 @potential_test13_callee(i32 noundef 0) #[[ATTR1]]
+; IS__TUNIT_NPM-NEXT:    [[RET:%.*]] = call i32 @potential_test13_callee(i32 noundef 0) #[[ATTR1]], !range [[RNG2]]
 ; IS__TUNIT_NPM-NEXT:    ret i32 [[RET]]
 ;
 ; IS__CGSCC_OPM: Function Attrs: nofree nosync nounwind readnone willreturn
 ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@potential_test13_caller1
 ; IS__CGSCC_OPM-SAME: () #[[ATTR1]] {
-; IS__CGSCC_OPM-NEXT:    [[RET:%.*]] = call noundef i32 @potential_test13_callee(i32 noundef 0) #[[ATTR3]]
+; IS__CGSCC_OPM-NEXT:    [[RET:%.*]] = call i32 @potential_test13_callee(i32 noundef 0) #[[ATTR3]]
 ; IS__CGSCC_OPM-NEXT:    ret i32 [[RET]]
 ;
 ; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
 ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@potential_test13_caller1
 ; IS__CGSCC_NPM-SAME: () #[[ATTR1]] {
-; IS__CGSCC_NPM-NEXT:    [[RET:%.*]] = call noundef i32 @potential_test13_callee(i32 noundef 0) #[[ATTR2]]
+; IS__CGSCC_NPM-NEXT:    [[RET:%.*]] = call i32 @potential_test13_callee(i32 noundef 0) #[[ATTR2]]
 ; IS__CGSCC_NPM-NEXT:    ret i32 [[RET]]
 ;
   %ret = call i32 @potential_test13_callee(i32 0)
@@ -779,25 +782,25 @@ define i32 @potential_test13_caller2() {
 ; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
 ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@potential_test13_caller2
 ; IS__TUNIT_OPM-SAME: () #[[ATTR0]] {
-; IS__TUNIT_OPM-NEXT:    [[RET:%.*]] = call i32 @potential_test13_callee(i32 noundef 1) #[[ATTR2]]
+; IS__TUNIT_OPM-NEXT:    [[RET:%.*]] = call i32 @potential_test13_callee(i32 noundef 1) #[[ATTR2]], !range [[RNG2]]
 ; IS__TUNIT_OPM-NEXT:    ret i32 [[RET]]
 ;
 ; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
 ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@potential_test13_caller2
 ; IS__TUNIT_NPM-SAME: () #[[ATTR0]] {
-; IS__TUNIT_NPM-NEXT:    [[RET:%.*]] = call i32 @potential_test13_callee(i32 noundef 1) #[[ATTR1]]
+; IS__TUNIT_NPM-NEXT:    [[RET:%.*]] = call i32 @potential_test13_callee(i32 noundef 1) #[[ATTR1]], !range [[RNG2]]
 ; IS__TUNIT_NPM-NEXT:    ret i32 [[RET]]
 ;
 ; IS__CGSCC_OPM: Function Attrs: nofree nosync nounwind readnone willreturn
 ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@potential_test13_caller2
 ; IS__CGSCC_OPM-SAME: () #[[ATTR1]] {
-; IS__CGSCC_OPM-NEXT:    [[RET:%.*]] = call noundef i32 @potential_test13_callee(i32 noundef 1) #[[ATTR3]]
+; IS__CGSCC_OPM-NEXT:    [[RET:%.*]] = call i32 @potential_test13_callee(i32 noundef 1) #[[ATTR3]]
 ; IS__CGSCC_OPM-NEXT:    ret i32 [[RET]]
 ;
 ; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
 ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@potential_test13_caller2
 ; IS__CGSCC_NPM-SAME: () #[[ATTR1]] {
-; IS__CGSCC_NPM-NEXT:    [[RET:%.*]] = call noundef i32 @potential_test13_callee(i32 noundef 1) #[[ATTR2]]
+; IS__CGSCC_NPM-NEXT:    [[RET:%.*]] = call i32 @potential_test13_callee(i32 noundef 1) #[[ATTR2]]
 ; IS__CGSCC_NPM-NEXT:    ret i32 [[RET]]
 ;
   %ret = call i32 @potential_test13_callee(i32 1)
@@ -808,25 +811,25 @@ define i32 @potential_test13_caller3() {
 ; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
 ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@potential_test13_caller3
 ; IS__TUNIT_OPM-SAME: () #[[ATTR0]] {
-; IS__TUNIT_OPM-NEXT:    [[RET:%.*]] = call i32 @potential_test13_callee(i32 undef) #[[ATTR2]]
+; IS__TUNIT_OPM-NEXT:    [[RET:%.*]] = call i32 @potential_test13_callee(i32 undef) #[[ATTR2]], !range [[RNG2]]
 ; IS__TUNIT_OPM-NEXT:    ret i32 [[RET]]
 ;
 ; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
 ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@potential_test13_caller3
 ; IS__TUNIT_NPM-SAME: () #[[ATTR0]] {
-; IS__TUNIT_NPM-NEXT:    [[RET:%.*]] = call i32 @potential_test13_callee(i32 undef) #[[ATTR1]]
+; IS__TUNIT_NPM-NEXT:    [[RET:%.*]] = call i32 @potential_test13_callee(i32 undef) #[[ATTR1]], !range [[RNG2]]
 ; IS__TUNIT_NPM-NEXT:    ret i32 [[RET]]
 ;
 ; IS__CGSCC_OPM: Function Attrs: nofree nosync nounwind readnone willreturn
 ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@potential_test13_caller3
 ; IS__CGSCC_OPM-SAME: () #[[ATTR1]] {
-; IS__CGSCC_OPM-NEXT:    [[RET:%.*]] = call noundef i32 @potential_test13_callee(i32 undef) #[[ATTR3]]
+; IS__CGSCC_OPM-NEXT:    [[RET:%.*]] = call i32 @potential_test13_callee(i32 undef) #[[ATTR3]]
 ; IS__CGSCC_OPM-NEXT:    ret i32 [[RET]]
 ;
 ; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
 ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@potential_test13_caller3
 ; IS__CGSCC_NPM-SAME: () #[[ATTR1]] {
-; IS__CGSCC_NPM-NEXT:    [[RET:%.*]] = call noundef i32 @potential_test13_callee(i32 undef) #[[ATTR2]]
+; IS__CGSCC_NPM-NEXT:    [[RET:%.*]] = call i32 @potential_test13_callee(i32 undef) #[[ATTR2]]
 ; IS__CGSCC_NPM-NEXT:    ret i32 [[RET]]
 ;
   %ret = call i32 @potential_test13_callee(i32 undef)
@@ -893,3 +896,8 @@ define i1 @potential_test16(i1 %c0, i1 %c1) {
 ; IS__CGSCC_NPM: attributes #[[ATTR1]] = { nofree nosync nounwind readnone willreturn }
 ; IS__CGSCC_NPM: attributes #[[ATTR2]] = { readnone willreturn }
 ;.
+; IS__TUNIT____: [[META0:![0-9]+]] = !{i32 1, i32 4}
+; IS__TUNIT____: [[META1:![0-9]+]] = !{i32 3, i32 5}
+; IS__TUNIT____: [[META2:![0-9]+]] = !{i32 0, i32 2}
+; IS__TUNIT____: [[META3:![0-9]+]] = !{i32 -1, i32 1}
+;.

diff  --git a/llvm/test/Transforms/Attributor/range.ll b/llvm/test/Transforms/Attributor/range.ll
index cceb469695e7c..eb22052fdfab1 100644
--- a/llvm/test/Transforms/Attributor/range.ll
+++ b/llvm/test/Transforms/Attributor/range.ll
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=28 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=29 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
+; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=22 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=21 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
 ; RUN: opt -attributor-cgscc -enable-new-pm=0 -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_NPM,IS__CGSCC____,IS________OPM,IS__CGSCC_OPM
 ; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM
 
@@ -685,10 +685,15 @@ entry:
 }
 
 define dso_local i32 @test-5() {
-; IS__TUNIT____-LABEL: define {{[^@]+}}@test-5() {
-; IS__TUNIT____-NEXT:  entry:
-; IS__TUNIT____-NEXT:    [[CALL:%.*]] = call i32 @rec(i32 noundef 0)
-; IS__TUNIT____-NEXT:    ret i32 [[CALL]]
+; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@test-5() {
+; IS__TUNIT_OPM-NEXT:  entry:
+; IS__TUNIT_OPM-NEXT:    [[CALL:%.*]] = call noundef i32 @rec(i32 noundef 0), !range [[RNG3:![0-9]+]]
+; IS__TUNIT_OPM-NEXT:    ret i32 [[CALL]]
+;
+; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@test-5() {
+; IS__TUNIT_NPM-NEXT:  entry:
+; IS__TUNIT_NPM-NEXT:    [[CALL:%.*]] = call noundef i32 @rec(i32 noundef 0), !range [[RNG4:![0-9]+]]
+; IS__TUNIT_NPM-NEXT:    ret i32 [[CALL]]
 ;
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@test-5() {
 ; IS__CGSCC____-NEXT:  entry:
@@ -1315,8 +1320,8 @@ define i1 @callee_range_2(i1 %c1, i1 %c2) {
 ; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
 ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@callee_range_2
 ; IS__TUNIT_OPM-SAME: (i1 [[C1:%.*]], i1 [[C2:%.*]]) #[[ATTR1]] {
-; IS__TUNIT_OPM-NEXT:    [[R1:%.*]] = call i32 @ret1or2(i1 [[C1]]) #[[ATTR5]]
-; IS__TUNIT_OPM-NEXT:    [[R2:%.*]] = call i32 @ret1or2(i1 [[C2]]) #[[ATTR5]]
+; IS__TUNIT_OPM-NEXT:    [[R1:%.*]] = call i32 @ret1or2(i1 [[C1]]) #[[ATTR5]], !range [[RNG4:![0-9]+]]
+; IS__TUNIT_OPM-NEXT:    [[R2:%.*]] = call i32 @ret1or2(i1 [[C2]]) #[[ATTR5]], !range [[RNG4]]
 ; IS__TUNIT_OPM-NEXT:    [[A:%.*]] = add i32 [[R1]], [[R2]]
 ; IS__TUNIT_OPM-NEXT:    [[I1:%.*]] = icmp sle i32 [[A]], 3
 ; IS__TUNIT_OPM-NEXT:    ret i1 [[I1]]
@@ -1324,8 +1329,8 @@ define i1 @callee_range_2(i1 %c1, i1 %c2) {
 ; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
 ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@callee_range_2
 ; IS__TUNIT_NPM-SAME: (i1 [[C1:%.*]], i1 [[C2:%.*]]) #[[ATTR1]] {
-; IS__TUNIT_NPM-NEXT:    [[R1:%.*]] = call i32 @ret1or2(i1 [[C1]]) #[[ATTR4]]
-; IS__TUNIT_NPM-NEXT:    [[R2:%.*]] = call i32 @ret1or2(i1 [[C2]]) #[[ATTR4]]
+; IS__TUNIT_NPM-NEXT:    [[R1:%.*]] = call i32 @ret1or2(i1 [[C1]]) #[[ATTR4]], !range [[RNG5:![0-9]+]]
+; IS__TUNIT_NPM-NEXT:    [[R2:%.*]] = call i32 @ret1or2(i1 [[C2]]) #[[ATTR4]], !range [[RNG5]]
 ; IS__TUNIT_NPM-NEXT:    [[A:%.*]] = add i32 [[R1]], [[R2]]
 ; IS__TUNIT_NPM-NEXT:    [[I1:%.*]] = icmp sle i32 [[A]], 3
 ; IS__TUNIT_NPM-NEXT:    ret i1 [[I1]]
@@ -1383,19 +1388,31 @@ define i32 @ret100() {
 
 define i1 @ctx_adjustment(i32 %V) {
 ;
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@ctx_adjustment
-; IS__TUNIT____-SAME: (i32 [[V:%.*]]) #[[ATTR1]] {
-; IS__TUNIT____-NEXT:    [[C1:%.*]] = icmp sge i32 [[V]], 100
-; IS__TUNIT____-NEXT:    br i1 [[C1]], label [[IF_TRUE:%.*]], label [[IF_FALSE:%.*]]
-; IS__TUNIT____:       if.true:
-; IS__TUNIT____-NEXT:    br label [[END:%.*]]
-; IS__TUNIT____:       if.false:
-; IS__TUNIT____-NEXT:    br label [[END]]
-; IS__TUNIT____:       end:
-; IS__TUNIT____-NEXT:    [[PHI:%.*]] = phi i32 [ [[V]], [[IF_TRUE]] ], [ 100, [[IF_FALSE]] ]
-; IS__TUNIT____-NEXT:    [[C2:%.*]] = icmp sge i32 [[PHI]], 100
-; IS__TUNIT____-NEXT:    ret i1 [[C2]]
+; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@ctx_adjustment
+; IS__TUNIT_OPM-SAME: (i32 [[V:%.*]]) #[[ATTR1]] {
+; IS__TUNIT_OPM-NEXT:    [[C1:%.*]] = icmp sge i32 [[V]], 100
+; IS__TUNIT_OPM-NEXT:    br i1 [[C1]], label [[IF_TRUE:%.*]], label [[IF_FALSE:%.*]]
+; IS__TUNIT_OPM:       if.true:
+; IS__TUNIT_OPM-NEXT:    br label [[END:%.*]]
+; IS__TUNIT_OPM:       if.false:
+; IS__TUNIT_OPM-NEXT:    br label [[END]]
+; IS__TUNIT_OPM:       end:
+; IS__TUNIT_OPM-NEXT:    [[PHI:%.*]] = phi i32 [ [[V]], [[IF_TRUE]] ], [ 100, [[IF_FALSE]] ]
+; IS__TUNIT_OPM-NEXT:    [[C2:%.*]] = icmp sge i32 [[PHI]], 100
+; IS__TUNIT_OPM-NEXT:    ret i1 [[C2]]
+;
+; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@ctx_adjustment
+; IS__TUNIT_NPM-SAME: (i32 [[V:%.*]]) #[[ATTR1]] {
+; IS__TUNIT_NPM-NEXT:    [[C1:%.*]] = icmp sge i32 [[V]], 100
+; IS__TUNIT_NPM-NEXT:    br i1 [[C1]], label [[IF_TRUE:%.*]], label [[IF_FALSE:%.*]]
+; IS__TUNIT_NPM:       if.true:
+; IS__TUNIT_NPM-NEXT:    br label [[END:%.*]]
+; IS__TUNIT_NPM:       if.false:
+; IS__TUNIT_NPM-NEXT:    br label [[END]]
+; IS__TUNIT_NPM:       end:
+; IS__TUNIT_NPM-NEXT:    ret i1 true
 ;
 ; IS__CGSCC_OPM: Function Attrs: nofree nosync nounwind readnone willreturn
 ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@ctx_adjustment
@@ -1471,10 +1488,10 @@ define i32 @simplify_callsite_argument(i1 %d) {
 ; IS__TUNIT_OPM-NEXT:    [[C:%.*]] = select i1 [[D]], i1 true, i1 false
 ; IS__TUNIT_OPM-NEXT:    br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
 ; IS__TUNIT_OPM:       t:
-; IS__TUNIT_OPM-NEXT:    [[RET1:%.*]] = call i32 @func(i1 noundef [[C]]) #[[ATTR5]]
+; IS__TUNIT_OPM-NEXT:    [[RET1:%.*]] = call noundef i32 @func(i1 noundef [[C]]) #[[ATTR5]], !range [[RNG3]]
 ; IS__TUNIT_OPM-NEXT:    ret i32 [[RET1]]
 ; IS__TUNIT_OPM:       f:
-; IS__TUNIT_OPM-NEXT:    [[RET2:%.*]] = call i32 @func(i1 noundef false) #[[ATTR5]]
+; IS__TUNIT_OPM-NEXT:    [[RET2:%.*]] = call noundef i32 @func(i1 noundef false) #[[ATTR5]], !range [[RNG3]]
 ; IS__TUNIT_OPM-NEXT:    ret i32 [[RET2]]
 ;
 ; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
@@ -1483,10 +1500,10 @@ define i32 @simplify_callsite_argument(i1 %d) {
 ; IS__TUNIT_NPM-NEXT:    [[C:%.*]] = select i1 [[D]], i1 true, i1 false
 ; IS__TUNIT_NPM-NEXT:    br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
 ; IS__TUNIT_NPM:       t:
-; IS__TUNIT_NPM-NEXT:    [[RET1:%.*]] = call i32 @func(i1 noundef [[C]]) #[[ATTR4]]
+; IS__TUNIT_NPM-NEXT:    [[RET1:%.*]] = call noundef i32 @func(i1 noundef true) #[[ATTR4]], !range [[RNG4]]
 ; IS__TUNIT_NPM-NEXT:    ret i32 [[RET1]]
 ; IS__TUNIT_NPM:       f:
-; IS__TUNIT_NPM-NEXT:    [[RET2:%.*]] = call i32 @func(i1 noundef false) #[[ATTR4]]
+; IS__TUNIT_NPM-NEXT:    [[RET2:%.*]] = call noundef i32 @func(i1 noundef false) #[[ATTR4]], !range [[RNG4]]
 ; IS__TUNIT_NPM-NEXT:    ret i32 [[RET2]]
 ;
 ; IS__CGSCC_OPM: Function Attrs: nofree nosync nounwind readnone willreturn
@@ -1507,7 +1524,7 @@ define i32 @simplify_callsite_argument(i1 %d) {
 ; IS__CGSCC_NPM-NEXT:    [[C:%.*]] = select i1 [[D]], i1 true, i1 false
 ; IS__CGSCC_NPM-NEXT:    br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
 ; IS__CGSCC_NPM:       t:
-; IS__CGSCC_NPM-NEXT:    [[RET1:%.*]] = call noundef i32 @func(i1 noundef [[C]]) #[[ATTR6]]
+; IS__CGSCC_NPM-NEXT:    [[RET1:%.*]] = call noundef i32 @func(i1 noundef true) #[[ATTR6]]
 ; IS__CGSCC_NPM-NEXT:    ret i32 [[RET1]]
 ; IS__CGSCC_NPM:       f:
 ; IS__CGSCC_NPM-NEXT:    [[RET2:%.*]] = call noundef i32 @func(i1 noundef false) #[[ATTR6]]
@@ -1786,35 +1803,6 @@ define i1 @propagate_range1(i32 %c){
 
 define internal i32 @less_than_100_2(i32 %c) {
 ;
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@less_than_100_2
-; IS__TUNIT____-SAME: (i32 [[C:%.*]]) #[[ATTR1]] {
-; IS__TUNIT____-NEXT:    switch i32 [[C]], label [[OTHERWISE:%.*]] [
-; IS__TUNIT____-NEXT:    i32 0, label [[ONZERO:%.*]]
-; IS__TUNIT____-NEXT:    i32 1, label [[ONONE:%.*]]
-; IS__TUNIT____-NEXT:    i32 2, label [[ONTWO:%.*]]
-; IS__TUNIT____-NEXT:    i32 3, label [[ONTHREE:%.*]]
-; IS__TUNIT____-NEXT:    i32 4, label [[ONFOUR:%.*]]
-; IS__TUNIT____-NEXT:    i32 5, label [[ONFIVE:%.*]]
-; IS__TUNIT____-NEXT:    i32 6, label [[ONSIX:%.*]]
-; IS__TUNIT____-NEXT:    ]
-; IS__TUNIT____:       onzero:
-; IS__TUNIT____-NEXT:    ret i32 0
-; IS__TUNIT____:       onone:
-; IS__TUNIT____-NEXT:    ret i32 1
-; IS__TUNIT____:       ontwo:
-; IS__TUNIT____-NEXT:    ret i32 2
-; IS__TUNIT____:       onthree:
-; IS__TUNIT____-NEXT:    ret i32 3
-; IS__TUNIT____:       onfour:
-; IS__TUNIT____-NEXT:    ret i32 4
-; IS__TUNIT____:       onfive:
-; IS__TUNIT____-NEXT:    ret i32 5
-; IS__TUNIT____:       onsix:
-; IS__TUNIT____-NEXT:    ret i32 6
-; IS__TUNIT____:       otherwise:
-; IS__TUNIT____-NEXT:    ret i32 99
-;
 ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
 ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@less_than_100_2
 ; IS__CGSCC_OPM-SAME: (i32 [[C:%.*]]) #[[ATTR3]] {
@@ -1900,12 +1888,6 @@ otherwise:
 
 define internal i1 @is_less_than_100_2(i32 %c) {
 ;
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@is_less_than_100_2
-; IS__TUNIT____-SAME: (i32 noundef [[C:%.*]]) #[[ATTR1]] {
-; IS__TUNIT____-NEXT:    [[CMP:%.*]] = icmp slt i32 [[C]], 100
-; IS__TUNIT____-NEXT:    ret i1 [[CMP]]
-;
 ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
 ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@is_less_than_100_2
 ; IS__CGSCC_OPM-SAME: (i32 noundef [[C:%.*]]) #[[ATTR3]] {
@@ -1923,25 +1905,10 @@ define internal i1 @is_less_than_100_2(i32 %c) {
 }
 
 define i1 @propagate_range2(i32 %c) {
-; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@propagate_range2
-; IS__TUNIT_OPM-SAME: (i32 [[C:%.*]]) #[[ATTR1]] {
-; IS__TUNIT_OPM-NEXT:    [[CSRET1:%.*]] = call noundef i32 @less_than_100_2(i32 noundef 0) #[[ATTR5]]
-; IS__TUNIT_OPM-NEXT:    [[TRUE1:%.*]] = call i1 @is_less_than_100_2(i32 noundef [[CSRET1]]) #[[ATTR5]]
-; IS__TUNIT_OPM-NEXT:    [[CSRET2:%.*]] = call noundef i32 @less_than_100_2(i32 [[C]]) #[[ATTR5]]
-; IS__TUNIT_OPM-NEXT:    [[TRUE2:%.*]] = call i1 @is_less_than_100_2(i32 noundef [[CSRET2]]) #[[ATTR5]]
-; IS__TUNIT_OPM-NEXT:    [[TRUE:%.*]] = and i1 [[TRUE1]], [[TRUE2]]
-; IS__TUNIT_OPM-NEXT:    ret i1 [[TRUE]]
-;
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@propagate_range2
-; IS__TUNIT_NPM-SAME: (i32 [[C:%.*]]) #[[ATTR1]] {
-; IS__TUNIT_NPM-NEXT:    [[CSRET1:%.*]] = call noundef i32 @less_than_100_2(i32 noundef 0) #[[ATTR4]]
-; IS__TUNIT_NPM-NEXT:    [[TRUE1:%.*]] = call i1 @is_less_than_100_2(i32 noundef [[CSRET1]]) #[[ATTR4]]
-; IS__TUNIT_NPM-NEXT:    [[CSRET2:%.*]] = call noundef i32 @less_than_100_2(i32 [[C]]) #[[ATTR4]]
-; IS__TUNIT_NPM-NEXT:    [[TRUE2:%.*]] = call i1 @is_less_than_100_2(i32 noundef [[CSRET2]]) #[[ATTR4]]
-; IS__TUNIT_NPM-NEXT:    [[TRUE:%.*]] = and i1 [[TRUE1]], [[TRUE2]]
-; IS__TUNIT_NPM-NEXT:    ret i1 [[TRUE]]
+; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; IS__TUNIT____-LABEL: define {{[^@]+}}@propagate_range2
+; IS__TUNIT____-SAME: (i32 [[C:%.*]]) #[[ATTR1]] {
+; IS__TUNIT____-NEXT:    ret i1 true
 ;
 ; IS__CGSCC_OPM: Function Attrs: nofree nosync nounwind readnone willreturn
 ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@propagate_range2
@@ -1972,11 +1939,11 @@ define i1 @propagate_range2(i32 %c) {
 }
 
 define internal i1 @non_zero(i8 %v) {
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@non_zero
-; IS__TUNIT____-SAME: (i8 [[V:%.*]]) #[[ATTR1]] {
-; IS__TUNIT____-NEXT:    [[R:%.*]] = icmp ne i8 [[V]], 0
-; IS__TUNIT____-NEXT:    ret i1 [[R]]
+; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@non_zero
+; IS__TUNIT_OPM-SAME: (i8 [[V:%.*]]) #[[ATTR1]] {
+; IS__TUNIT_OPM-NEXT:    [[R:%.*]] = icmp ne i8 [[V]], 0
+; IS__TUNIT_OPM-NEXT:    ret i1 [[R]]
 ;
 ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
 ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@non_zero
@@ -2014,8 +1981,7 @@ define i1 @context(i8* %p) {
 ; IS__TUNIT_NPM-NEXT:    [[C:%.*]] = icmp slt i8 0, [[L]]
 ; IS__TUNIT_NPM-NEXT:    br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
 ; IS__TUNIT_NPM:       t:
-; IS__TUNIT_NPM-NEXT:    [[R:%.*]] = call i1 @non_zero(i8 [[L]]) #[[ATTR4]]
-; IS__TUNIT_NPM-NEXT:    ret i1 [[R]]
+; IS__TUNIT_NPM-NEXT:    ret i1 true
 ; IS__TUNIT_NPM:       f:
 ; IS__TUNIT_NPM-NEXT:    ret i1 false
 ;
@@ -2201,11 +2167,15 @@ declare void @barney(i32 signext, i32 signext)
 ; IS__TUNIT_OPM: [[RNG0]] = !{i32 0, i32 10}
 ; IS__TUNIT_OPM: [[RNG1]] = !{i32 10, i32 100}
 ; IS__TUNIT_OPM: [[RNG2]] = !{i32 200, i32 1091}
+; IS__TUNIT_OPM: [[RNG3]] = !{i32 0, i32 2}
+; IS__TUNIT_OPM: [[RNG4]] = !{i32 1, i32 3}
 ;.
 ; IS__TUNIT_NPM: [[RNG0]] = !{i32 0, i32 10}
 ; IS__TUNIT_NPM: [[RNG1]] = !{i32 10, i32 100}
 ; IS__TUNIT_NPM: [[RNG2]] = !{i32 200, i32 1091}
 ; IS__TUNIT_NPM: [[RNG3]] = !{i32 1, i32 -2147483648}
+; IS__TUNIT_NPM: [[RNG4]] = !{i32 0, i32 2}
+; IS__TUNIT_NPM: [[RNG5]] = !{i32 1, i32 3}
 ;.
 ; IS__CGSCC____: [[RNG0]] = !{i32 0, i32 10}
 ; IS__CGSCC____: [[RNG1]] = !{i32 10, i32 100}

diff  --git a/llvm/test/Transforms/Attributor/read_write_returned_arguments_scc.ll b/llvm/test/Transforms/Attributor/read_write_returned_arguments_scc.ll
index 9cd64602975d8..3f125270cdd7a 100644
--- a/llvm/test/Transforms/Attributor/read_write_returned_arguments_scc.ll
+++ b/llvm/test/Transforms/Attributor/read_write_returned_arguments_scc.ll
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=11 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=11 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
+; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=10 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=10 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
 ; RUN: opt -attributor-cgscc -enable-new-pm=0 -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_NPM,IS__CGSCC____,IS________OPM,IS__CGSCC_OPM
 ; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM
 
@@ -37,23 +37,23 @@ target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
 define i32* @external_ret2_nrw(i32* %n0, i32* %r0, i32* %w0) {
 ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind
 ; IS__TUNIT____-LABEL: define {{[^@]+}}@external_ret2_nrw
-; IS__TUNIT____-SAME: (i32* nofree [[N0:%.*]], i32* nofree [[R0:%.*]], i32* nofree returned [[W0:%.*]]) #[[ATTR0:[0-9]+]] {
+; IS__TUNIT____-SAME: (i32* nofree [[N0:%.*]], i32* nofree [[R0:%.*]], i32* nofree [[W0:%.*]]) #[[ATTR0:[0-9]+]] {
 ; IS__TUNIT____-NEXT:  entry:
 ; IS__TUNIT____-NEXT:    [[CALL:%.*]] = call i32* @internal_ret0_nw(i32* nofree [[N0]], i32* nofree [[W0]]) #[[ATTR3:[0-9]+]]
 ; IS__TUNIT____-NEXT:    [[CALL1:%.*]] = call i32* @internal_ret1_rrw(i32* nofree align 4 [[R0]], i32* nofree align 4 [[R0]], i32* nofree [[W0]]) #[[ATTR3]]
 ; IS__TUNIT____-NEXT:    [[CALL2:%.*]] = call i32* @external_sink_ret2_nrw(i32* nofree [[N0]], i32* nocapture nofree readonly align 4 [[R0]], i32* nofree writeonly "no-capture-maybe-returned" [[W0]]) #[[ATTR3]]
 ; IS__TUNIT____-NEXT:    [[CALL3:%.*]] = call i32* @internal_ret1_rw(i32* nofree align 4 [[R0]], i32* nofree [[W0]]) #[[ATTR3]]
-; IS__TUNIT____-NEXT:    ret i32* [[W0]]
+; IS__TUNIT____-NEXT:    ret i32* [[CALL3]]
 ;
 ; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@external_ret2_nrw
-; IS__CGSCC____-SAME: (i32* nofree [[N0:%.*]], i32* nofree [[R0:%.*]], i32* nofree returned [[W0:%.*]]) #[[ATTR0:[0-9]+]] {
+; IS__CGSCC____-SAME: (i32* nofree [[N0:%.*]], i32* nofree [[R0:%.*]], i32* nofree [[W0:%.*]]) #[[ATTR0:[0-9]+]] {
 ; IS__CGSCC____-NEXT:  entry:
 ; IS__CGSCC____-NEXT:    [[CALL:%.*]] = call i32* @internal_ret0_nw(i32* nofree [[N0]], i32* nofree [[W0]]) #[[ATTR2:[0-9]+]]
 ; IS__CGSCC____-NEXT:    [[CALL1:%.*]] = call i32* @internal_ret1_rrw(i32* nofree align 4 [[R0]], i32* nofree align 4 [[R0]], i32* nofree [[W0]]) #[[ATTR2]]
 ; IS__CGSCC____-NEXT:    [[CALL2:%.*]] = call i32* @external_sink_ret2_nrw(i32* nofree [[N0]], i32* nocapture nofree readonly align 4 [[R0]], i32* nofree writeonly [[W0]]) #[[ATTR3:[0-9]+]]
 ; IS__CGSCC____-NEXT:    [[CALL3:%.*]] = call i32* @internal_ret1_rw(i32* nofree align 4 [[R0]], i32* nofree [[W0]]) #[[ATTR2]]
-; IS__CGSCC____-NEXT:    ret i32* [[W0]]
+; IS__CGSCC____-NEXT:    ret i32* [[CALL3]]
 ;
 entry:
   %call = call i32* @internal_ret0_nw(i32* %n0, i32* %w0)
@@ -66,7 +66,7 @@ entry:
 define internal i32* @internal_ret0_nw(i32* %n0, i32* %w0) {
 ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind
 ; IS__TUNIT____-LABEL: define {{[^@]+}}@internal_ret0_nw
-; IS__TUNIT____-SAME: (i32* nofree [[N0:%.*]], i32* nofree [[W0:%.*]]) #[[ATTR0]] {
+; IS__TUNIT____-SAME: (i32* nofree returned [[N0:%.*]], i32* nofree [[W0:%.*]]) #[[ATTR0]] {
 ; IS__TUNIT____-NEXT:  entry:
 ; IS__TUNIT____-NEXT:    [[R0:%.*]] = alloca i32, align 4
 ; IS__TUNIT____-NEXT:    [[R1:%.*]] = alloca i32, align 4
@@ -86,12 +86,12 @@ define internal i32* @internal_ret0_nw(i32* %n0, i32* %w0) {
 ; IS__TUNIT____-NEXT:    [[CALL5:%.*]] = call i32* @internal_ret0_nw(i32* nofree [[N0]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) #[[ATTR3]]
 ; IS__TUNIT____-NEXT:    br label [[RETURN]]
 ; IS__TUNIT____:       return:
-; IS__TUNIT____-NEXT:    [[RETVAL_0:%.*]] = phi i32* [ [[CALL5]], [[IF_END]] ], [ [[N0]], [[IF_THEN]] ]
+; IS__TUNIT____-NEXT:    [[RETVAL_0:%.*]] = phi i32* [ [[N0]], [[IF_END]] ], [ [[N0]], [[IF_THEN]] ]
 ; IS__TUNIT____-NEXT:    ret i32* [[RETVAL_0]]
 ;
 ; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@internal_ret0_nw
-; IS__CGSCC____-SAME: (i32* nofree [[N0:%.*]], i32* nofree [[W0:%.*]]) #[[ATTR0]] {
+; IS__CGSCC____-SAME: (i32* nofree returned [[N0:%.*]], i32* nofree [[W0:%.*]]) #[[ATTR0]] {
 ; IS__CGSCC____-NEXT:  entry:
 ; IS__CGSCC____-NEXT:    [[R0:%.*]] = alloca i32, align 4
 ; IS__CGSCC____-NEXT:    [[R1:%.*]] = alloca i32, align 4
@@ -111,7 +111,7 @@ define internal i32* @internal_ret0_nw(i32* %n0, i32* %w0) {
 ; IS__CGSCC____-NEXT:    [[CALL5:%.*]] = call i32* @internal_ret0_nw(i32* nofree [[N0]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) #[[ATTR2]]
 ; IS__CGSCC____-NEXT:    br label [[RETURN]]
 ; IS__CGSCC____:       return:
-; IS__CGSCC____-NEXT:    [[RETVAL_0:%.*]] = phi i32* [ [[CALL5]], [[IF_END]] ], [ [[N0]], [[IF_THEN]] ]
+; IS__CGSCC____-NEXT:    [[RETVAL_0:%.*]] = phi i32* [ [[N0]], [[IF_END]] ], [ [[N0]], [[IF_THEN]] ]
 ; IS__CGSCC____-NEXT:    ret i32* [[RETVAL_0]]
 ;
 entry:
@@ -166,7 +166,7 @@ define internal i32* @internal_ret1_rrw(i32* %r0, i32* %r1, i32* %w0) {
 ; IS__TUNIT____-NEXT:    [[CALL8:%.*]] = call i32* @internal_ret0_nw(i32* nofree nonnull align 4 dereferenceable(4) [[R1]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) #[[ATTR3]]
 ; IS__TUNIT____-NEXT:    br label [[RETURN]]
 ; IS__TUNIT____:       return:
-; IS__TUNIT____-NEXT:    [[RETVAL_0:%.*]] = phi i32* [ [[CALL8]], [[IF_END]] ], [ [[R1]], [[IF_THEN]] ]
+; IS__TUNIT____-NEXT:    [[RETVAL_0:%.*]] = phi i32* [ [[R1]], [[IF_END]] ], [ [[R1]], [[IF_THEN]] ]
 ; IS__TUNIT____-NEXT:    ret i32* undef
 ;
 ; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind
@@ -194,7 +194,7 @@ define internal i32* @internal_ret1_rrw(i32* %r0, i32* %r1, i32* %w0) {
 ; IS__CGSCC____-NEXT:    [[CALL8:%.*]] = call i32* @internal_ret0_nw(i32* nofree nonnull align 4 dereferenceable(4) [[R1]], i32* nofree nonnull align 4 dereferenceable(4) [[W0]]) #[[ATTR2]]
 ; IS__CGSCC____-NEXT:    br label [[RETURN]]
 ; IS__CGSCC____:       return:
-; IS__CGSCC____-NEXT:    [[RETVAL_0:%.*]] = phi i32* [ [[CALL8]], [[IF_END]] ], [ [[R1]], [[IF_THEN]] ]
+; IS__CGSCC____-NEXT:    [[RETVAL_0:%.*]] = phi i32* [ [[R1]], [[IF_END]] ], [ [[R1]], [[IF_THEN]] ]
 ; IS__CGSCC____-NEXT:    ret i32* undef
 ;
 entry:
@@ -329,11 +329,11 @@ return:                                           ; preds = %if.end, %if.then
 define i32* @external_source_ret2_nrw(i32* %n0, i32* %r0, i32* %w0) {
 ; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse nosync nounwind
 ; IS__TUNIT____-LABEL: define {{[^@]+}}@external_source_ret2_nrw
-; IS__TUNIT____-SAME: (i32* nofree [[N0:%.*]], i32* nofree [[R0:%.*]], i32* nofree returned [[W0:%.*]]) #[[ATTR2:[0-9]+]] {
+; IS__TUNIT____-SAME: (i32* nofree [[N0:%.*]], i32* nofree [[R0:%.*]], i32* nofree [[W0:%.*]]) #[[ATTR2:[0-9]+]] {
 ; IS__TUNIT____-NEXT:  entry:
 ; IS__TUNIT____-NEXT:    [[CALL:%.*]] = call i32* @external_sink_ret2_nrw(i32* nofree [[N0]], i32* nocapture nofree readonly [[R0]], i32* nofree writeonly "no-capture-maybe-returned" [[W0]]) #[[ATTR4:[0-9]+]]
 ; IS__TUNIT____-NEXT:    [[CALL1:%.*]] = call i32* @external_ret2_nrw(i32* nofree [[N0]], i32* nofree [[R0]], i32* nofree [[W0]]) #[[ATTR3]]
-; IS__TUNIT____-NEXT:    ret i32* [[W0]]
+; IS__TUNIT____-NEXT:    ret i32* [[CALL1]]
 ;
 ; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@external_source_ret2_nrw

diff  --git a/llvm/test/Transforms/Attributor/readattrs.ll b/llvm/test/Transforms/Attributor/readattrs.ll
index dcc8d21e91b79..d3af93dbb4c35 100644
--- a/llvm/test/Transforms/Attributor/readattrs.ll
+++ b/llvm/test/Transforms/Attributor/readattrs.ll
@@ -117,12 +117,11 @@ define void @test8_2(i32* %p) {
 ; IS__TUNIT____-NEXT:    store i32 10, i32* [[P]], align 4
 ; IS__TUNIT____-NEXT:    ret void
 ;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn writeonly
+; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@test8_2
 ; IS__CGSCC____-SAME: (i32* nofree writeonly [[P:%.*]]) #[[ATTR4:[0-9]+]] {
 ; IS__CGSCC____-NEXT:  entry:
-; IS__CGSCC____-NEXT:    [[CALL:%.*]] = call align 4 i32* @test8_1(i32* noalias nofree readnone [[P]]) #[[ATTR13:[0-9]+]]
-; IS__CGSCC____-NEXT:    store i32 10, i32* [[CALL]], align 4
+; IS__CGSCC____-NEXT:    store i32 10, i32* [[P]], align 4
 ; IS__CGSCC____-NEXT:    ret void
 ;
 entry:
@@ -146,7 +145,7 @@ define void @test9(<4 x i32*> %ptrs, <4 x i32>%val) {
 ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@test9
 ; IS__CGSCC____-SAME: (<4 x i32*> [[PTRS:%.*]], <4 x i32> [[VAL:%.*]]) #[[ATTR0]] {
-; IS__CGSCC____-NEXT:    call void @llvm.masked.scatter.v4i32.v4p0i32(<4 x i32> [[VAL]], <4 x i32*> [[PTRS]], i32 noundef 4, <4 x i1> noundef <i1 true, i1 false, i1 true, i1 false>) #[[ATTR14:[0-9]+]]
+; IS__CGSCC____-NEXT:    call void @llvm.masked.scatter.v4i32.v4p0i32(<4 x i32> [[VAL]], <4 x i32*> [[PTRS]], i32 noundef 4, <4 x i1> noundef <i1 true, i1 false, i1 true, i1 false>) #[[ATTR13:[0-9]+]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @llvm.masked.scatter.v4i32.v4p0i32(<4 x i32>%val, <4 x i32*> %ptrs, i32 4, <4 x i1><i1 true, i1 false, i1 true, i1 false>)
@@ -165,7 +164,7 @@ define <4 x i32> @test10(<4 x i32*> %ptrs) {
 ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readonly willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@test10
 ; IS__CGSCC____-SAME: (<4 x i32*> [[PTRS:%.*]]) #[[ATTR7:[0-9]+]] {
-; IS__CGSCC____-NEXT:    [[RES:%.*]] = call <4 x i32> @llvm.masked.gather.v4i32.v4p0i32(<4 x i32*> [[PTRS]], i32 noundef 4, <4 x i1> noundef <i1 true, i1 false, i1 true, i1 false>, <4 x i32> undef) #[[ATTR15:[0-9]+]]
+; IS__CGSCC____-NEXT:    [[RES:%.*]] = call <4 x i32> @llvm.masked.gather.v4i32.v4p0i32(<4 x i32*> [[PTRS]], i32 noundef 4, <4 x i1> noundef <i1 true, i1 false, i1 true, i1 false>, <4 x i32> undef) #[[ATTR14:[0-9]+]]
 ; IS__CGSCC____-NEXT:    ret <4 x i32> [[RES]]
 ;
   %res = call <4 x i32> @llvm.masked.gather.v4i32.v4p0i32(<4 x i32*> %ptrs, i32 4, <4 x i1><i1 true, i1 false, i1 true, i1 false>, <4 x i32>undef)
@@ -203,7 +202,7 @@ define <4 x i32> @test12_2(<4 x i32*> %ptrs) {
 ; IS__CGSCC____: Function Attrs: argmemonly nounwind
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@test12_2
 ; IS__CGSCC____-SAME: (<4 x i32*> [[PTRS:%.*]]) #[[ATTR9:[0-9]+]] {
-; IS__CGSCC____-NEXT:    [[RES:%.*]] = call <4 x i32> @test12_1(<4 x i32*> [[PTRS]]) #[[ATTR16:[0-9]+]]
+; IS__CGSCC____-NEXT:    [[RES:%.*]] = call <4 x i32> @test12_1(<4 x i32*> [[PTRS]]) #[[ATTR15:[0-9]+]]
 ; IS__CGSCC____-NEXT:    ret <4 x i32> [[RES]]
 ;
   %res = call <4 x i32> @test12_1(<4 x i32*> %ptrs)
@@ -345,7 +344,7 @@ define void @testbyval(i8* %read_only) {
 ; IS__CGSCC____-SAME: (i8* nocapture noundef nonnull readonly dereferenceable(1) [[READ_ONLY:%.*]]) {
 ; IS__CGSCC____-NEXT:    call void @byval_not_readonly_1(i8* noalias nocapture noundef nonnull readonly byval(i8) dereferenceable(1) [[READ_ONLY]]) #[[ATTR2]]
 ; IS__CGSCC____-NEXT:    call void @byval_not_readnone_1(i8* noalias nocapture noundef nonnull readnone byval(i8) dereferenceable(1) [[READ_ONLY]])
-; IS__CGSCC____-NEXT:    call void @byval_no_fnarg(i8* noalias nocapture nofree noundef nonnull readnone byval(i8) dereferenceable(1) [[READ_ONLY]]) #[[ATTR17:[0-9]+]]
+; IS__CGSCC____-NEXT:    call void @byval_no_fnarg(i8* noalias nocapture nofree noundef nonnull readnone byval(i8) dereferenceable(1) [[READ_ONLY]]) #[[ATTR16:[0-9]+]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
   call void @byval_not_readonly_1(i8* byval(i8) %read_only)
@@ -443,7 +442,7 @@ define i32 @read_only_constant_mem() {
 ; IS__CGSCC____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
 ; IS__CGSCC____: attributes #[[ATTR2]] = { readonly }
 ; IS__CGSCC____: attributes #[[ATTR3]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
-; IS__CGSCC____: attributes #[[ATTR4]] = { nofree nosync nounwind willreturn writeonly }
+; IS__CGSCC____: attributes #[[ATTR4]] = { argmemonly nofree nosync nounwind willreturn writeonly }
 ; IS__CGSCC____: attributes #[[ATTR5:[0-9]+]] = { nocallback nofree nosync nounwind willreturn writeonly }
 ; IS__CGSCC____: attributes #[[ATTR6:[0-9]+]] = { nocallback nofree nosync nounwind readonly willreturn }
 ; IS__CGSCC____: attributes #[[ATTR7]] = { nofree norecurse nosync nounwind readonly willreturn }
@@ -452,9 +451,8 @@ define i32 @read_only_constant_mem() {
 ; IS__CGSCC____: attributes #[[ATTR10]] = { argmemonly nofree norecurse nounwind willreturn }
 ; IS__CGSCC____: attributes #[[ATTR11]] = { readnone }
 ; IS__CGSCC____: attributes #[[ATTR12]] = { nounwind readonly }
-; IS__CGSCC____: attributes #[[ATTR13]] = { readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR14]] = { willreturn writeonly }
-; IS__CGSCC____: attributes #[[ATTR15]] = { readonly willreturn }
-; IS__CGSCC____: attributes #[[ATTR16]] = { nounwind }
-; IS__CGSCC____: attributes #[[ATTR17]] = { nounwind writeonly }
+; IS__CGSCC____: attributes #[[ATTR13]] = { willreturn writeonly }
+; IS__CGSCC____: attributes #[[ATTR14]] = { readonly willreturn }
+; IS__CGSCC____: attributes #[[ATTR15]] = { nounwind }
+; IS__CGSCC____: attributes #[[ATTR16]] = { nounwind writeonly }
 ;.

diff  --git a/llvm/test/Transforms/Attributor/returned.ll b/llvm/test/Transforms/Attributor/returned.ll
index a877f2cfe84ef..e6c08dca67d34 100644
--- a/llvm/test/Transforms/Attributor/returned.ll
+++ b/llvm/test/Transforms/Attributor/returned.ll
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=7 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=7 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
+; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=3 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=3 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
 ; RUN: opt -attributor-cgscc -enable-new-pm=0 -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_NPM,IS__CGSCC____,IS________OPM,IS__CGSCC_OPM
 ; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM
 ;
@@ -255,10 +255,10 @@ define i32 @scc_rX(i32 %a, i32 %b, i32 %r) #0 {
 ; IS__CGSCC____-NEXT:    [[CALL14:%.*]] = call i32 @scc_r2(i32 [[A]], i32 [[B]], i32 [[R]]) #[[ATTR8]]
 ; IS__CGSCC____-NEXT:    br label [[COND_END]]
 ; IS__CGSCC____:       cond.end:
-; IS__CGSCC____-NEXT:    [[COND:%.*]] = phi i32 [ [[R]], [[COND_TRUE]] ], [ [[CALL14]], [[COND_FALSE]] ]
+; IS__CGSCC____-NEXT:    [[COND:%.*]] = phi i32 [ [[R]], [[COND_TRUE]] ], [ [[R]], [[COND_FALSE]] ]
 ; IS__CGSCC____-NEXT:    br label [[RETURN]]
 ; IS__CGSCC____:       return:
-; IS__CGSCC____-NEXT:    [[RETVAL_0:%.*]] = phi i32 [ [[CALL1]], [[IF_THEN]] ], [ [[CALL11]], [[IF_THEN3]] ], [ [[COND]], [[COND_END]] ]
+; IS__CGSCC____-NEXT:    [[RETVAL_0:%.*]] = phi i32 [ [[R]], [[IF_THEN]] ], [ [[B]], [[IF_THEN3]] ], [ [[COND]], [[COND_END]] ]
 ; IS__CGSCC____-NEXT:    ret i32 [[RETVAL_0]]
 ;
 entry:
@@ -1388,10 +1388,10 @@ define i32 @exact(i32* align 8 %a, i32* align 8 %b) {
 ; IS__CGSCC____-NEXT:    [[C2:%.*]] = call i32 @non_exact_2(i32 noundef 2)
 ; IS__CGSCC____-NEXT:    [[C3:%.*]] = call align 32 i32* @non_exact_3(i32* align 32 [[A]])
 ; IS__CGSCC____-NEXT:    [[C4:%.*]] = call align 16 i32* @non_exact_4(i32* align 32 [[B]])
-; IS__CGSCC____-NEXT:    [[C3L:%.*]] = load i32, i32* [[C3]], align 32
+; IS__CGSCC____-NEXT:    [[C3L:%.*]] = load i32, i32* [[A]], align 32
 ; IS__CGSCC____-NEXT:    [[C4L:%.*]] = load i32, i32* [[C4]], align 16
 ; IS__CGSCC____-NEXT:    [[ADD1:%.*]] = add i32 [[C0]], [[C1]]
-; IS__CGSCC____-NEXT:    [[ADD2:%.*]] = add i32 [[ADD1]], [[C2]]
+; IS__CGSCC____-NEXT:    [[ADD2:%.*]] = add i32 [[ADD1]], 2
 ; IS__CGSCC____-NEXT:    [[ADD3:%.*]] = add i32 [[ADD2]], [[C3L]]
 ; IS__CGSCC____-NEXT:    [[ADD4:%.*]] = add i32 [[ADD3]], [[C4L]]
 ; IS__CGSCC____-NEXT:    ret i32 [[ADD4]]

diff  --git a/llvm/test/Transforms/Attributor/undefined_behavior.ll b/llvm/test/Transforms/Attributor/undefined_behavior.ll
index 12c5c70311ff8..136d5ec565dcf 100644
--- a/llvm/test/Transforms/Attributor/undefined_behavior.ll
+++ b/llvm/test/Transforms/Attributor/undefined_behavior.ll
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=7 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=7 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
+; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=5 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=5 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
 ; RUN: opt -attributor-cgscc -enable-new-pm=0 -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_NPM,IS__CGSCC____,IS________OPM,IS__CGSCC_OPM
 ; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM
 
@@ -983,7 +983,7 @@ define i32 @violate_noundef_nonpointer() {
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@violate_noundef_nonpointer
 ; IS__CGSCC____-SAME: () #[[ATTR2]] {
-; IS__CGSCC____-NEXT:    unreachable
+; IS__CGSCC____-NEXT:    ret i32 undef
 ;
   %ret = call i32 @argument_noundef1(i32 undef)
   ret i32 %ret

diff  --git a/llvm/test/Transforms/Attributor/value-simplify-dbg.ll b/llvm/test/Transforms/Attributor/value-simplify-dbg.ll
index 527677db82734..3be91222f0ff8 100644
--- a/llvm/test/Transforms/Attributor/value-simplify-dbg.ll
+++ b/llvm/test/Transforms/Attributor/value-simplify-dbg.ll
@@ -10,12 +10,20 @@
 ; CHECK: @[[G:[a-zA-Z0-9_$"\\.-]+]] = internal global i32 undef, align 4, !dbg [[DBG0:![0-9]+]]
 ;.
 define void @dest() !dbg !15 {
-; CHECK-LABEL: define {{[^@]+}}@dest
-; CHECK-SAME: () !dbg [[DBG15:![0-9]+]] {
-; CHECK-NEXT:  entry:
-; CHECK-NEXT:    [[TMP0:%.*]] = load i32, ptr @G, align 4, !dbg [[DBG19:![0-9]+]]
-; CHECK-NEXT:    call void @use(i32 noundef [[TMP0]]), !dbg [[DBG20:![0-9]+]]
-; CHECK-NEXT:    ret void, !dbg [[DBG21:![0-9]+]]
+; IS__TUNIT____-LABEL: define {{[^@]+}}@dest
+; IS__TUNIT____-SAME: () !dbg [[DBG15:![0-9]+]] {
+; IS__TUNIT____-NEXT:  entry:
+; IS__TUNIT____-NEXT:    [[TMP0:%.*]] = call i32 @speculatable()
+; IS__TUNIT____-NEXT:    [[TMP1:%.*]] = add i32 [[TMP0]], 1
+; IS__TUNIT____-NEXT:    call void @use(i32 noundef [[TMP1]]), !dbg [[DBG19:![0-9]+]]
+; IS__TUNIT____-NEXT:    ret void, !dbg [[DBG20:![0-9]+]]
+;
+; IS__CGSCC____-LABEL: define {{[^@]+}}@dest
+; IS__CGSCC____-SAME: () !dbg [[DBG15:![0-9]+]] {
+; IS__CGSCC____-NEXT:  entry:
+; IS__CGSCC____-NEXT:    [[TMP0:%.*]] = load i32, ptr @G, align 4, !dbg [[DBG19:![0-9]+]]
+; IS__CGSCC____-NEXT:    call void @use(i32 noundef [[TMP0]]), !dbg [[DBG20:![0-9]+]]
+; IS__CGSCC____-NEXT:    ret void, !dbg [[DBG21:![0-9]+]]
 ;
 entry:
   %0 = load i32, ptr @G, align 4, !dbg !19
@@ -26,14 +34,23 @@ entry:
 declare void @use(i32 noundef)
 
 define void @src() norecurse !dbg !22 {
-; CHECK: Function Attrs: norecurse nosync writeonly
-; CHECK-LABEL: define {{[^@]+}}@src
-; CHECK-SAME: () #[[ATTR0:[0-9]+]] !dbg [[DBG22:![0-9]+]] {
-; CHECK-NEXT:  entry:
-; CHECK-NEXT:    [[CALL:%.*]] = call i32 @speculatable(), !dbg [[DBG23:![0-9]+]]
-; CHECK-NEXT:    [[PLUS1:%.*]] = add i32 [[CALL]], 1
-; CHECK-NEXT:    store i32 [[PLUS1]], ptr @G, align 4, !dbg [[DBG24:![0-9]+]]
-; CHECK-NEXT:    ret void, !dbg [[DBG25:![0-9]+]]
+; IS__TUNIT____: Function Attrs: norecurse nosync writeonly
+; IS__TUNIT____-LABEL: define {{[^@]+}}@src
+; IS__TUNIT____-SAME: () #[[ATTR0:[0-9]+]] !dbg [[DBG21:![0-9]+]] {
+; IS__TUNIT____-NEXT:  entry:
+; IS__TUNIT____-NEXT:    [[CALL:%.*]] = call i32 @speculatable(), !dbg [[DBG22:![0-9]+]]
+; IS__TUNIT____-NEXT:    [[PLUS1:%.*]] = add i32 [[CALL]], 1
+; IS__TUNIT____-NEXT:    store i32 [[PLUS1]], ptr @G, align 4, !dbg [[DBG23:![0-9]+]]
+; IS__TUNIT____-NEXT:    ret void, !dbg [[DBG24:![0-9]+]]
+;
+; IS__CGSCC____: Function Attrs: norecurse nosync writeonly
+; IS__CGSCC____-LABEL: define {{[^@]+}}@src
+; IS__CGSCC____-SAME: () #[[ATTR0:[0-9]+]] !dbg [[DBG22:![0-9]+]] {
+; IS__CGSCC____-NEXT:  entry:
+; IS__CGSCC____-NEXT:    [[CALL:%.*]] = call i32 @speculatable(), !dbg [[DBG23:![0-9]+]]
+; IS__CGSCC____-NEXT:    [[PLUS1:%.*]] = add i32 [[CALL]], 1
+; IS__CGSCC____-NEXT:    store i32 [[PLUS1]], ptr @G, align 4, !dbg [[DBG24:![0-9]+]]
+; IS__CGSCC____-NEXT:    ret void, !dbg [[DBG25:![0-9]+]]
 ;
 entry:
   %call = call i32 @speculatable(), !dbg !23
@@ -75,33 +92,59 @@ declare i32 @speculatable() speculatable readnone
 !24 = !DILocation(line: 10, column: 7, scope: !22)
 !25 = !DILocation(line: 11, column: 1, scope: !22)
 ;.
-; CHECK: attributes #[[ATTR0]] = { norecurse nosync writeonly }
+; CHECK: attributes #[[ATTR0:[0-9]+]] = { norecurse nosync writeonly }
 ; CHECK: attributes #[[ATTR1:[0-9]+]] = { readnone speculatable }
 ;.
-; CHECK: [[DBG0]] = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
-; CHECK: [[META1:![0-9]+]] = distinct !DIGlobalVariable(name: "G", scope: !2, file: !5, line: 1, type: !6, isLocal: true, isDefinition: true)
-; CHECK: [[META2:![0-9]+]] = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang version 15.0.0 (https://github.com/llvm/llvm-project.git ef94609d6ebe981767788e6877b0b3b731d425af)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, globals: !4, splitDebugInlining: false, nameTableKind: None)
-; CHECK: [[META3:![0-9]+]] = !DIFile(filename: "/app/example.c", directory: "/app", checksumkind: CSK_MD5, checksum: "b456b90cec5c3705a028b274d88ee970")
-; CHECK: [[META4:![0-9]+]] = !{!0}
-; CHECK: [[META5:![0-9]+]] = !DIFile(filename: "example.c", directory: "/app", checksumkind: CSK_MD5, checksum: "b456b90cec5c3705a028b274d88ee970")
-; CHECK: [[META6:![0-9]+]] = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
-; CHECK: [[META7:![0-9]+]] = !{i32 7, !"Dwarf Version", i32 5}
-; CHECK: [[META8:![0-9]+]] = !{i32 2, !"Debug Info Version", i32 3}
-; CHECK: [[META9:![0-9]+]] = !{i32 1, !"wchar_size", i32 4}
-; CHECK: [[META10:![0-9]+]] = !{i32 7, !"PIC Level", i32 2}
-; CHECK: [[META11:![0-9]+]] = !{i32 7, !"PIE Level", i32 2}
-; CHECK: [[META12:![0-9]+]] = !{i32 7, !"uwtable", i32 2}
-; CHECK: [[META13:![0-9]+]] = !{i32 7, !"frame-pointer", i32 2}
-; CHECK: [[META14:![0-9]+]] = !{!"clang version 15.0.0 (https://github.com/llvm/llvm-project.git ef94609d6ebe981767788e6877b0b3b731d425af)"}
-; CHECK: [[DBG15]] = distinct !DISubprogram(name: "dest", scope: !5, file: !5, line: 4, type: !16, scopeLine: 4, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !18)
-; CHECK: [[META16:![0-9]+]] = !DISubroutineType(types: !17)
-; CHECK: [[META17:![0-9]+]] = !{null}
-; CHECK: [[META18:![0-9]+]] = !{}
-; CHECK: [[DBG19]] = !DILocation(line: 5, column: 9, scope: !15)
-; CHECK: [[DBG20]] = !DILocation(line: 5, column: 5, scope: !15)
-; CHECK: [[DBG21]] = !DILocation(line: 6, column: 1, scope: !15)
-; CHECK: [[DBG22]] = distinct !DISubprogram(name: "src", scope: !5, file: !5, line: 9, type: !16, scopeLine: 9, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !18)
-; CHECK: [[DBG23]] = !DILocation(line: 10, column: 9, scope: !22)
-; CHECK: [[DBG24]] = !DILocation(line: 10, column: 7, scope: !22)
-; CHECK: [[DBG25]] = !DILocation(line: 11, column: 1, scope: !22)
+; IS__TUNIT____: [[DBG0]] = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
+; IS__TUNIT____: [[META1:![0-9]+]] = distinct !DIGlobalVariable(name: "G", scope: !2, file: !5, line: 1, type: !6, isLocal: true, isDefinition: true)
+; IS__TUNIT____: [[META2:![0-9]+]] = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang version 15.0.0 (https://github.com/llvm/llvm-project.git ef94609d6ebe981767788e6877b0b3b731d425af)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, globals: !4, splitDebugInlining: false, nameTableKind: None)
+; IS__TUNIT____: [[META3:![0-9]+]] = !DIFile(filename: "/app/example.c", directory: "/app", checksumkind: CSK_MD5, checksum: "b456b90cec5c3705a028b274d88ee970")
+; IS__TUNIT____: [[META4:![0-9]+]] = !{!0}
+; IS__TUNIT____: [[META5:![0-9]+]] = !DIFile(filename: "example.c", directory: "/app", checksumkind: CSK_MD5, checksum: "b456b90cec5c3705a028b274d88ee970")
+; IS__TUNIT____: [[META6:![0-9]+]] = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
+; IS__TUNIT____: [[META7:![0-9]+]] = !{i32 7, !"Dwarf Version", i32 5}
+; IS__TUNIT____: [[META8:![0-9]+]] = !{i32 2, !"Debug Info Version", i32 3}
+; IS__TUNIT____: [[META9:![0-9]+]] = !{i32 1, !"wchar_size", i32 4}
+; IS__TUNIT____: [[META10:![0-9]+]] = !{i32 7, !"PIC Level", i32 2}
+; IS__TUNIT____: [[META11:![0-9]+]] = !{i32 7, !"PIE Level", i32 2}
+; IS__TUNIT____: [[META12:![0-9]+]] = !{i32 7, !"uwtable", i32 2}
+; IS__TUNIT____: [[META13:![0-9]+]] = !{i32 7, !"frame-pointer", i32 2}
+; IS__TUNIT____: [[META14:![0-9]+]] = !{!"clang version 15.0.0 (https://github.com/llvm/llvm-project.git ef94609d6ebe981767788e6877b0b3b731d425af)"}
+; IS__TUNIT____: [[DBG15]] = distinct !DISubprogram(name: "dest", scope: !5, file: !5, line: 4, type: !16, scopeLine: 4, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !18)
+; IS__TUNIT____: [[META16:![0-9]+]] = !DISubroutineType(types: !17)
+; IS__TUNIT____: [[META17:![0-9]+]] = !{null}
+; IS__TUNIT____: [[META18:![0-9]+]] = !{}
+; IS__TUNIT____: [[DBG19]] = !DILocation(line: 5, column: 5, scope: !15)
+; IS__TUNIT____: [[DBG20]] = !DILocation(line: 6, column: 1, scope: !15)
+; IS__TUNIT____: [[DBG21]] = distinct !DISubprogram(name: "src", scope: !5, file: !5, line: 9, type: !16, scopeLine: 9, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !18)
+; IS__TUNIT____: [[DBG22]] = !DILocation(line: 10, column: 9, scope: !21)
+; IS__TUNIT____: [[DBG23]] = !DILocation(line: 10, column: 7, scope: !21)
+; IS__TUNIT____: [[DBG24]] = !DILocation(line: 11, column: 1, scope: !21)
+;.
+; IS__CGSCC____: [[DBG0]] = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
+; IS__CGSCC____: [[META1:![0-9]+]] = distinct !DIGlobalVariable(name: "G", scope: !2, file: !5, line: 1, type: !6, isLocal: true, isDefinition: true)
+; IS__CGSCC____: [[META2:![0-9]+]] = distinct !DICompileUnit(language: DW_LANG_C99, file: !3, producer: "clang version 15.0.0 (https://github.com/llvm/llvm-project.git ef94609d6ebe981767788e6877b0b3b731d425af)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, globals: !4, splitDebugInlining: false, nameTableKind: None)
+; IS__CGSCC____: [[META3:![0-9]+]] = !DIFile(filename: "/app/example.c", directory: "/app", checksumkind: CSK_MD5, checksum: "b456b90cec5c3705a028b274d88ee970")
+; IS__CGSCC____: [[META4:![0-9]+]] = !{!0}
+; IS__CGSCC____: [[META5:![0-9]+]] = !DIFile(filename: "example.c", directory: "/app", checksumkind: CSK_MD5, checksum: "b456b90cec5c3705a028b274d88ee970")
+; IS__CGSCC____: [[META6:![0-9]+]] = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
+; IS__CGSCC____: [[META7:![0-9]+]] = !{i32 7, !"Dwarf Version", i32 5}
+; IS__CGSCC____: [[META8:![0-9]+]] = !{i32 2, !"Debug Info Version", i32 3}
+; IS__CGSCC____: [[META9:![0-9]+]] = !{i32 1, !"wchar_size", i32 4}
+; IS__CGSCC____: [[META10:![0-9]+]] = !{i32 7, !"PIC Level", i32 2}
+; IS__CGSCC____: [[META11:![0-9]+]] = !{i32 7, !"PIE Level", i32 2}
+; IS__CGSCC____: [[META12:![0-9]+]] = !{i32 7, !"uwtable", i32 2}
+; IS__CGSCC____: [[META13:![0-9]+]] = !{i32 7, !"frame-pointer", i32 2}
+; IS__CGSCC____: [[META14:![0-9]+]] = !{!"clang version 15.0.0 (https://github.com/llvm/llvm-project.git ef94609d6ebe981767788e6877b0b3b731d425af)"}
+; IS__CGSCC____: [[DBG15]] = distinct !DISubprogram(name: "dest", scope: !5, file: !5, line: 4, type: !16, scopeLine: 4, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !18)
+; IS__CGSCC____: [[META16:![0-9]+]] = !DISubroutineType(types: !17)
+; IS__CGSCC____: [[META17:![0-9]+]] = !{null}
+; IS__CGSCC____: [[META18:![0-9]+]] = !{}
+; IS__CGSCC____: [[DBG19]] = !DILocation(line: 5, column: 9, scope: !15)
+; IS__CGSCC____: [[DBG20]] = !DILocation(line: 5, column: 5, scope: !15)
+; IS__CGSCC____: [[DBG21]] = !DILocation(line: 6, column: 1, scope: !15)
+; IS__CGSCC____: [[DBG22]] = distinct !DISubprogram(name: "src", scope: !5, file: !5, line: 9, type: !16, scopeLine: 9, spFlags: DISPFlagDefinition, unit: !2, retainedNodes: !18)
+; IS__CGSCC____: [[DBG23]] = !DILocation(line: 10, column: 9, scope: !22)
+; IS__CGSCC____: [[DBG24]] = !DILocation(line: 10, column: 7, scope: !22)
+; IS__CGSCC____: [[DBG25]] = !DILocation(line: 11, column: 1, scope: !22)
 ;.

diff  --git a/llvm/test/Transforms/Attributor/value-simplify-gpu.ll b/llvm/test/Transforms/Attributor/value-simplify-gpu.ll
index 0ef99fcca3431..fa19fe63622d5 100644
--- a/llvm/test/Transforms/Attributor/value-simplify-gpu.ll
+++ b/llvm/test/Transforms/Attributor/value-simplify-gpu.ll
@@ -288,7 +288,7 @@ define internal void @level2a(i32* %addr) {
 ; IS__TUNIT____-NEXT:  entry:
 ; IS__TUNIT____-NEXT:    [[TMP0:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @ReachableNonKernel to i32*), align 4
 ; IS__TUNIT____-NEXT:    [[TMP1:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @UnreachableNonKernel to i32*), align 4
-; IS__TUNIT____-NEXT:    call void @use(i32 [[TMP0]], i32 [[TMP1]], i32 17) #[[ATTR6]]
+; IS__TUNIT____-NEXT:    call void @use(i32 noundef [[TMP0]], i32 noundef [[TMP1]], i32 17) #[[ATTR6]]
 ; IS__TUNIT____-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nosync nounwind
@@ -298,7 +298,7 @@ define internal void @level2a(i32* %addr) {
 ; IS__CGSCC____-NEXT:    [[TMP0:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @ReachableNonKernel to i32*), align 4
 ; IS__CGSCC____-NEXT:    [[TMP1:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @UnreachableNonKernel to i32*), align 4
 ; IS__CGSCC____-NEXT:    [[QQQQ2:%.*]] = load i32, i32* [[ADDR]], align 4
-; IS__CGSCC____-NEXT:    call void @use(i32 [[TMP0]], i32 [[TMP1]], i32 [[QQQQ2]]) #[[ATTR4]]
+; IS__CGSCC____-NEXT:    call void @use(i32 noundef [[TMP0]], i32 noundef [[TMP1]], i32 [[QQQQ2]]) #[[ATTR4]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
 entry:
@@ -316,7 +316,7 @@ define internal void @level2b(i32* %addr) {
 ; IS__TUNIT____-NEXT:  entry:
 ; IS__TUNIT____-NEXT:    [[TMP0:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @ReachableNonKernel to i32*), align 4
 ; IS__TUNIT____-NEXT:    [[TMP1:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @UnreachableNonKernel to i32*), align 4
-; IS__TUNIT____-NEXT:    call void @use(i32 [[TMP0]], i32 [[TMP1]], i32 17) #[[ATTR6]]
+; IS__TUNIT____-NEXT:    call void @use(i32 noundef [[TMP0]], i32 noundef [[TMP1]], i32 17) #[[ATTR6]]
 ; IS__TUNIT____-NEXT:    ret void
 ;
 ; IS__CGSCC____: Function Attrs: nosync nounwind
@@ -326,7 +326,7 @@ define internal void @level2b(i32* %addr) {
 ; IS__CGSCC____-NEXT:    [[TMP0:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @ReachableNonKernel to i32*), align 4
 ; IS__CGSCC____-NEXT:    [[TMP1:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @UnreachableNonKernel to i32*), align 4
 ; IS__CGSCC____-NEXT:    [[TMP2:%.*]] = load i32, i32* [[ADDR]], align 4
-; IS__CGSCC____-NEXT:    call void @use(i32 [[TMP0]], i32 [[TMP1]], i32 [[TMP2]]) #[[ATTR4]]
+; IS__CGSCC____-NEXT:    call void @use(i32 noundef [[TMP0]], i32 noundef [[TMP1]], i32 [[TMP2]]) #[[ATTR4]]
 ; IS__CGSCC____-NEXT:    ret void
 ;
 entry:

diff  --git a/llvm/test/Transforms/Attributor/value-simplify-instances.ll b/llvm/test/Transforms/Attributor/value-simplify-instances.ll
index ef9afb60980ad..2b5d40e64d43f 100644
--- a/llvm/test/Transforms/Attributor/value-simplify-instances.ll
+++ b/llvm/test/Transforms/Attributor/value-simplify-instances.ll
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=17 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=17 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
+; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=14 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=14 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
 ; RUN: opt -attributor-cgscc -enable-new-pm=0 -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_NPM,IS__CGSCC____,IS________OPM,IS__CGSCC_OPM
 ; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM
 
@@ -26,27 +26,49 @@ define internal i1 @recursive_inst_comparator(i1* %a, i1* %b) {
 }
 
 define internal i1 @recursive_inst_generator(i1 %c, i1* %p) {
-; IS__TUNIT____-LABEL: define {{[^@]+}}@recursive_inst_generator
-; IS__TUNIT____-SAME: (i1 [[C:%.*]], i1* nofree [[P:%.*]]) {
-; IS__TUNIT____-NEXT:    [[A:%.*]] = call i1* @geti1Ptr()
-; IS__TUNIT____-NEXT:    br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
-; IS__TUNIT____:       t:
-; IS__TUNIT____-NEXT:    [[R1:%.*]] = call i1 @recursive_inst_comparator(i1* noalias nofree readnone [[A]], i1* noalias nofree readnone [[P]]) #[[ATTR6:[0-9]+]]
-; IS__TUNIT____-NEXT:    ret i1 [[R1]]
-; IS__TUNIT____:       f:
-; IS__TUNIT____-NEXT:    [[R2:%.*]] = call i1 @recursive_inst_generator(i1 noundef true, i1* nofree [[A]])
-; IS__TUNIT____-NEXT:    ret i1 [[R2]]
+; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@recursive_inst_generator
+; IS__TUNIT_OPM-SAME: (i1 [[C:%.*]], i1* nofree [[P:%.*]]) {
+; IS__TUNIT_OPM-NEXT:    [[A:%.*]] = call i1* @geti1Ptr()
+; IS__TUNIT_OPM-NEXT:    br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; IS__TUNIT_OPM:       t:
+; IS__TUNIT_OPM-NEXT:    [[R1:%.*]] = call i1 @recursive_inst_comparator(i1* noalias nofree readnone [[A]], i1* noalias nofree readnone [[P]]) #[[ATTR6:[0-9]+]]
+; IS__TUNIT_OPM-NEXT:    ret i1 [[R1]]
+; IS__TUNIT_OPM:       f:
+; IS__TUNIT_OPM-NEXT:    [[R2:%.*]] = call i1 @recursive_inst_generator(i1 noundef true, i1* nofree [[A]])
+; IS__TUNIT_OPM-NEXT:    ret i1 [[R2]]
 ;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@recursive_inst_generator
-; IS__CGSCC____-SAME: (i1 [[C:%.*]], i1* nofree [[P:%.*]]) {
-; IS__CGSCC____-NEXT:    [[A:%.*]] = call i1* @geti1Ptr()
-; IS__CGSCC____-NEXT:    br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
-; IS__CGSCC____:       t:
-; IS__CGSCC____-NEXT:    [[R1:%.*]] = call i1 @recursive_inst_comparator(i1* noalias nofree readnone [[A]], i1* noalias nofree readnone [[P]])
-; IS__CGSCC____-NEXT:    ret i1 [[R1]]
-; IS__CGSCC____:       f:
-; IS__CGSCC____-NEXT:    [[R2:%.*]] = call i1 @recursive_inst_generator(i1 noundef true, i1* nofree [[A]])
-; IS__CGSCC____-NEXT:    ret i1 [[R2]]
+; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@recursive_inst_generator
+; IS__TUNIT_NPM-SAME: (i1 [[C:%.*]], i1* nofree [[P:%.*]]) {
+; IS__TUNIT_NPM-NEXT:    [[A:%.*]] = call i1* @geti1Ptr()
+; IS__TUNIT_NPM-NEXT:    br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; IS__TUNIT_NPM:       t:
+; IS__TUNIT_NPM-NEXT:    [[R1:%.*]] = call i1 @recursive_inst_comparator(i1* noalias nofree readnone [[A]], i1* noalias nofree readnone [[A]]) #[[ATTR6:[0-9]+]]
+; IS__TUNIT_NPM-NEXT:    ret i1 [[R1]]
+; IS__TUNIT_NPM:       f:
+; IS__TUNIT_NPM-NEXT:    [[R2:%.*]] = call i1 @recursive_inst_generator(i1 noundef true, i1* nofree [[A]])
+; IS__TUNIT_NPM-NEXT:    ret i1 [[R2]]
+;
+; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@recursive_inst_generator
+; IS__CGSCC_OPM-SAME: (i1 [[C:%.*]], i1* nofree [[P:%.*]]) {
+; IS__CGSCC_OPM-NEXT:    [[A:%.*]] = call i1* @geti1Ptr()
+; IS__CGSCC_OPM-NEXT:    br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; IS__CGSCC_OPM:       t:
+; IS__CGSCC_OPM-NEXT:    [[R1:%.*]] = call i1 @recursive_inst_comparator(i1* noalias nofree readnone [[A]], i1* noalias nofree readnone [[P]])
+; IS__CGSCC_OPM-NEXT:    ret i1 [[R1]]
+; IS__CGSCC_OPM:       f:
+; IS__CGSCC_OPM-NEXT:    [[R2:%.*]] = call i1 @recursive_inst_generator(i1 noundef true, i1* nofree [[A]])
+; IS__CGSCC_OPM-NEXT:    ret i1 [[R2]]
+;
+; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@recursive_inst_generator
+; IS__CGSCC_NPM-SAME: (i1 [[C:%.*]], i1* nofree [[P:%.*]]) {
+; IS__CGSCC_NPM-NEXT:    [[A:%.*]] = call i1* @geti1Ptr()
+; IS__CGSCC_NPM-NEXT:    br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; IS__CGSCC_NPM:       t:
+; IS__CGSCC_NPM-NEXT:    [[R1:%.*]] = call i1 @recursive_inst_comparator(i1* noalias nofree readnone [[A]], i1* noalias nofree readnone [[A]])
+; IS__CGSCC_NPM-NEXT:    ret i1 [[R1]]
+; IS__CGSCC_NPM:       f:
+; IS__CGSCC_NPM-NEXT:    [[R2:%.*]] = call i1 @recursive_inst_generator(i1 noundef true, i1* nofree [[A]])
+; IS__CGSCC_NPM-NEXT:    ret i1 [[R2]]
 ;
   %a = call i1* @geti1Ptr()
   br i1 %c, label %t, label %f
@@ -389,7 +411,7 @@ define i1 @recursive_inst_compare_caller_global3(i1 %c) {
 ; IS__TUNIT____: attributes #[[ATTR3]] = { argmemonly nofree nosync nounwind }
 ; IS__TUNIT____: attributes #[[ATTR4]] = { nofree nosync nounwind }
 ; IS__TUNIT____: attributes #[[ATTR5]] = { nofree norecurse nosync nounwind }
-; IS__TUNIT____: attributes #[[ATTR6]] = { nounwind readnone }
+; IS__TUNIT____: attributes #[[ATTR6:[0-9]+]] = { nounwind readnone }
 ;.
 ; IS__CGSCC____: attributes #[[ATTR0]] = { nofree norecurse nosync nounwind readnone willreturn }
 ; IS__CGSCC____: attributes #[[ATTR1]] = { nofree nosync nounwind readnone }

diff  --git a/llvm/test/Transforms/Attributor/value-simplify-local-remote.ll b/llvm/test/Transforms/Attributor/value-simplify-local-remote.ll
deleted file mode 100644
index cab64050ef14d..0000000000000
--- a/llvm/test/Transforms/Attributor/value-simplify-local-remote.ll
+++ /dev/null
@@ -1,794 +0,0 @@
-; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=6 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=6 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
-; RUN: opt -attributor-cgscc -enable-new-pm=0 -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_NPM,IS__CGSCC____,IS________OPM,IS__CGSCC_OPM
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM
-
-; Most reduced from the OpenMC app running OpenMP offloading code, caused crashes before as we
-; mixed local and remote (=intra and inter procedural) values.
-
-target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
-
-%S = type { ptr }
-%S.2 = type { ptr, i64, i64 }
-%struct1 = type { %struct2 }
-%struct2 = type <{ ptr, i64, i64, i32, [4 x i8] }>
-
-define i64 @t1(ptr %first, ptr %first.addr, ptr %0) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@t1
-; IS__TUNIT____-SAME: (ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[FIRST:%.*]], ptr nocapture nofree readnone [[FIRST_ADDR:%.*]], ptr nocapture nofree readnone [[TMP0:%.*]]) #[[ATTR0:[0-9]+]] {
-; IS__TUNIT____-NEXT:  entry:
-; IS__TUNIT____-NEXT:    [[FIRST_ADDR1:%.*]] = alloca ptr, i32 0, align 8
-; IS__TUNIT____-NEXT:    store ptr [[FIRST]], ptr [[FIRST]], align 8
-; IS__TUNIT____-NEXT:    br label [[IF_END:%.*]]
-; IS__TUNIT____:       if.end:
-; IS__TUNIT____-NEXT:    [[CALL:%.*]] = call ptr @foo.4(ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[FIRST]]) #[[ATTR3:[0-9]+]]
-; IS__TUNIT____-NEXT:    ret i64 0
-;
-; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly
-; IS__CGSCC____-LABEL: define {{[^@]+}}@t1
-; IS__CGSCC____-SAME: (ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[FIRST:%.*]], ptr nocapture nofree readnone [[FIRST_ADDR:%.*]], ptr nocapture nofree readnone [[TMP0:%.*]]) #[[ATTR0:[0-9]+]] {
-; IS__CGSCC____-NEXT:  entry:
-; IS__CGSCC____-NEXT:    [[FIRST_ADDR1:%.*]] = alloca ptr, i32 0, align 8
-; IS__CGSCC____-NEXT:    store ptr [[FIRST]], ptr [[FIRST]], align 8
-; IS__CGSCC____-NEXT:    br label [[IF_END:%.*]]
-; IS__CGSCC____:       if.end:
-; IS__CGSCC____-NEXT:    [[CALL:%.*]] = call ptr @foo.4(ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[FIRST]]) #[[ATTR6:[0-9]+]]
-; IS__CGSCC____-NEXT:    [[ADD_PTR:%.*]] = getelementptr inbounds double, ptr [[CALL]], i64 -1
-; IS__CGSCC____-NEXT:    ret i64 0
-;
-entry:
-  %first.addr1 = alloca ptr, i32 0, align 8
-  store ptr %first, ptr %first, align 8
-  br label %if.end
-
-if.end:                                           ; preds = %entry
-  %1 = load ptr, ptr %first, align 8
-  %call = call ptr @foo.4(ptr %first)
-  %add.ptr = getelementptr inbounds double, ptr %call, i64 -1
-  ret i64 0
-}
-
-define internal ptr @foo.4(ptr %__first) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@foo.4
-; IS__TUNIT____-SAME: (ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[__FIRST:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT:  entry:
-; IS__TUNIT____-NEXT:    [[__FIRST_ADDR:%.*]] = alloca ptr, i32 0, align 8
-; IS__TUNIT____-NEXT:    store ptr [[__FIRST]], ptr [[__FIRST]], align 8
-; IS__TUNIT____-NEXT:    ret ptr undef
-;
-; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly
-; IS__CGSCC____-LABEL: define {{[^@]+}}@foo.4
-; IS__CGSCC____-SAME: (ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[__FIRST:%.*]]) #[[ATTR0]] {
-; IS__CGSCC____-NEXT:  entry:
-; IS__CGSCC____-NEXT:    [[__FIRST_ADDR:%.*]] = alloca ptr, i32 0, align 8
-; IS__CGSCC____-NEXT:    store ptr [[__FIRST]], ptr [[__FIRST]], align 8
-; IS__CGSCC____-NEXT:    [[CALL1:%.*]] = call noalias noundef nonnull align 8 dereferenceable(8) ptr @bar(ptr noalias nofree noundef nonnull readnone align 8 dereferenceable(8) [[__FIRST]]) #[[ATTR7:[0-9]+]]
-; IS__CGSCC____-NEXT:    ret ptr [[CALL1]]
-;
-entry:
-  %__first.addr = alloca ptr, i32 0, align 8
-  store ptr %__first, ptr %__first, align 8
-  %0 = load ptr, ptr %__first, align 8
-  %call1 = call ptr @bar(ptr %__first)
-  ret ptr %call1
-}
-
-define internal ptr @bar(ptr %QQfirst) {
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@bar
-; IS__CGSCC____-SAME: (ptr noalias nofree noundef nonnull readnone returned align 8 dereferenceable(8) "no-capture-maybe-returned" [[QQFIRST:%.*]]) #[[ATTR1:[0-9]+]] {
-; IS__CGSCC____-NEXT:  entry:
-; IS__CGSCC____-NEXT:    [[QQFIRST_ADDR:%.*]] = alloca ptr, i32 0, align 8
-; IS__CGSCC____-NEXT:    store ptr [[QQFIRST]], ptr [[QQFIRST_ADDR]], align 8
-; IS__CGSCC____-NEXT:    br label [[WHILE_COND:%.*]]
-; IS__CGSCC____:       while.cond:
-; IS__CGSCC____-NEXT:    br label [[WHILE_END:%.*]]
-; IS__CGSCC____:       while.end:
-; IS__CGSCC____-NEXT:    ret ptr [[QQFIRST]]
-;
-entry:
-  %QQfirst.addr = alloca ptr, i32 0, align 8
-  store ptr %QQfirst, ptr %QQfirst.addr, align 8
-  br label %while.cond
-
-while.cond:                                       ; preds = %entry
-  br label %while.end
-
-while.end:                                        ; preds = %while.cond
-  %0 = load ptr, ptr %QQfirst.addr, align 8
-  ret ptr %0
-}
-
-define ptr @t2(ptr %this, ptr %this.addr, ptr %this1) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@t2
-; IS__TUNIT____-SAME: (ptr nofree noundef nonnull align 8 dereferenceable(8) [[THIS:%.*]], ptr nocapture nofree readnone [[THIS_ADDR:%.*]], ptr nocapture nofree readnone [[THIS1:%.*]]) #[[ATTR1:[0-9]+]] {
-; IS__TUNIT____-NEXT:  entry:
-; IS__TUNIT____-NEXT:    store ptr [[THIS]], ptr [[THIS]], align 8
-; IS__TUNIT____-NEXT:    [[CALL:%.*]] = call [[S:%.*]] @foo.1(ptr nofree noundef nonnull align 8 dereferenceable(8) [[THIS]]) #[[ATTR4:[0-9]+]]
-; IS__TUNIT____-NEXT:    [[TEST_RET:%.*]] = extractvalue [[S]] [[CALL]], 0
-; IS__TUNIT____-NEXT:    ret ptr [[TEST_RET]]
-;
-; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@t2
-; IS__CGSCC____-SAME: (ptr nofree noundef nonnull align 8 dereferenceable(8) [[THIS:%.*]], ptr nocapture nofree readnone [[THIS_ADDR:%.*]], ptr nocapture nofree readnone [[THIS1:%.*]]) #[[ATTR2:[0-9]+]] {
-; IS__CGSCC____-NEXT:  entry:
-; IS__CGSCC____-NEXT:    store ptr [[THIS]], ptr [[THIS]], align 8
-; IS__CGSCC____-NEXT:    [[CALL:%.*]] = call [[S:%.*]] @foo.1(ptr nofree noundef nonnull align 8 dereferenceable(8) [[THIS]]) #[[ATTR8:[0-9]+]]
-; IS__CGSCC____-NEXT:    [[TEST_RET:%.*]] = extractvalue [[S]] [[CALL]], 0
-; IS__CGSCC____-NEXT:    ret ptr [[TEST_RET]]
-;
-entry:
-  store ptr %this, ptr %this, align 8
-  %this12 = load ptr, ptr %this, align 8
-  %call = call %S @foo.1(ptr %this)
-  %test.ret = extractvalue %S %call, 0
-  ret ptr %test.ret
-}
-
-define internal %S @foo.1(ptr %foo.this) {
-; IS__TUNIT_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
-; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@foo.1
-; IS__TUNIT_OPM-SAME: (ptr nofree noundef nonnull align 8 dereferenceable(8) [[FOO_THIS:%.*]]) #[[ATTR1]] {
-; IS__TUNIT_OPM-NEXT:  entry:
-; IS__TUNIT_OPM-NEXT:    [[RETVAL:%.*]] = alloca [[S:%.*]], i32 0, align 8
-; IS__TUNIT_OPM-NEXT:    store ptr [[FOO_THIS]], ptr [[FOO_THIS]], align 8
-; IS__TUNIT_OPM-NEXT:    call void @bar.2(ptr nocapture nofree noundef nonnull writeonly align 8 [[RETVAL]], ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[FOO_THIS]]) #[[ATTR5:[0-9]+]]
-; IS__TUNIT_OPM-NEXT:    [[FOO_RET:%.*]] = load [[S]], ptr [[RETVAL]], align 8
-; IS__TUNIT_OPM-NEXT:    ret [[S]] [[FOO_RET]]
-;
-; IS__TUNIT_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@foo.1
-; IS__TUNIT_NPM-SAME: (ptr nofree noundef nonnull align 8 dereferenceable(8) [[FOO_THIS:%.*]]) #[[ATTR1]] {
-; IS__TUNIT_NPM-NEXT:  entry:
-; IS__TUNIT_NPM-NEXT:    [[RETVAL:%.*]] = alloca [[S:%.*]], i32 0, align 8
-; IS__TUNIT_NPM-NEXT:    store ptr [[FOO_THIS]], ptr [[FOO_THIS]], align 8
-; IS__TUNIT_NPM-NEXT:    call void @bar.2(ptr noalias nocapture nofree noundef nonnull writeonly align 8 [[RETVAL]], ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[FOO_THIS]]) #[[ATTR5:[0-9]+]]
-; IS__TUNIT_NPM-NEXT:    [[FOO_RET:%.*]] = load [[S]], ptr [[RETVAL]], align 8
-; IS__TUNIT_NPM-NEXT:    ret [[S]] [[FOO_RET]]
-;
-; IS__CGSCC_OPM: Function Attrs: argmemonly nofree nosync nounwind willreturn
-; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@foo.1
-; IS__CGSCC_OPM-SAME: (ptr nofree noundef nonnull align 8 dereferenceable(8) [[FOO_THIS:%.*]]) #[[ATTR2]] {
-; IS__CGSCC_OPM-NEXT:  entry:
-; IS__CGSCC_OPM-NEXT:    [[RETVAL:%.*]] = alloca [[S:%.*]], i32 0, align 8
-; IS__CGSCC_OPM-NEXT:    store ptr [[FOO_THIS]], ptr [[FOO_THIS]], align 8
-; IS__CGSCC_OPM-NEXT:    call void @bar.2(ptr nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[RETVAL]], ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[FOO_THIS]]) #[[ATTR6]]
-; IS__CGSCC_OPM-NEXT:    [[FOO_RET:%.*]] = load [[S]], ptr [[RETVAL]], align 8
-; IS__CGSCC_OPM-NEXT:    ret [[S]] [[FOO_RET]]
-;
-; IS__CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@foo.1
-; IS__CGSCC_NPM-SAME: (ptr nofree noundef nonnull align 8 dereferenceable(8) [[FOO_THIS:%.*]]) #[[ATTR2]] {
-; IS__CGSCC_NPM-NEXT:  entry:
-; IS__CGSCC_NPM-NEXT:    [[RETVAL:%.*]] = alloca [[S:%.*]], i32 0, align 8
-; IS__CGSCC_NPM-NEXT:    store ptr [[FOO_THIS]], ptr [[FOO_THIS]], align 8
-; IS__CGSCC_NPM-NEXT:    call void @bar.2(ptr noalias nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[RETVAL]], ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[FOO_THIS]]) #[[ATTR6]]
-; IS__CGSCC_NPM-NEXT:    [[FOO_RET:%.*]] = load [[S]], ptr [[RETVAL]], align 8
-; IS__CGSCC_NPM-NEXT:    ret [[S]] [[FOO_RET]]
-;
-entry:
-  %retval = alloca %S, i32 0, align 8
-  store ptr %foo.this, ptr %foo.this, align 8
-  call void @bar.2(ptr %retval, ptr %foo.this)
-  %foo.ret = load %S, ptr %retval, align 8
-  ret %S %foo.ret
-}
-
-define internal void @bar.2(ptr %bar.this, ptr %bar.data) {
-; IS__TUNIT_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
-; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@bar.2
-; IS__TUNIT_OPM-SAME: (ptr nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[BAR_THIS:%.*]], ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[BAR_DATA:%.*]]) #[[ATTR0]] {
-; IS__TUNIT_OPM-NEXT:  entry:
-; IS__TUNIT_OPM-NEXT:    store ptr [[BAR_DATA]], ptr [[BAR_THIS]], align 8
-; IS__TUNIT_OPM-NEXT:    call void @baz(ptr nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[BAR_THIS]], ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[BAR_DATA]]) #[[ATTR5]]
-; IS__TUNIT_OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@bar.2
-; IS__TUNIT_NPM-SAME: (ptr noalias nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[BAR_THIS:%.*]], ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[BAR_DATA:%.*]]) #[[ATTR0]] {
-; IS__TUNIT_NPM-NEXT:  entry:
-; IS__TUNIT_NPM-NEXT:    store ptr [[BAR_DATA]], ptr [[BAR_THIS]], align 8
-; IS__TUNIT_NPM-NEXT:    call void @baz(ptr nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[BAR_THIS]], ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[BAR_DATA]]) #[[ATTR5]]
-; IS__TUNIT_NPM-NEXT:    ret void
-;
-; IS__CGSCC_OPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly
-; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@bar.2
-; IS__CGSCC_OPM-SAME: (ptr nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[BAR_THIS:%.*]], ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[BAR_DATA:%.*]]) #[[ATTR0]] {
-; IS__CGSCC_OPM-NEXT:  entry:
-; IS__CGSCC_OPM-NEXT:    store ptr [[BAR_DATA]], ptr [[BAR_THIS]], align 8
-; IS__CGSCC_OPM-NEXT:    call void @baz(ptr nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[BAR_THIS]], ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[BAR_DATA]]) #[[ATTR6]]
-; IS__CGSCC_OPM-NEXT:    ret void
-;
-; IS__CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@bar.2
-; IS__CGSCC_NPM-SAME: (ptr noalias nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[BAR_THIS:%.*]], ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[BAR_DATA:%.*]]) #[[ATTR0]] {
-; IS__CGSCC_NPM-NEXT:  entry:
-; IS__CGSCC_NPM-NEXT:    store ptr [[BAR_DATA]], ptr [[BAR_THIS]], align 8
-; IS__CGSCC_NPM-NEXT:    call void @baz(ptr nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[BAR_THIS]], ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[BAR_DATA]]) #[[ATTR6]]
-; IS__CGSCC_NPM-NEXT:    ret void
-;
-entry:
-  store ptr %bar.data, ptr %bar.this, align 8
-  call void @baz(ptr %bar.this, ptr %bar.data)
-  ret void
-}
-
-define internal void @baz(ptr %baz.this, ptr %baz.data) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@baz
-; IS__TUNIT____-SAME: (ptr nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[BAZ_THIS:%.*]], ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[BAZ_DATA:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT:  entry:
-; IS__TUNIT____-NEXT:    store ptr [[BAZ_DATA]], ptr [[BAZ_THIS]], align 8
-; IS__TUNIT____-NEXT:    ret void
-;
-; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
-; IS__CGSCC____-LABEL: define {{[^@]+}}@baz
-; IS__CGSCC____-SAME: (ptr nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[BAZ_THIS:%.*]], ptr nofree writeonly [[BAZ_DATA:%.*]]) #[[ATTR3:[0-9]+]] {
-; IS__CGSCC____-NEXT:  entry:
-; IS__CGSCC____-NEXT:    store ptr [[BAZ_DATA]], ptr [[BAZ_THIS]], align 8
-; IS__CGSCC____-NEXT:    ret void
-;
-entry:
-  store ptr %baz.data, ptr %baz.this, align 8
-  ret void
-}
-
-define ptr @foo(ptr %this, ptr %this.addr, ptr %this1) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@foo
-; IS__TUNIT____-SAME: (ptr nofree noundef nonnull align 8 dereferenceable(8) [[THIS:%.*]], ptr nocapture nofree readnone [[THIS_ADDR:%.*]], ptr nocapture nofree readnone [[THIS1:%.*]]) #[[ATTR1]] {
-; IS__TUNIT____-NEXT:  entry:
-; IS__TUNIT____-NEXT:    store ptr [[THIS]], ptr [[THIS]], align 8
-; IS__TUNIT____-NEXT:    [[CALL:%.*]] = call [[S:%.*]] @bar.5(ptr nofree noundef nonnull align 8 dereferenceable(8) [[THIS]]) #[[ATTR4]]
-; IS__TUNIT____-NEXT:    [[FOO_RET:%.*]] = extractvalue [[S]] [[CALL]], 0
-; IS__TUNIT____-NEXT:    ret ptr [[FOO_RET]]
-;
-; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@foo
-; IS__CGSCC____-SAME: (ptr nofree noundef nonnull align 8 dereferenceable(8) [[THIS:%.*]], ptr nocapture nofree readnone [[THIS_ADDR:%.*]], ptr nocapture nofree readnone [[THIS1:%.*]]) #[[ATTR2]] {
-; IS__CGSCC____-NEXT:  entry:
-; IS__CGSCC____-NEXT:    store ptr [[THIS]], ptr [[THIS]], align 8
-; IS__CGSCC____-NEXT:    [[CALL:%.*]] = call [[S:%.*]] @bar.5(ptr nofree noundef nonnull align 8 dereferenceable(8) [[THIS]]) #[[ATTR8]]
-; IS__CGSCC____-NEXT:    [[FOO_RET:%.*]] = extractvalue [[S]] [[CALL]], 0
-; IS__CGSCC____-NEXT:    ret ptr [[FOO_RET]]
-;
-entry:
-  store ptr %this, ptr %this, align 8
-  %this12 = load ptr, ptr %this, align 8
-  %call = call %S @bar.5(ptr %this)
-  %foo.ret = extractvalue %S %call, 0
-  ret ptr %foo.ret
-}
-
-define internal %S @bar.5(ptr %this) {
-; IS__TUNIT_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
-; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@bar.5
-; IS__TUNIT_OPM-SAME: (ptr nofree noundef nonnull align 8 dereferenceable(8) [[THIS:%.*]]) #[[ATTR1]] {
-; IS__TUNIT_OPM-NEXT:  entry:
-; IS__TUNIT_OPM-NEXT:    [[RETVAL:%.*]] = alloca [[S:%.*]], i32 0, align 8
-; IS__TUNIT_OPM-NEXT:    store ptr [[THIS]], ptr [[THIS]], align 8
-; IS__TUNIT_OPM-NEXT:    call void @baz.6(ptr nocapture nofree noundef nonnull writeonly align 8 [[RETVAL]], ptr nofree noundef nonnull align 8 dereferenceable(8) [[THIS]]) #[[ATTR4]]
-; IS__TUNIT_OPM-NEXT:    [[BAR_RET:%.*]] = load [[S]], ptr [[RETVAL]], align 8
-; IS__TUNIT_OPM-NEXT:    ret [[S]] [[BAR_RET]]
-;
-; IS__TUNIT_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@bar.5
-; IS__TUNIT_NPM-SAME: (ptr nofree noundef nonnull align 8 dereferenceable(8) [[THIS:%.*]]) #[[ATTR1]] {
-; IS__TUNIT_NPM-NEXT:  entry:
-; IS__TUNIT_NPM-NEXT:    [[RETVAL:%.*]] = alloca [[S:%.*]], i32 0, align 8
-; IS__TUNIT_NPM-NEXT:    store ptr [[THIS]], ptr [[THIS]], align 8
-; IS__TUNIT_NPM-NEXT:    call void @baz.6(ptr noalias nocapture nofree noundef nonnull writeonly align 8 [[RETVAL]], ptr nofree noundef nonnull align 8 dereferenceable(8) [[THIS]]) #[[ATTR4]]
-; IS__TUNIT_NPM-NEXT:    [[BAR_RET:%.*]] = load [[S]], ptr [[RETVAL]], align 8
-; IS__TUNIT_NPM-NEXT:    ret [[S]] [[BAR_RET]]
-;
-; IS__CGSCC_OPM: Function Attrs: argmemonly nofree nosync nounwind willreturn
-; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@bar.5
-; IS__CGSCC_OPM-SAME: (ptr nofree noundef nonnull align 8 dereferenceable(8) [[THIS:%.*]]) #[[ATTR2]] {
-; IS__CGSCC_OPM-NEXT:  entry:
-; IS__CGSCC_OPM-NEXT:    [[RETVAL:%.*]] = alloca [[S:%.*]], i32 0, align 8
-; IS__CGSCC_OPM-NEXT:    store ptr [[THIS]], ptr [[THIS]], align 8
-; IS__CGSCC_OPM-NEXT:    call void @baz.6(ptr nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[RETVAL]], ptr nofree noundef nonnull align 8 dereferenceable(8) [[THIS]]) #[[ATTR8]]
-; IS__CGSCC_OPM-NEXT:    [[BAR_RET:%.*]] = load [[S]], ptr [[RETVAL]], align 8
-; IS__CGSCC_OPM-NEXT:    ret [[S]] [[BAR_RET]]
-;
-; IS__CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@bar.5
-; IS__CGSCC_NPM-SAME: (ptr nofree noundef nonnull align 8 dereferenceable(8) [[THIS:%.*]]) #[[ATTR2]] {
-; IS__CGSCC_NPM-NEXT:  entry:
-; IS__CGSCC_NPM-NEXT:    [[RETVAL:%.*]] = alloca [[S:%.*]], i32 0, align 8
-; IS__CGSCC_NPM-NEXT:    store ptr [[THIS]], ptr [[THIS]], align 8
-; IS__CGSCC_NPM-NEXT:    call void @baz.6(ptr noalias nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[RETVAL]], ptr nofree noundef nonnull align 8 dereferenceable(8) [[THIS]]) #[[ATTR8]]
-; IS__CGSCC_NPM-NEXT:    [[BAR_RET:%.*]] = load [[S]], ptr [[RETVAL]], align 8
-; IS__CGSCC_NPM-NEXT:    ret [[S]] [[BAR_RET]]
-;
-entry:
-  %retval = alloca %S, i32 0, align 8
-  store ptr %this, ptr %this, align 8
-  %0 = load ptr, ptr %this, align 8
-  call void @baz.6(ptr %retval, ptr %this)
-  %bar.ret = load %S, ptr %retval, align 8
-  ret %S %bar.ret
-}
-
-define internal void @baz.6(ptr %this, ptr %data) {
-; IS__TUNIT_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
-; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@baz.6
-; IS__TUNIT_OPM-SAME: (ptr nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS:%.*]], ptr nofree noundef nonnull align 8 dereferenceable(8) [[DATA:%.*]]) #[[ATTR1]] {
-; IS__TUNIT_OPM-NEXT:  entry:
-; IS__TUNIT_OPM-NEXT:    store ptr [[DATA]], ptr [[THIS]], align 8
-; IS__TUNIT_OPM-NEXT:    call void @boom(ptr nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS]], ptr nofree noundef nonnull align 8 dereferenceable(8) [[DATA]]) #[[ATTR4]]
-; IS__TUNIT_OPM-NEXT:    ret void
-;
-; IS__TUNIT_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@baz.6
-; IS__TUNIT_NPM-SAME: (ptr noalias nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS:%.*]], ptr nofree noundef nonnull align 8 dereferenceable(8) [[DATA:%.*]]) #[[ATTR1]] {
-; IS__TUNIT_NPM-NEXT:  entry:
-; IS__TUNIT_NPM-NEXT:    store ptr [[DATA]], ptr [[THIS]], align 8
-; IS__TUNIT_NPM-NEXT:    call void @boom(ptr nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS]], ptr nofree noundef nonnull align 8 dereferenceable(8) [[DATA]]) #[[ATTR4]]
-; IS__TUNIT_NPM-NEXT:    ret void
-;
-; IS__CGSCC_OPM: Function Attrs: argmemonly nofree nosync nounwind willreturn
-; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@baz.6
-; IS__CGSCC_OPM-SAME: (ptr nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS:%.*]], ptr nofree noundef nonnull align 8 dereferenceable(8) [[DATA:%.*]]) #[[ATTR2]] {
-; IS__CGSCC_OPM-NEXT:  entry:
-; IS__CGSCC_OPM-NEXT:    store ptr [[DATA]], ptr [[THIS]], align 8
-; IS__CGSCC_OPM-NEXT:    call void @boom(ptr nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS]], ptr nofree noundef nonnull align 8 dereferenceable(8) [[DATA]]) #[[ATTR8]]
-; IS__CGSCC_OPM-NEXT:    ret void
-;
-; IS__CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@baz.6
-; IS__CGSCC_NPM-SAME: (ptr noalias nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS:%.*]], ptr nofree noundef nonnull align 8 dereferenceable(8) [[DATA:%.*]]) #[[ATTR2]] {
-; IS__CGSCC_NPM-NEXT:  entry:
-; IS__CGSCC_NPM-NEXT:    store ptr [[DATA]], ptr [[THIS]], align 8
-; IS__CGSCC_NPM-NEXT:    call void @boom(ptr nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS]], ptr nofree noundef nonnull align 8 dereferenceable(8) [[DATA]]) #[[ATTR8]]
-; IS__CGSCC_NPM-NEXT:    ret void
-;
-entry:
-  store ptr %data, ptr %this, align 8
-  call void @boom(ptr %this, ptr %data)
-  ret void
-}
-
-define internal void @boom(ptr %this, ptr %data) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
-; IS__TUNIT____-LABEL: define {{[^@]+}}@boom
-; IS__TUNIT____-SAME: (ptr nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS:%.*]], ptr nofree noundef nonnull align 8 dereferenceable(8) [[DATA:%.*]]) #[[ATTR1]] {
-; IS__TUNIT____-NEXT:  entry:
-; IS__TUNIT____-NEXT:    [[DATA_ADDR:%.*]] = alloca ptr, i32 0, align 8
-; IS__TUNIT____-NEXT:    store ptr [[DATA]], ptr [[DATA_ADDR]], align 8
-; IS__TUNIT____-NEXT:    [[V:%.*]] = load ptr, ptr [[DATA_ADDR]], align 8
-; IS__TUNIT____-NEXT:    store ptr [[V]], ptr [[THIS]], align 8
-; IS__TUNIT____-NEXT:    ret void
-;
-; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@boom
-; IS__CGSCC____-SAME: (ptr nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS:%.*]], ptr nofree [[DATA:%.*]]) #[[ATTR4:[0-9]+]] {
-; IS__CGSCC____-NEXT:  entry:
-; IS__CGSCC____-NEXT:    [[DATA_ADDR:%.*]] = alloca ptr, i32 0, align 8
-; IS__CGSCC____-NEXT:    store ptr [[DATA]], ptr [[DATA_ADDR]], align 8
-; IS__CGSCC____-NEXT:    store ptr [[DATA]], ptr [[THIS]], align 8
-; IS__CGSCC____-NEXT:    ret void
-;
-entry:
-  %data.addr = alloca ptr, i32 0, align 8
-  store ptr %data, ptr %data.addr, align 8
-  %v = load ptr, ptr %data.addr, align 8
-  store ptr %v, ptr %this, align 8
-  ret void
-}
-
-define weak_odr void @t3() {
-; CHECK-LABEL: define {{[^@]+}}@t3() {
-; CHECK-NEXT:  entry:
-; CHECK-NEXT:    [[TMP0:%.*]] = call i32 @__kmpc_target_init(ptr noalias nocapture noundef align 4294967296 null, i8 noundef 0, i1 noundef false, i1 noundef false)
-; CHECK-NEXT:    br label [[USER_CODE_ENTRY:%.*]]
-; CHECK:       user_code.entry:
-; CHECK-NEXT:    br label [[FOR_COND:%.*]]
-; CHECK:       for.cond:
-; CHECK-NEXT:    br label [[FOR_BODY:%.*]]
-; CHECK:       for.body:
-; CHECK-NEXT:    [[CALL4:%.*]] = call [[S_2:%.*]] @t3.helper()
-; CHECK-NEXT:    ret void
-;
-entry:
-  %0 = call i32 @__kmpc_target_init(ptr null, i8 0, i1 false, i1 false)
-  br label %user_code.entry
-
-user_code.entry:                                  ; preds = %entry
-  br label %for.cond
-
-for.cond:                                         ; preds = %user_code.entry
-  br label %for.body
-
-for.body:                                         ; preds = %for.cond
-  %call4 = call %S.2 @t3.helper()
-  ret void
-}
-
-declare i32 @__kmpc_target_init(ptr, i8, i1, i1)
-
-define %S.2 @t3.helper() {
-; CHECK-LABEL: define {{[^@]+}}@t3.helper() {
-; CHECK-NEXT:  entry:
-; CHECK-NEXT:    [[RETVAL:%.*]] = alloca [[S_2:%.*]], align 8
-; CHECK-NEXT:    call void @ext1(ptr noundef nonnull align 8 dereferenceable(24) [[RETVAL]])
-; CHECK-NEXT:    [[DOTFCA_0_LOAD:%.*]] = load ptr, ptr [[RETVAL]], align 8
-; CHECK-NEXT:    [[DOTFCA_0_INSERT:%.*]] = insertvalue [[S_2]] poison, ptr [[DOTFCA_0_LOAD]], 0
-; CHECK-NEXT:    [[DOTFCA_1_GEP:%.*]] = getelementptr inbounds [[S_2]], ptr [[RETVAL]], i32 0, i32 1
-; CHECK-NEXT:    [[DOTFCA_1_LOAD:%.*]] = load i64, ptr [[DOTFCA_1_GEP]], align 8
-; CHECK-NEXT:    [[DOTFCA_1_INSERT:%.*]] = insertvalue [[S_2]] [[DOTFCA_0_INSERT]], i64 [[DOTFCA_1_LOAD]], 1
-; CHECK-NEXT:    [[DOTFCA_2_GEP:%.*]] = getelementptr inbounds [[S_2]], ptr [[RETVAL]], i32 0, i32 2
-; CHECK-NEXT:    [[DOTFCA_2_LOAD:%.*]] = load i64, ptr [[DOTFCA_2_GEP]], align 8
-; CHECK-NEXT:    [[DOTFCA_2_INSERT:%.*]] = insertvalue [[S_2]] [[DOTFCA_1_INSERT]], i64 [[DOTFCA_2_LOAD]], 2
-; CHECK-NEXT:    ret [[S_2]] zeroinitializer
-;
-entry:
-  %retval = alloca %S.2, align 8
-  call void @ext1(ptr %retval)
-  %.fca.0.gep = getelementptr inbounds %S.2, ptr %retval, i32 0, i32 0
-  %.fca.0.load = load ptr, ptr %.fca.0.gep, align 8
-  %.fca.0.insert = insertvalue %S.2 poison, ptr %.fca.0.load, 0
-  %.fca.1.gep = getelementptr inbounds %S.2, ptr %retval, i32 0, i32 1
-  %.fca.1.load = load i64, ptr %.fca.1.gep, align 8
-  %.fca.1.insert = insertvalue %S.2 %.fca.0.insert, i64 %.fca.1.load, 1
-  %.fca.2.gep = getelementptr inbounds %S.2, ptr %retval, i32 0, i32 2
-  %.fca.2.load = load i64, ptr %.fca.2.gep, align 8
-  %.fca.2.insert = insertvalue %S.2 %.fca.1.insert, i64 %.fca.2.load, 2
-  ret %S.2 zeroinitializer
-}
-
-declare void @ext1(ptr)
-
-; Taken from https://github.com/llvm/llvm-project/issues/54981
-define dso_local void @spam() {
-; IS__TUNIT_OPM: Function Attrs: nofree norecurse noreturn nosync nounwind readnone
-; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@spam
-; IS__TUNIT_OPM-SAME: () #[[ATTR2:[0-9]+]] {
-; IS__TUNIT_OPM-NEXT:  bb:
-; IS__TUNIT_OPM-NEXT:    [[TMP:%.*]] = alloca i32, align 4
-; IS__TUNIT_OPM-NEXT:    [[X:%.*]] = fptosi float undef to i32
-; IS__TUNIT_OPM-NEXT:    store i32 [[X]], ptr [[TMP]], align 4
-; IS__TUNIT_OPM-NEXT:    br label [[BB16:%.*]]
-; IS__TUNIT_OPM:       bb16:
-; IS__TUNIT_OPM-NEXT:    [[TMP17:%.*]] = load i32, ptr [[TMP]], align 4
-; IS__TUNIT_OPM-NEXT:    [[TMP18:%.*]] = icmp eq i32 [[TMP17]], 0
-; IS__TUNIT_OPM-NEXT:    br i1 [[TMP18]], label [[BB35:%.*]], label [[BB19:%.*]]
-; IS__TUNIT_OPM:       bb19:
-; IS__TUNIT_OPM-NEXT:    [[Y:%.*]] = getelementptr inbounds i32, ptr [[TMP]], i64 0
-; IS__TUNIT_OPM-NEXT:    [[TMP20:%.*]] = bitcast ptr [[Y]] to ptr
-; IS__TUNIT_OPM-NEXT:    [[TMP21:%.*]] = load float, ptr [[TMP20]], align 4
-; IS__TUNIT_OPM-NEXT:    [[TMP22:%.*]] = fadd fast float [[TMP21]], 0.000000e+00
-; IS__TUNIT_OPM-NEXT:    br label [[BB23:%.*]]
-; IS__TUNIT_OPM:       bb23:
-; IS__TUNIT_OPM-NEXT:    br label [[BB25:%.*]]
-; IS__TUNIT_OPM:       bb25:
-; IS__TUNIT_OPM-NEXT:    [[TMP26:%.*]] = phi <2 x float> [ [[TMP30:%.*]], [[BB28:%.*]] ], [ undef, [[BB23]] ]
-; IS__TUNIT_OPM-NEXT:    br label [[BB28]]
-; IS__TUNIT_OPM:       bb28:
-; IS__TUNIT_OPM-NEXT:    [[TMP29:%.*]] = insertelement <2 x float> [[TMP26]], float undef, i32 0
-; IS__TUNIT_OPM-NEXT:    [[TMP30]] = insertelement <2 x float> [[TMP29]], float [[TMP22]], i32 1
-; IS__TUNIT_OPM-NEXT:    br label [[BB25]]
-; IS__TUNIT_OPM:       bb34:
-; IS__TUNIT_OPM-NEXT:    unreachable
-; IS__TUNIT_OPM:       bb35:
-; IS__TUNIT_OPM-NEXT:    unreachable
-;
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse noreturn nosync nounwind readnone
-; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@spam
-; IS__TUNIT_NPM-SAME: () #[[ATTR2:[0-9]+]] {
-; IS__TUNIT_NPM-NEXT:  bb:
-; IS__TUNIT_NPM-NEXT:    [[TMP:%.*]] = alloca i32, align 4
-; IS__TUNIT_NPM-NEXT:    [[X:%.*]] = fptosi float undef to i32
-; IS__TUNIT_NPM-NEXT:    store i32 [[X]], ptr [[TMP]], align 4
-; IS__TUNIT_NPM-NEXT:    br label [[BB16:%.*]]
-; IS__TUNIT_NPM:       bb16:
-; IS__TUNIT_NPM-NEXT:    [[TMP18:%.*]] = icmp eq i32 [[X]], 0
-; IS__TUNIT_NPM-NEXT:    br i1 [[TMP18]], label [[BB35:%.*]], label [[BB19:%.*]]
-; IS__TUNIT_NPM:       bb19:
-; IS__TUNIT_NPM-NEXT:    [[TMP21:%.*]] = load float, ptr [[TMP]], align 4
-; IS__TUNIT_NPM-NEXT:    [[TMP22:%.*]] = fadd fast float [[TMP21]], 0.000000e+00
-; IS__TUNIT_NPM-NEXT:    br label [[BB23:%.*]]
-; IS__TUNIT_NPM:       bb23:
-; IS__TUNIT_NPM-NEXT:    br label [[BB25:%.*]]
-; IS__TUNIT_NPM:       bb25:
-; IS__TUNIT_NPM-NEXT:    [[TMP26:%.*]] = phi <2 x float> [ [[TMP30:%.*]], [[BB28:%.*]] ], [ undef, [[BB23]] ]
-; IS__TUNIT_NPM-NEXT:    br label [[BB28]]
-; IS__TUNIT_NPM:       bb28:
-; IS__TUNIT_NPM-NEXT:    [[TMP29:%.*]] = insertelement <2 x float> [[TMP26]], float undef, i32 0
-; IS__TUNIT_NPM-NEXT:    [[TMP30]] = insertelement <2 x float> [[TMP29]], float [[TMP22]], i32 1
-; IS__TUNIT_NPM-NEXT:    br label [[BB25]]
-; IS__TUNIT_NPM:       bb34:
-; IS__TUNIT_NPM-NEXT:    unreachable
-; IS__TUNIT_NPM:       bb35:
-; IS__TUNIT_NPM-NEXT:    unreachable
-;
-; IS__CGSCC_OPM: Function Attrs: nofree norecurse noreturn nosync nounwind readnone
-; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@spam
-; IS__CGSCC_OPM-SAME: () #[[ATTR5:[0-9]+]] {
-; IS__CGSCC_OPM-NEXT:  bb:
-; IS__CGSCC_OPM-NEXT:    [[TMP:%.*]] = alloca i32, align 4
-; IS__CGSCC_OPM-NEXT:    [[X:%.*]] = fptosi float undef to i32
-; IS__CGSCC_OPM-NEXT:    store i32 [[X]], ptr [[TMP]], align 4
-; IS__CGSCC_OPM-NEXT:    br label [[BB16:%.*]]
-; IS__CGSCC_OPM:       bb16:
-; IS__CGSCC_OPM-NEXT:    [[TMP17:%.*]] = load i32, ptr [[TMP]], align 4
-; IS__CGSCC_OPM-NEXT:    [[TMP18:%.*]] = icmp eq i32 [[TMP17]], 0
-; IS__CGSCC_OPM-NEXT:    br i1 [[TMP18]], label [[BB35:%.*]], label [[BB19:%.*]]
-; IS__CGSCC_OPM:       bb19:
-; IS__CGSCC_OPM-NEXT:    [[Y:%.*]] = getelementptr inbounds i32, ptr [[TMP]], i64 0
-; IS__CGSCC_OPM-NEXT:    [[TMP20:%.*]] = bitcast ptr [[Y]] to ptr
-; IS__CGSCC_OPM-NEXT:    [[TMP21:%.*]] = load float, ptr [[TMP20]], align 4
-; IS__CGSCC_OPM-NEXT:    [[TMP22:%.*]] = fadd fast float [[TMP21]], 0.000000e+00
-; IS__CGSCC_OPM-NEXT:    br label [[BB23:%.*]]
-; IS__CGSCC_OPM:       bb23:
-; IS__CGSCC_OPM-NEXT:    br label [[BB25:%.*]]
-; IS__CGSCC_OPM:       bb25:
-; IS__CGSCC_OPM-NEXT:    [[TMP26:%.*]] = phi <2 x float> [ [[TMP30:%.*]], [[BB28:%.*]] ], [ undef, [[BB23]] ]
-; IS__CGSCC_OPM-NEXT:    br label [[BB28]]
-; IS__CGSCC_OPM:       bb28:
-; IS__CGSCC_OPM-NEXT:    [[TMP29:%.*]] = insertelement <2 x float> [[TMP26]], float undef, i32 0
-; IS__CGSCC_OPM-NEXT:    [[TMP30]] = insertelement <2 x float> [[TMP29]], float [[TMP22]], i32 1
-; IS__CGSCC_OPM-NEXT:    br label [[BB25]]
-; IS__CGSCC_OPM:       bb34:
-; IS__CGSCC_OPM-NEXT:    unreachable
-; IS__CGSCC_OPM:       bb35:
-; IS__CGSCC_OPM-NEXT:    unreachable
-;
-; IS__CGSCC_NPM: Function Attrs: nofree norecurse noreturn nosync nounwind readnone
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@spam
-; IS__CGSCC_NPM-SAME: () #[[ATTR5:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT:  bb:
-; IS__CGSCC_NPM-NEXT:    [[TMP:%.*]] = alloca i32, align 4
-; IS__CGSCC_NPM-NEXT:    [[X:%.*]] = fptosi float undef to i32
-; IS__CGSCC_NPM-NEXT:    store i32 [[X]], ptr [[TMP]], align 4
-; IS__CGSCC_NPM-NEXT:    br label [[BB16:%.*]]
-; IS__CGSCC_NPM:       bb16:
-; IS__CGSCC_NPM-NEXT:    [[TMP18:%.*]] = icmp eq i32 [[X]], 0
-; IS__CGSCC_NPM-NEXT:    br i1 [[TMP18]], label [[BB35:%.*]], label [[BB19:%.*]]
-; IS__CGSCC_NPM:       bb19:
-; IS__CGSCC_NPM-NEXT:    [[TMP21:%.*]] = load float, ptr [[TMP]], align 4
-; IS__CGSCC_NPM-NEXT:    [[TMP22:%.*]] = fadd fast float [[TMP21]], 0.000000e+00
-; IS__CGSCC_NPM-NEXT:    br label [[BB23:%.*]]
-; IS__CGSCC_NPM:       bb23:
-; IS__CGSCC_NPM-NEXT:    br label [[BB25:%.*]]
-; IS__CGSCC_NPM:       bb25:
-; IS__CGSCC_NPM-NEXT:    [[TMP26:%.*]] = phi <2 x float> [ [[TMP30:%.*]], [[BB28:%.*]] ], [ undef, [[BB23]] ]
-; IS__CGSCC_NPM-NEXT:    br label [[BB28]]
-; IS__CGSCC_NPM:       bb28:
-; IS__CGSCC_NPM-NEXT:    [[TMP29:%.*]] = insertelement <2 x float> [[TMP26]], float undef, i32 0
-; IS__CGSCC_NPM-NEXT:    [[TMP30]] = insertelement <2 x float> [[TMP29]], float [[TMP22]], i32 1
-; IS__CGSCC_NPM-NEXT:    br label [[BB25]]
-; IS__CGSCC_NPM:       bb34:
-; IS__CGSCC_NPM-NEXT:    unreachable
-; IS__CGSCC_NPM:       bb35:
-; IS__CGSCC_NPM-NEXT:    unreachable
-;
-bb:
-  %tmp = alloca i32, align 4
-  %tmp12 = getelementptr inbounds i32, ptr %tmp, i64 0
-  %tmp15 = getelementptr inbounds i32, ptr %tmp, i64 0
-  %x = fptosi float undef to i32
-  store i32 %x, ptr %tmp15, align 4
-  br label %bb16
-
-bb16:                                             ; preds = %bb
-  %tmp17 = load i32, ptr %tmp12, align 4
-  %tmp18 = icmp eq i32 %tmp17, 0
-  br i1 %tmp18, label %bb35, label %bb19
-
-bb19:                                             ; preds = %bb16
-  %y = getelementptr inbounds i32, ptr %tmp, i64 0
-  %tmp20 = bitcast ptr %y to ptr
-  %tmp21 = load float, ptr %tmp20, align 4
-  %tmp22 = fadd fast float %tmp21, 0.000000e+00
-  br label %bb23
-
-bb23:                                             ; preds = %bb34, %bb19
-  %tmp24 = phi <2 x float> [ undef, %bb19 ], [ %tmp26, %bb34 ]
-  br label %bb25
-
-bb25:                                             ; preds = %bb28, %bb23
-  %tmp26 = phi <2 x float> [ %tmp30, %bb28 ], [ %tmp24, %bb23 ]
-  %tmp27 = icmp ult i32 undef, 8
-  br i1 %tmp27, label %bb28, label %bb34
-
-bb28:                                             ; preds = %bb25
-  %tmp29 = insertelement <2 x float> %tmp26, float undef, i32 0
-  %tmp30 = insertelement <2 x float> %tmp29, float %tmp22, i32 1
-  br label %bb25
-
-bb34:                                             ; preds = %bb25
-  br label %bb23
-
-bb35:                                             ; preds = %bb16
-  unreachable
-}
-
-define double @t4(ptr %this, ptr %this.addr, ptr %this1) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@t4
-; IS__TUNIT____-SAME: (ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS:%.*]], ptr nocapture nofree readnone [[THIS_ADDR:%.*]], ptr nocapture nofree readnone [[THIS1:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT:  entry:
-; IS__TUNIT____-NEXT:    [[THIS_ADDR1:%.*]] = alloca ptr, i32 0, align 8
-; IS__TUNIT____-NEXT:    store ptr [[THIS]], ptr [[THIS]], align 8
-; IS__TUNIT____-NEXT:    [[CALL:%.*]] = call [[S:%.*]] @t4a(ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS]]) #[[ATTR5:[0-9]+]]
-; IS__TUNIT____-NEXT:    ret double 0.000000e+00
-;
-; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@t4
-; IS__CGSCC____-SAME: (ptr nofree noundef nonnull align 8 dereferenceable(8) [[THIS:%.*]], ptr nocapture nofree readnone [[THIS_ADDR:%.*]], ptr nocapture nofree readnone [[THIS1:%.*]]) #[[ATTR2]] {
-; IS__CGSCC____-NEXT:  entry:
-; IS__CGSCC____-NEXT:    [[THIS_ADDR1:%.*]] = alloca ptr, i32 0, align 8
-; IS__CGSCC____-NEXT:    store ptr [[THIS]], ptr [[THIS]], align 8
-; IS__CGSCC____-NEXT:    [[CALL:%.*]] = call [[S:%.*]] @t4a(ptr nofree noundef nonnull align 8 dereferenceable(8) [[THIS]]) #[[ATTR8]]
-; IS__CGSCC____-NEXT:    [[TMP0:%.*]] = extractvalue [[S]] [[CALL]], 0
-; IS__CGSCC____-NEXT:    ret double 0.000000e+00
-;
-entry:
-  %this.addr1 = alloca ptr, i32 0, align 8
-  store ptr %this, ptr %this, align 8
-  %this12 = load ptr, ptr %this, align 8
-  %call = call %S @t4a(ptr %this)
-  %0 = extractvalue %S %call, 0
-  ret double 0.000000e+00
-}
-
-define internal %S @t4a(ptr %this) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@t4a
-; IS__TUNIT____-SAME: (ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT:  entry:
-; IS__TUNIT____-NEXT:    [[RETVAL:%.*]] = alloca [[S:%.*]], i32 0, align 8
-; IS__TUNIT____-NEXT:    [[THIS_ADDR:%.*]] = alloca ptr, i32 0, align 8
-; IS__TUNIT____-NEXT:    store ptr [[THIS]], ptr [[THIS]], align 8
-; IS__TUNIT____-NEXT:    call void @t4b(ptr noalias nocapture nofree noundef nonnull writeonly align 8 [[RETVAL]]) #[[ATTR5]]
-; IS__TUNIT____-NEXT:    ret [[S]] undef
-;
-; IS__CGSCC_OPM: Function Attrs: argmemonly nofree nosync nounwind willreturn
-; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@t4a
-; IS__CGSCC_OPM-SAME: (ptr nofree noundef nonnull align 8 dereferenceable(8) [[THIS:%.*]]) #[[ATTR2]] {
-; IS__CGSCC_OPM-NEXT:  entry:
-; IS__CGSCC_OPM-NEXT:    [[RETVAL:%.*]] = alloca [[S:%.*]], i32 0, align 8
-; IS__CGSCC_OPM-NEXT:    [[THIS_ADDR:%.*]] = alloca ptr, i32 0, align 8
-; IS__CGSCC_OPM-NEXT:    store ptr [[THIS]], ptr [[THIS]], align 8
-; IS__CGSCC_OPM-NEXT:    call void @t4b(ptr nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[RETVAL]], ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS]]) #[[ATTR6]]
-; IS__CGSCC_OPM-NEXT:    [[TMP0:%.*]] = load [[S]], ptr [[RETVAL]], align 8
-; IS__CGSCC_OPM-NEXT:    ret [[S]] [[TMP0]]
-;
-; IS__CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@t4a
-; IS__CGSCC_NPM-SAME: (ptr nofree noundef nonnull align 8 dereferenceable(8) [[THIS:%.*]]) #[[ATTR2]] {
-; IS__CGSCC_NPM-NEXT:  entry:
-; IS__CGSCC_NPM-NEXT:    [[RETVAL:%.*]] = alloca [[S:%.*]], i32 0, align 8
-; IS__CGSCC_NPM-NEXT:    [[THIS_ADDR:%.*]] = alloca ptr, i32 0, align 8
-; IS__CGSCC_NPM-NEXT:    store ptr [[THIS]], ptr [[THIS]], align 8
-; IS__CGSCC_NPM-NEXT:    call void @t4b(ptr noalias nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[RETVAL]], ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS]]) #[[ATTR6]]
-; IS__CGSCC_NPM-NEXT:    [[TMP0:%.*]] = load [[S]], ptr [[RETVAL]], align 8
-; IS__CGSCC_NPM-NEXT:    ret [[S]] [[TMP0]]
-;
-entry:
-  %retval = alloca %S, i32 0, align 8
-  %this.addr = alloca ptr, i32 0, align 8
-  store ptr %this, ptr %this, align 8
-  %this1 = load ptr, ptr %this, align 8
-  %buffer_ = getelementptr inbounds %struct1, ptr %this1, i32 0, i32 0
-  %data_ = getelementptr inbounds %struct2, ptr %buffer_, i32 0, i32 0
-  %0 = load ptr, ptr %this, align 8
-  call void @t4b(ptr %retval, ptr %this)
-  %1 = load %S, ptr %retval, align 8
-  ret %S %1
-}
-
-define internal void @t4b(ptr %this, ptr %data) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@t4b
-; IS__TUNIT____-SAME: (ptr noalias nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT:  entry:
-; IS__TUNIT____-NEXT:    [[THIS_ADDR:%.*]] = alloca ptr, i32 0, align 8
-; IS__TUNIT____-NEXT:    [[DATA_ADDR:%.*]] = alloca ptr, i32 0, align 8
-; IS__TUNIT____-NEXT:    call void @t4c(ptr noalias nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS]]) #[[ATTR5]]
-; IS__TUNIT____-NEXT:    ret void
-;
-; IS__CGSCC_OPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly
-; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@t4b
-; IS__CGSCC_OPM-SAME: (ptr nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS:%.*]], ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[DATA:%.*]]) #[[ATTR0]] {
-; IS__CGSCC_OPM-NEXT:  entry:
-; IS__CGSCC_OPM-NEXT:    [[THIS_ADDR:%.*]] = alloca ptr, i32 0, align 8
-; IS__CGSCC_OPM-NEXT:    [[DATA_ADDR:%.*]] = alloca ptr, i32 0, align 8
-; IS__CGSCC_OPM-NEXT:    store ptr [[DATA]], ptr [[THIS]], align 8
-; IS__CGSCC_OPM-NEXT:    call void @t4c(ptr nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS]], ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[DATA]]) #[[ATTR6]]
-; IS__CGSCC_OPM-NEXT:    ret void
-;
-; IS__CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@t4b
-; IS__CGSCC_NPM-SAME: (ptr noalias nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS:%.*]], ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[DATA:%.*]]) #[[ATTR0]] {
-; IS__CGSCC_NPM-NEXT:  entry:
-; IS__CGSCC_NPM-NEXT:    [[THIS_ADDR:%.*]] = alloca ptr, i32 0, align 8
-; IS__CGSCC_NPM-NEXT:    [[DATA_ADDR:%.*]] = alloca ptr, i32 0, align 8
-; IS__CGSCC_NPM-NEXT:    store ptr [[DATA]], ptr [[THIS]], align 8
-; IS__CGSCC_NPM-NEXT:    call void @t4c(ptr nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS]], ptr nofree noundef nonnull writeonly align 8 dereferenceable(8) [[DATA]]) #[[ATTR6]]
-; IS__CGSCC_NPM-NEXT:    ret void
-;
-entry:
-  %this.addr = alloca ptr, i32 0, align 8
-  %data.addr = alloca ptr, i32 0, align 8
-  store ptr %this, ptr %this.addr, align 8
-  store ptr %data, ptr %this, align 8
-  %this1 = load ptr, ptr %this, align 8
-  %0 = load ptr, ptr %this, align 8
-  call void @t4c(ptr %this, ptr %data)
-  ret void
-}
-
-define internal void @t4c(ptr %this, ptr %data) {
-; IS__TUNIT____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@t4c
-; IS__TUNIT____-SAME: (ptr noalias nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS:%.*]]) #[[ATTR0]] {
-; IS__TUNIT____-NEXT:  entry:
-; IS__TUNIT____-NEXT:    [[THIS_ADDR:%.*]] = alloca ptr, i32 0, align 8
-; IS__TUNIT____-NEXT:    [[DATA_ADDR:%.*]] = alloca ptr, i32 0, align 8
-; IS__TUNIT____-NEXT:    ret void
-;
-; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
-; IS__CGSCC____-LABEL: define {{[^@]+}}@t4c
-; IS__CGSCC____-SAME: (ptr nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[THIS:%.*]], ptr nofree writeonly [[DATA:%.*]]) #[[ATTR3]] {
-; IS__CGSCC____-NEXT:  entry:
-; IS__CGSCC____-NEXT:    [[THIS_ADDR:%.*]] = alloca ptr, i32 0, align 8
-; IS__CGSCC____-NEXT:    [[DATA_ADDR:%.*]] = alloca ptr, i32 0, align 8
-; IS__CGSCC____-NEXT:    store ptr [[DATA]], ptr [[THIS]], align 8
-; IS__CGSCC____-NEXT:    store ptr [[DATA]], ptr [[THIS]], align 8
-; IS__CGSCC____-NEXT:    ret void
-;
-entry:
-  %this.addr = alloca ptr, i32 0, align 8
-  %data.addr = alloca ptr, i32 0, align 8
-  store ptr %this, ptr %this.addr, align 8
-  store ptr %data, ptr %this, align 8
-  %this1 = load ptr, ptr %this, align 8
-  %data_ = getelementptr inbounds %S, ptr %this1, i32 0, i32 0
-  %0 = load ptr, ptr %this, align 8
-  store ptr %data, ptr %this, align 8
-  ret void
-}
-
-!llvm.module.flags = !{!0, !1, !2, !3, !4, !5, !6, !7}
-
-!0 = !{i32 2, !"SDK Version", [2 x i32] [i32 11, i32 5]}
-!1 = !{i32 1, !"wchar_size", i32 4}
-!2 = !{i32 7, !"openmp", i32 50}
-!3 = !{i32 7, !"openmp-device", i32 50}
-!4 = !{i32 7, !"PIC Level", i32 2}
-!5 = !{i32 7, !"frame-pointer", i32 2}
-!6 = !{i32 7, !"Dwarf Version", i32 2}
-!7 = !{i32 2, !"Debug Info Version", i32 3}
-;.
-; IS__TUNIT____: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
-; IS__TUNIT____: attributes #[[ATTR1]] = { argmemonly nofree norecurse nosync nounwind willreturn }
-; IS__TUNIT____: attributes #[[ATTR2:[0-9]+]] = { nofree norecurse noreturn nosync nounwind readnone }
-; IS__TUNIT____: attributes #[[ATTR3]] = { nofree norecurse nosync nounwind willreturn writeonly }
-; IS__TUNIT____: attributes #[[ATTR4]] = { nofree nosync nounwind willreturn }
-; IS__TUNIT____: attributes #[[ATTR5]] = { nofree nosync nounwind willreturn writeonly }
-;.
-; IS__CGSCC____: attributes #[[ATTR0]] = { argmemonly nofree nosync nounwind willreturn writeonly }
-; IS__CGSCC____: attributes #[[ATTR1]] = { nofree norecurse nosync nounwind readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR2]] = { argmemonly nofree nosync nounwind willreturn }
-; IS__CGSCC____: attributes #[[ATTR3]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
-; IS__CGSCC____: attributes #[[ATTR4]] = { argmemonly nofree norecurse nosync nounwind willreturn }
-; IS__CGSCC____: attributes #[[ATTR5:[0-9]+]] = { nofree norecurse noreturn nosync nounwind readnone }
-; IS__CGSCC____: attributes #[[ATTR6]] = { nounwind willreturn writeonly }
-; IS__CGSCC____: attributes #[[ATTR7]] = { readnone willreturn }
-; IS__CGSCC____: attributes #[[ATTR8]] = { nounwind willreturn }
-;.
-; CHECK: [[META0:![0-9]+]] = !{i32 2, !"SDK Version", [2 x i32] [i32 11, i32 5]}
-; CHECK: [[META1:![0-9]+]] = !{i32 1, !"wchar_size", i32 4}
-; CHECK: [[META2:![0-9]+]] = !{i32 7, !"openmp", i32 50}
-; CHECK: [[META3:![0-9]+]] = !{i32 7, !"openmp-device", i32 50}
-; CHECK: [[META4:![0-9]+]] = !{i32 7, !"PIC Level", i32 2}
-; CHECK: [[META5:![0-9]+]] = !{i32 7, !"frame-pointer", i32 2}
-; CHECK: [[META6:![0-9]+]] = !{i32 7, !"Dwarf Version", i32 2}
-; CHECK: [[META7:![0-9]+]] = !{i32 2, !"Debug Info Version", i32 3}
-;.

diff  --git a/llvm/test/Transforms/Attributor/value-simplify-pointer-info.ll b/llvm/test/Transforms/Attributor/value-simplify-pointer-info.ll
index f45a6f59fc66d..ae3c60f7f15c0 100644
--- a/llvm/test/Transforms/Attributor/value-simplify-pointer-info.ll
+++ b/llvm/test/Transforms/Attributor/value-simplify-pointer-info.ll
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=82 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=82 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
+; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=50 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=50 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
 ; RUN: opt -attributor-cgscc -enable-new-pm=0 -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_NPM,IS__CGSCC____,IS________OPM,IS__CGSCC_OPM
 ; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM
 ;
@@ -167,60 +167,115 @@ define void @local_alloca_simplifiable_1(%struct.S* noalias sret(%struct.S) alig
 ; IS__TUNIT_NPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I12]]) #[[ATTR12]]
 ; IS__TUNIT_NPM-NEXT:    ret void
 ;
-; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@local_alloca_simplifiable_1
-; IS__CGSCC____-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]]) #[[ATTR1:[0-9]+]] {
-; IS__CGSCC____-NEXT:  entry:
-; IS__CGSCC____-NEXT:    [[S:%.*]] = alloca [[STRUCT_S]], align 4
-; IS__CGSCC____-NEXT:    [[I:%.*]] = bitcast %struct.S* [[S]] to i8*
-; IS__CGSCC____-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I]]) #[[ATTR13:[0-9]+]]
-; IS__CGSCC____-NEXT:    [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
-; IS__CGSCC____-NEXT:    store float 0x3FF19999A0000000, float* [[F1]], align 4, !tbaa [[TBAA7:![0-9]+]]
-; IS__CGSCC____-NEXT:    [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4
-; IS__CGSCC____-NEXT:    store float 0x40019999A0000000, float* [[F2]], align 4, !tbaa [[TBAA10:![0-9]+]]
-; IS__CGSCC____-NEXT:    [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5
-; IS__CGSCC____-NEXT:    store float 0x400A666660000000, float* [[F3]], align 4, !tbaa [[TBAA11:![0-9]+]]
-; IS__CGSCC____-NEXT:    [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
-; IS__CGSCC____-NEXT:    call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(24) [[I1]], i32 noundef 1) #[[ATTR14:[0-9]+]]
-; IS__CGSCC____-NEXT:    [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1
-; IS__CGSCC____-NEXT:    call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(20) [[I2]], i32 noundef 2) #[[ATTR14]]
-; IS__CGSCC____-NEXT:    [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
-; IS__CGSCC____-NEXT:    call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(16) [[I3]], i32 noundef 3) #[[ATTR14]]
-; IS__CGSCC____-NEXT:    [[F11:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
-; IS__CGSCC____-NEXT:    [[I4:%.*]] = load float, float* [[F11]], align 4, !tbaa [[TBAA7]]
-; IS__CGSCC____-NEXT:    [[F12:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3
-; IS__CGSCC____-NEXT:    store float [[I4]], float* [[F12]], align 4, !tbaa [[TBAA7]]
-; IS__CGSCC____-NEXT:    [[F23:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4
-; IS__CGSCC____-NEXT:    [[I5:%.*]] = load float, float* [[F23]], align 4, !tbaa [[TBAA10]]
-; IS__CGSCC____-NEXT:    [[MUL:%.*]] = fmul float [[I5]], 2.000000e+00
-; IS__CGSCC____-NEXT:    [[F24:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4
-; IS__CGSCC____-NEXT:    store float [[MUL]], float* [[F24]], align 4, !tbaa [[TBAA10]]
-; IS__CGSCC____-NEXT:    [[F35:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5
-; IS__CGSCC____-NEXT:    [[I6:%.*]] = load float, float* [[F35]], align 4, !tbaa [[TBAA11]]
-; IS__CGSCC____-NEXT:    [[F16:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
-; IS__CGSCC____-NEXT:    [[I7:%.*]] = load float, float* [[F16]], align 4, !tbaa [[TBAA7]]
-; IS__CGSCC____-NEXT:    [[ADD:%.*]] = fadd float [[I6]], [[I7]]
-; IS__CGSCC____-NEXT:    [[F37:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5
-; IS__CGSCC____-NEXT:    store float [[ADD]], float* [[F37]], align 4, !tbaa [[TBAA11]]
-; IS__CGSCC____-NEXT:    [[I18:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
-; IS__CGSCC____-NEXT:    [[I8:%.*]] = load i32, i32* [[I18]], align 4, !tbaa [[TBAA12:![0-9]+]]
-; IS__CGSCC____-NEXT:    [[I19:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0
-; IS__CGSCC____-NEXT:    store i32 [[I8]], i32* [[I19]], align 4, !tbaa [[TBAA12]]
-; IS__CGSCC____-NEXT:    [[I210:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1
-; IS__CGSCC____-NEXT:    [[I9:%.*]] = load i32, i32* [[I210]], align 4, !tbaa [[TBAA13:![0-9]+]]
-; IS__CGSCC____-NEXT:    [[MUL11:%.*]] = shl nsw i32 [[I9]], 1
-; IS__CGSCC____-NEXT:    [[I212:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1
-; IS__CGSCC____-NEXT:    store i32 [[MUL11]], i32* [[I212]], align 4, !tbaa [[TBAA13]]
-; IS__CGSCC____-NEXT:    [[I313:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
-; IS__CGSCC____-NEXT:    [[I10:%.*]] = load i32, i32* [[I313]], align 4, !tbaa [[TBAA14:![0-9]+]]
-; IS__CGSCC____-NEXT:    [[I114:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
-; IS__CGSCC____-NEXT:    [[I11:%.*]] = load i32, i32* [[I114]], align 4, !tbaa [[TBAA12]]
-; IS__CGSCC____-NEXT:    [[ADD15:%.*]] = add nsw i32 [[I10]], [[I11]]
-; IS__CGSCC____-NEXT:    [[I316:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2
-; IS__CGSCC____-NEXT:    store i32 [[ADD15]], i32* [[I316]], align 4, !tbaa [[TBAA14]]
-; IS__CGSCC____-NEXT:    [[I12:%.*]] = bitcast %struct.S* [[S]] to i8*
-; IS__CGSCC____-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I12]]) #[[ATTR13]]
-; IS__CGSCC____-NEXT:    ret void
+; IS__CGSCC_OPM: Function Attrs: argmemonly nofree nosync nounwind willreturn
+; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@local_alloca_simplifiable_1
+; IS__CGSCC_OPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]]) #[[ATTR1:[0-9]+]] {
+; IS__CGSCC_OPM-NEXT:  entry:
+; IS__CGSCC_OPM-NEXT:    [[S:%.*]] = alloca [[STRUCT_S]], align 4
+; IS__CGSCC_OPM-NEXT:    [[I:%.*]] = bitcast %struct.S* [[S]] to i8*
+; IS__CGSCC_OPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I]]) #[[ATTR15:[0-9]+]]
+; IS__CGSCC_OPM-NEXT:    [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
+; IS__CGSCC_OPM-NEXT:    store float 0x3FF19999A0000000, float* [[F1]], align 4, !tbaa [[TBAA7:![0-9]+]]
+; IS__CGSCC_OPM-NEXT:    [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4
+; IS__CGSCC_OPM-NEXT:    store float 0x40019999A0000000, float* [[F2]], align 4, !tbaa [[TBAA10:![0-9]+]]
+; IS__CGSCC_OPM-NEXT:    [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5
+; IS__CGSCC_OPM-NEXT:    store float 0x400A666660000000, float* [[F3]], align 4, !tbaa [[TBAA11:![0-9]+]]
+; IS__CGSCC_OPM-NEXT:    [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
+; IS__CGSCC_OPM-NEXT:    call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(24) [[I1]], i32 noundef 1) #[[ATTR16:[0-9]+]]
+; IS__CGSCC_OPM-NEXT:    [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1
+; IS__CGSCC_OPM-NEXT:    call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(20) [[I2]], i32 noundef 2) #[[ATTR16]]
+; IS__CGSCC_OPM-NEXT:    [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
+; IS__CGSCC_OPM-NEXT:    call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(16) [[I3]], i32 noundef 3) #[[ATTR16]]
+; IS__CGSCC_OPM-NEXT:    [[F11:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
+; IS__CGSCC_OPM-NEXT:    [[I4:%.*]] = load float, float* [[F11]], align 4, !tbaa [[TBAA7]]
+; IS__CGSCC_OPM-NEXT:    [[F12:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3
+; IS__CGSCC_OPM-NEXT:    store float [[I4]], float* [[F12]], align 4, !tbaa [[TBAA7]]
+; IS__CGSCC_OPM-NEXT:    [[F23:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4
+; IS__CGSCC_OPM-NEXT:    [[I5:%.*]] = load float, float* [[F23]], align 4, !tbaa [[TBAA10]]
+; IS__CGSCC_OPM-NEXT:    [[MUL:%.*]] = fmul float [[I5]], 2.000000e+00
+; IS__CGSCC_OPM-NEXT:    [[F24:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4
+; IS__CGSCC_OPM-NEXT:    store float [[MUL]], float* [[F24]], align 4, !tbaa [[TBAA10]]
+; IS__CGSCC_OPM-NEXT:    [[F35:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5
+; IS__CGSCC_OPM-NEXT:    [[I6:%.*]] = load float, float* [[F35]], align 4, !tbaa [[TBAA11]]
+; IS__CGSCC_OPM-NEXT:    [[F16:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
+; IS__CGSCC_OPM-NEXT:    [[I7:%.*]] = load float, float* [[F16]], align 4, !tbaa [[TBAA7]]
+; IS__CGSCC_OPM-NEXT:    [[ADD:%.*]] = fadd float [[I6]], [[I7]]
+; IS__CGSCC_OPM-NEXT:    [[F37:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5
+; IS__CGSCC_OPM-NEXT:    store float [[ADD]], float* [[F37]], align 4, !tbaa [[TBAA11]]
+; IS__CGSCC_OPM-NEXT:    [[I18:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
+; IS__CGSCC_OPM-NEXT:    [[I8:%.*]] = load i32, i32* [[I18]], align 4, !tbaa [[TBAA12:![0-9]+]]
+; IS__CGSCC_OPM-NEXT:    [[I19:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0
+; IS__CGSCC_OPM-NEXT:    store i32 [[I8]], i32* [[I19]], align 4, !tbaa [[TBAA12]]
+; IS__CGSCC_OPM-NEXT:    [[I210:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1
+; IS__CGSCC_OPM-NEXT:    [[I9:%.*]] = load i32, i32* [[I210]], align 4, !tbaa [[TBAA13:![0-9]+]]
+; IS__CGSCC_OPM-NEXT:    [[MUL11:%.*]] = shl nsw i32 [[I9]], 1
+; IS__CGSCC_OPM-NEXT:    [[I212:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1
+; IS__CGSCC_OPM-NEXT:    store i32 [[MUL11]], i32* [[I212]], align 4, !tbaa [[TBAA13]]
+; IS__CGSCC_OPM-NEXT:    [[I313:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
+; IS__CGSCC_OPM-NEXT:    [[I10:%.*]] = load i32, i32* [[I313]], align 4, !tbaa [[TBAA14:![0-9]+]]
+; IS__CGSCC_OPM-NEXT:    [[I114:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
+; IS__CGSCC_OPM-NEXT:    [[I11:%.*]] = load i32, i32* [[I114]], align 4, !tbaa [[TBAA12]]
+; IS__CGSCC_OPM-NEXT:    [[ADD15:%.*]] = add nsw i32 [[I10]], [[I11]]
+; IS__CGSCC_OPM-NEXT:    [[I316:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2
+; IS__CGSCC_OPM-NEXT:    store i32 [[ADD15]], i32* [[I316]], align 4, !tbaa [[TBAA14]]
+; IS__CGSCC_OPM-NEXT:    [[I12:%.*]] = bitcast %struct.S* [[S]] to i8*
+; IS__CGSCC_OPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I12]]) #[[ATTR15]]
+; IS__CGSCC_OPM-NEXT:    ret void
+;
+; IS__CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn
+; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@local_alloca_simplifiable_1
+; IS__CGSCC_NPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]]) #[[ATTR1:[0-9]+]] {
+; IS__CGSCC_NPM-NEXT:  entry:
+; IS__CGSCC_NPM-NEXT:    [[S:%.*]] = alloca [[STRUCT_S]], align 4
+; IS__CGSCC_NPM-NEXT:    [[I:%.*]] = bitcast %struct.S* [[S]] to i8*
+; IS__CGSCC_NPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I]]) #[[ATTR14:[0-9]+]]
+; IS__CGSCC_NPM-NEXT:    [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
+; IS__CGSCC_NPM-NEXT:    store float 0x3FF19999A0000000, float* [[F1]], align 4, !tbaa [[TBAA7:![0-9]+]]
+; IS__CGSCC_NPM-NEXT:    [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4
+; IS__CGSCC_NPM-NEXT:    store float 0x40019999A0000000, float* [[F2]], align 4, !tbaa [[TBAA10:![0-9]+]]
+; IS__CGSCC_NPM-NEXT:    [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5
+; IS__CGSCC_NPM-NEXT:    store float 0x400A666660000000, float* [[F3]], align 4, !tbaa [[TBAA11:![0-9]+]]
+; IS__CGSCC_NPM-NEXT:    [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
+; IS__CGSCC_NPM-NEXT:    call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(24) [[I1]], i32 noundef 1) #[[ATTR15:[0-9]+]]
+; IS__CGSCC_NPM-NEXT:    [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1
+; IS__CGSCC_NPM-NEXT:    call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(20) [[I2]], i32 noundef 2) #[[ATTR15]]
+; IS__CGSCC_NPM-NEXT:    [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
+; IS__CGSCC_NPM-NEXT:    call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(16) [[I3]], i32 noundef 3) #[[ATTR15]]
+; IS__CGSCC_NPM-NEXT:    [[F11:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
+; IS__CGSCC_NPM-NEXT:    [[I4:%.*]] = load float, float* [[F11]], align 4, !tbaa [[TBAA7]]
+; IS__CGSCC_NPM-NEXT:    [[F12:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3
+; IS__CGSCC_NPM-NEXT:    store float [[I4]], float* [[F12]], align 4, !tbaa [[TBAA7]]
+; IS__CGSCC_NPM-NEXT:    [[F23:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4
+; IS__CGSCC_NPM-NEXT:    [[I5:%.*]] = load float, float* [[F23]], align 4, !tbaa [[TBAA10]]
+; IS__CGSCC_NPM-NEXT:    [[MUL:%.*]] = fmul float [[I5]], 2.000000e+00
+; IS__CGSCC_NPM-NEXT:    [[F24:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4
+; IS__CGSCC_NPM-NEXT:    store float [[MUL]], float* [[F24]], align 4, !tbaa [[TBAA10]]
+; IS__CGSCC_NPM-NEXT:    [[F35:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5
+; IS__CGSCC_NPM-NEXT:    [[I6:%.*]] = load float, float* [[F35]], align 4, !tbaa [[TBAA11]]
+; IS__CGSCC_NPM-NEXT:    [[F16:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
+; IS__CGSCC_NPM-NEXT:    [[I7:%.*]] = load float, float* [[F16]], align 4, !tbaa [[TBAA7]]
+; IS__CGSCC_NPM-NEXT:    [[ADD:%.*]] = fadd float [[I6]], [[I7]]
+; IS__CGSCC_NPM-NEXT:    [[F37:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5
+; IS__CGSCC_NPM-NEXT:    store float [[ADD]], float* [[F37]], align 4, !tbaa [[TBAA11]]
+; IS__CGSCC_NPM-NEXT:    [[I18:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
+; IS__CGSCC_NPM-NEXT:    [[I8:%.*]] = load i32, i32* [[I18]], align 4, !tbaa [[TBAA12:![0-9]+]]
+; IS__CGSCC_NPM-NEXT:    [[I19:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0
+; IS__CGSCC_NPM-NEXT:    store i32 [[I8]], i32* [[I19]], align 4, !tbaa [[TBAA12]]
+; IS__CGSCC_NPM-NEXT:    [[I210:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1
+; IS__CGSCC_NPM-NEXT:    [[I9:%.*]] = load i32, i32* [[I210]], align 4, !tbaa [[TBAA13:![0-9]+]]
+; IS__CGSCC_NPM-NEXT:    [[MUL11:%.*]] = shl nsw i32 [[I9]], 1
+; IS__CGSCC_NPM-NEXT:    [[I212:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1
+; IS__CGSCC_NPM-NEXT:    store i32 [[MUL11]], i32* [[I212]], align 4, !tbaa [[TBAA13]]
+; IS__CGSCC_NPM-NEXT:    [[I313:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
+; IS__CGSCC_NPM-NEXT:    [[I10:%.*]] = load i32, i32* [[I313]], align 4, !tbaa [[TBAA14:![0-9]+]]
+; IS__CGSCC_NPM-NEXT:    [[I114:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
+; IS__CGSCC_NPM-NEXT:    [[I11:%.*]] = load i32, i32* [[I114]], align 4, !tbaa [[TBAA12]]
+; IS__CGSCC_NPM-NEXT:    [[ADD15:%.*]] = add nsw i32 [[I10]], [[I11]]
+; IS__CGSCC_NPM-NEXT:    [[I316:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2
+; IS__CGSCC_NPM-NEXT:    store i32 [[ADD15]], i32* [[I316]], align 4, !tbaa [[TBAA14]]
+; IS__CGSCC_NPM-NEXT:    [[I12:%.*]] = bitcast %struct.S* [[S]] to i8*
+; IS__CGSCC_NPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 24, i8* nocapture nofree noundef nonnull align 4 dereferenceable(24) [[I12]]) #[[ATTR14]]
+; IS__CGSCC_NPM-NEXT:    ret void
 ;
 entry:
   %s = alloca %struct.S, align 4
@@ -312,10 +367,11 @@ define void @local_alloca_simplifiable_2() {
 ; IS__TUNIT_OPM:       for.body:
 ; IS__TUNIT_OPM-NEXT:    [[I15:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10
 ; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 [[I15]]
+; IS__TUNIT_OPM-NEXT:    store i8 0, i8* [[ARRAYIDX]], align 2, !tbaa [[TBAA15:![0-9]+]]
 ; IS__TUNIT_OPM-NEXT:    br label [[FOR_INC]]
 ; IS__TUNIT_OPM:       for.inc:
 ; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
-; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND]], !llvm.loop [[LOOP15:![0-9]+]]
+; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND]], !llvm.loop [[LOOP16:![0-9]+]]
 ; IS__TUNIT_OPM:       for.end:
 ; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND2:%.*]]
 ; IS__TUNIT_OPM:       for.cond2:
@@ -329,10 +385,11 @@ define void @local_alloca_simplifiable_2() {
 ; IS__TUNIT_OPM-NEXT:    [[I17:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10
 ; IS__TUNIT_OPM-NEXT:    [[I18:%.*]] = or i64 [[I17]], 1
 ; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* [[I16]], i64 [[I18]]
+; IS__TUNIT_OPM-NEXT:    store float 0.000000e+00, float* [[ARRAYIDX8]], align 4, !tbaa [[TBAA18:![0-9]+]]
 ; IS__TUNIT_OPM-NEXT:    br label [[FOR_INC9]]
 ; IS__TUNIT_OPM:       for.inc9:
 ; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1
-; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND2]], !llvm.loop [[LOOP17:![0-9]+]]
+; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND2]], !llvm.loop [[LOOP19:![0-9]+]]
 ; IS__TUNIT_OPM:       for.end11:
 ; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND13:%.*]]
 ; IS__TUNIT_OPM:       for.cond13:
@@ -346,12 +403,14 @@ define void @local_alloca_simplifiable_2() {
 ; IS__TUNIT_OPM-NEXT:    [[I20:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10
 ; IS__TUNIT_OPM-NEXT:    [[I21:%.*]] = add nuw nsw i64 [[I20]], 2
 ; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX21:%.*]] = getelementptr inbounds i64, i64* [[I19]], i64 [[I21]]
+; IS__TUNIT_OPM-NEXT:    store i64 0, i64* [[ARRAYIDX21]], align 16, !tbaa [[TBAA20:![0-9]+]]
 ; IS__TUNIT_OPM-NEXT:    br label [[FOR_INC22]]
 ; IS__TUNIT_OPM:       for.inc22:
 ; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1
-; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND13]], !llvm.loop [[LOOP18:![0-9]+]]
+; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND13]], !llvm.loop [[LOOP22:![0-9]+]]
 ; IS__TUNIT_OPM:       for.end24:
 ; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX25:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 1023
+; IS__TUNIT_OPM-NEXT:    store i8 0, i8* [[ARRAYIDX25]], align 1, !tbaa [[TBAA15]]
 ; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX26:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 500
 ; IS__TUNIT_OPM-NEXT:    [[I22:%.*]] = bitcast i8* [[ARRAYIDX26]] to i32*
 ; IS__TUNIT_OPM-NEXT:    call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 dereferenceable(524) [[I22]], i32 noundef 0) #[[ATTR15:[0-9]+]]
@@ -363,12 +422,14 @@ define void @local_alloca_simplifiable_2() {
 ; IS__TUNIT_OPM:       for.cond.cleanup30:
 ; IS__TUNIT_OPM-NEXT:    br label [[FOR_END38:%.*]]
 ; IS__TUNIT_OPM:       for.body31:
+; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX33:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 [[INDVARS_IV12]]
+; IS__TUNIT_OPM-NEXT:    [[I23:%.*]] = load i8, i8* [[ARRAYIDX33]], align 1, !tbaa [[TBAA15]]
 ; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX35:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]]
-; IS__TUNIT_OPM-NEXT:    store i8 0, i8* [[ARRAYIDX35]], align 1, !tbaa [[TBAA19:![0-9]+]]
+; IS__TUNIT_OPM-NEXT:    store i8 [[I23]], i8* [[ARRAYIDX35]], align 1, !tbaa [[TBAA15]]
 ; IS__TUNIT_OPM-NEXT:    br label [[FOR_INC36]]
 ; IS__TUNIT_OPM:       for.inc36:
 ; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1
-; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND28]], !llvm.loop [[LOOP20:![0-9]+]]
+; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND28]], !llvm.loop [[LOOP23:![0-9]+]]
 ; IS__TUNIT_OPM:       for.end38:
 ; IS__TUNIT_OPM-NEXT:    [[I24:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 0
 ; IS__TUNIT_OPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 1024, i8* nocapture nofree noundef nonnull align 16 dereferenceable(1024) [[I24]])
@@ -391,10 +452,11 @@ define void @local_alloca_simplifiable_2() {
 ; IS__TUNIT_NPM:       for.body:
 ; IS__TUNIT_NPM-NEXT:    [[I15:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10
 ; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 [[I15]]
+; IS__TUNIT_NPM-NEXT:    store i8 0, i8* [[ARRAYIDX]], align 2, !tbaa [[TBAA15:![0-9]+]]
 ; IS__TUNIT_NPM-NEXT:    br label [[FOR_INC]]
 ; IS__TUNIT_NPM:       for.inc:
 ; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
-; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND]], !llvm.loop [[LOOP15:![0-9]+]]
+; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND]], !llvm.loop [[LOOP16:![0-9]+]]
 ; IS__TUNIT_NPM:       for.end:
 ; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND2:%.*]]
 ; IS__TUNIT_NPM:       for.cond2:
@@ -408,10 +470,11 @@ define void @local_alloca_simplifiable_2() {
 ; IS__TUNIT_NPM-NEXT:    [[I17:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10
 ; IS__TUNIT_NPM-NEXT:    [[I18:%.*]] = or i64 [[I17]], 1
 ; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* [[I16]], i64 [[I18]]
+; IS__TUNIT_NPM-NEXT:    store float 0.000000e+00, float* [[ARRAYIDX8]], align 4, !tbaa [[TBAA18:![0-9]+]]
 ; IS__TUNIT_NPM-NEXT:    br label [[FOR_INC9]]
 ; IS__TUNIT_NPM:       for.inc9:
 ; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1
-; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND2]], !llvm.loop [[LOOP17:![0-9]+]]
+; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND2]], !llvm.loop [[LOOP19:![0-9]+]]
 ; IS__TUNIT_NPM:       for.end11:
 ; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND13:%.*]]
 ; IS__TUNIT_NPM:       for.cond13:
@@ -425,12 +488,14 @@ define void @local_alloca_simplifiable_2() {
 ; IS__TUNIT_NPM-NEXT:    [[I20:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10
 ; IS__TUNIT_NPM-NEXT:    [[I21:%.*]] = add nuw nsw i64 [[I20]], 2
 ; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX21:%.*]] = getelementptr inbounds i64, i64* [[I19]], i64 [[I21]]
+; IS__TUNIT_NPM-NEXT:    store i64 0, i64* [[ARRAYIDX21]], align 16, !tbaa [[TBAA20:![0-9]+]]
 ; IS__TUNIT_NPM-NEXT:    br label [[FOR_INC22]]
 ; IS__TUNIT_NPM:       for.inc22:
 ; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1
-; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND13]], !llvm.loop [[LOOP18:![0-9]+]]
+; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND13]], !llvm.loop [[LOOP22:![0-9]+]]
 ; IS__TUNIT_NPM:       for.end24:
 ; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX25:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 1023
+; IS__TUNIT_NPM-NEXT:    store i8 0, i8* [[ARRAYIDX25]], align 1, !tbaa [[TBAA15]]
 ; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX26:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 500
 ; IS__TUNIT_NPM-NEXT:    [[I22:%.*]] = bitcast i8* [[ARRAYIDX26]] to i32*
 ; IS__TUNIT_NPM-NEXT:    call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 dereferenceable(524) [[I22]], i32 noundef 0) #[[ATTR13]]
@@ -442,12 +507,14 @@ define void @local_alloca_simplifiable_2() {
 ; IS__TUNIT_NPM:       for.cond.cleanup30:
 ; IS__TUNIT_NPM-NEXT:    br label [[FOR_END38:%.*]]
 ; IS__TUNIT_NPM:       for.body31:
+; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX33:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 [[INDVARS_IV12]]
+; IS__TUNIT_NPM-NEXT:    [[I23:%.*]] = load i8, i8* [[ARRAYIDX33]], align 1, !tbaa [[TBAA15]]
 ; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX35:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]]
-; IS__TUNIT_NPM-NEXT:    store i8 0, i8* [[ARRAYIDX35]], align 1, !tbaa [[TBAA19:![0-9]+]]
+; IS__TUNIT_NPM-NEXT:    store i8 [[I23]], i8* [[ARRAYIDX35]], align 1, !tbaa [[TBAA15]]
 ; IS__TUNIT_NPM-NEXT:    br label [[FOR_INC36]]
 ; IS__TUNIT_NPM:       for.inc36:
 ; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1
-; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND28]], !llvm.loop [[LOOP20:![0-9]+]]
+; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND28]], !llvm.loop [[LOOP23:![0-9]+]]
 ; IS__TUNIT_NPM:       for.end38:
 ; IS__TUNIT_NPM-NEXT:    [[I24:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 0
 ; IS__TUNIT_NPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 1024, i8* nocapture nofree noundef nonnull align 16 dereferenceable(1024) [[I24]]) #[[ATTR12]]
@@ -514,7 +581,7 @@ define void @local_alloca_simplifiable_2() {
 ; IS__CGSCC_OPM-NEXT:    store i8 0, i8* [[ARRAYIDX25]], align 1, !tbaa [[TBAA15]]
 ; IS__CGSCC_OPM-NEXT:    [[ARRAYIDX26:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 500
 ; IS__CGSCC_OPM-NEXT:    [[I22:%.*]] = bitcast i8* [[ARRAYIDX26]] to i32*
-; IS__CGSCC_OPM-NEXT:    call void @write_arg(i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) [[I22]], i32 noundef 0) #[[ATTR15:[0-9]+]]
+; IS__CGSCC_OPM-NEXT:    call void @write_arg(i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) [[I22]], i32 noundef 0) #[[ATTR17:[0-9]+]]
 ; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND28:%.*]]
 ; IS__CGSCC_OPM:       for.cond28:
 ; IS__CGSCC_OPM-NEXT:    [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC36:%.*]] ], [ 0, [[FOR_END24]] ]
@@ -540,7 +607,7 @@ define void @local_alloca_simplifiable_2() {
 ; IS__CGSCC_NPM-NEXT:  entry:
 ; IS__CGSCC_NPM-NEXT:    [[BYTES:%.*]] = alloca [1024 x i8], align 16
 ; IS__CGSCC_NPM-NEXT:    [[I:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 0
-; IS__CGSCC_NPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 1024, i8* nocapture nofree noundef nonnull align 16 dereferenceable(1024) [[I]]) #[[ATTR13]]
+; IS__CGSCC_NPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 1024, i8* nocapture nofree noundef nonnull align 16 dereferenceable(1024) [[I]]) #[[ATTR14]]
 ; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND:%.*]]
 ; IS__CGSCC_NPM:       for.cond:
 ; IS__CGSCC_NPM-NEXT:    [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ]
@@ -597,7 +664,7 @@ define void @local_alloca_simplifiable_2() {
 ; IS__CGSCC_NPM-NEXT:    store i8 0, i8* [[ARRAYIDX25]], align 1, !tbaa [[TBAA15]]
 ; IS__CGSCC_NPM-NEXT:    [[ARRAYIDX26:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 500
 ; IS__CGSCC_NPM-NEXT:    [[I22:%.*]] = bitcast i8* [[ARRAYIDX26]] to i32*
-; IS__CGSCC_NPM-NEXT:    call void @write_arg(i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) [[I22]], i32 noundef 0) #[[ATTR15:[0-9]+]]
+; IS__CGSCC_NPM-NEXT:    call void @write_arg(i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) [[I22]], i32 noundef 0) #[[ATTR16:[0-9]+]]
 ; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND28:%.*]]
 ; IS__CGSCC_NPM:       for.cond28:
 ; IS__CGSCC_NPM-NEXT:    [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC36:%.*]] ], [ 0, [[FOR_END24]] ]
@@ -824,23 +891,41 @@ define i32 @multi_obj_simplifiable_1(i32 %cnd) {
 ; IS__TUNIT_NPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I2]]) #[[ATTR12]]
 ; IS__TUNIT_NPM-NEXT:    ret i32 5
 ;
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@multi_obj_simplifiable_1
-; IS__CGSCC____-SAME: (i32 [[CND:%.*]]) #[[ATTR4:[0-9]+]] {
-; IS__CGSCC____-NEXT:  entry:
-; IS__CGSCC____-NEXT:    [[L:%.*]] = alloca i32, align 4
-; IS__CGSCC____-NEXT:    [[I:%.*]] = bitcast i32* [[L]] to i8*
-; IS__CGSCC____-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR13]]
-; IS__CGSCC____-NEXT:    [[TOBOOL_NOT:%.*]] = icmp eq i32 [[CND]], 0
-; IS__CGSCC____-NEXT:    br i1 [[TOBOOL_NOT]], label [[COND_FALSE:%.*]], label [[COND_TRUE:%.*]]
-; IS__CGSCC____:       cond.true:
-; IS__CGSCC____-NEXT:    br label [[COND_END:%.*]]
-; IS__CGSCC____:       cond.false:
-; IS__CGSCC____-NEXT:    br label [[COND_END]]
-; IS__CGSCC____:       cond.end:
-; IS__CGSCC____-NEXT:    [[I2:%.*]] = bitcast i32* [[L]] to i8*
-; IS__CGSCC____-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I2]]) #[[ATTR13]]
-; IS__CGSCC____-NEXT:    ret i32 5
+; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn
+; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@multi_obj_simplifiable_1
+; IS__CGSCC_OPM-SAME: (i32 [[CND:%.*]]) #[[ATTR4:[0-9]+]] {
+; IS__CGSCC_OPM-NEXT:  entry:
+; IS__CGSCC_OPM-NEXT:    [[L:%.*]] = alloca i32, align 4
+; IS__CGSCC_OPM-NEXT:    [[I:%.*]] = bitcast i32* [[L]] to i8*
+; IS__CGSCC_OPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR15]]
+; IS__CGSCC_OPM-NEXT:    [[TOBOOL_NOT:%.*]] = icmp eq i32 [[CND]], 0
+; IS__CGSCC_OPM-NEXT:    br i1 [[TOBOOL_NOT]], label [[COND_FALSE:%.*]], label [[COND_TRUE:%.*]]
+; IS__CGSCC_OPM:       cond.true:
+; IS__CGSCC_OPM-NEXT:    br label [[COND_END:%.*]]
+; IS__CGSCC_OPM:       cond.false:
+; IS__CGSCC_OPM-NEXT:    br label [[COND_END]]
+; IS__CGSCC_OPM:       cond.end:
+; IS__CGSCC_OPM-NEXT:    [[I2:%.*]] = bitcast i32* [[L]] to i8*
+; IS__CGSCC_OPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I2]]) #[[ATTR15]]
+; IS__CGSCC_OPM-NEXT:    ret i32 5
+;
+; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn
+; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@multi_obj_simplifiable_1
+; IS__CGSCC_NPM-SAME: (i32 [[CND:%.*]]) #[[ATTR4:[0-9]+]] {
+; IS__CGSCC_NPM-NEXT:  entry:
+; IS__CGSCC_NPM-NEXT:    [[L:%.*]] = alloca i32, align 4
+; IS__CGSCC_NPM-NEXT:    [[I:%.*]] = bitcast i32* [[L]] to i8*
+; IS__CGSCC_NPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR14]]
+; IS__CGSCC_NPM-NEXT:    [[TOBOOL_NOT:%.*]] = icmp eq i32 [[CND]], 0
+; IS__CGSCC_NPM-NEXT:    br i1 [[TOBOOL_NOT]], label [[COND_FALSE:%.*]], label [[COND_TRUE:%.*]]
+; IS__CGSCC_NPM:       cond.true:
+; IS__CGSCC_NPM-NEXT:    br label [[COND_END:%.*]]
+; IS__CGSCC_NPM:       cond.false:
+; IS__CGSCC_NPM-NEXT:    br label [[COND_END]]
+; IS__CGSCC_NPM:       cond.end:
+; IS__CGSCC_NPM-NEXT:    [[I2:%.*]] = bitcast i32* [[L]] to i8*
+; IS__CGSCC_NPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I2]]) #[[ATTR14]]
+; IS__CGSCC_NPM-NEXT:    ret i32 5
 ;
 entry:
   %L = alloca i32, align 4
@@ -910,23 +995,41 @@ define i32 @multi_obj_simplifiable_2(i32 %cnd) {
 ; IS__TUNIT_NPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I1]]) #[[ATTR12]]
 ; IS__TUNIT_NPM-NEXT:    ret i32 5
 ;
-; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@multi_obj_simplifiable_2
-; IS__CGSCC____-SAME: (i32 [[CND:%.*]]) #[[ATTR4]] {
-; IS__CGSCC____-NEXT:  entry:
-; IS__CGSCC____-NEXT:    [[L:%.*]] = alloca i32, align 4
-; IS__CGSCC____-NEXT:    [[I:%.*]] = bitcast i32* [[L]] to i8*
-; IS__CGSCC____-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR13]]
-; IS__CGSCC____-NEXT:    [[TOBOOL_NOT:%.*]] = icmp eq i32 [[CND]], 0
-; IS__CGSCC____-NEXT:    br i1 [[TOBOOL_NOT]], label [[COND_FALSE:%.*]], label [[COND_TRUE:%.*]]
-; IS__CGSCC____:       cond.true:
-; IS__CGSCC____-NEXT:    br label [[COND_END:%.*]]
-; IS__CGSCC____:       cond.false:
-; IS__CGSCC____-NEXT:    br label [[COND_END]]
-; IS__CGSCC____:       cond.end:
-; IS__CGSCC____-NEXT:    [[I1:%.*]] = bitcast i32* [[L]] to i8*
-; IS__CGSCC____-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I1]]) #[[ATTR13]]
-; IS__CGSCC____-NEXT:    ret i32 5
+; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn
+; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@multi_obj_simplifiable_2
+; IS__CGSCC_OPM-SAME: (i32 [[CND:%.*]]) #[[ATTR4]] {
+; IS__CGSCC_OPM-NEXT:  entry:
+; IS__CGSCC_OPM-NEXT:    [[L:%.*]] = alloca i32, align 4
+; IS__CGSCC_OPM-NEXT:    [[I:%.*]] = bitcast i32* [[L]] to i8*
+; IS__CGSCC_OPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR15]]
+; IS__CGSCC_OPM-NEXT:    [[TOBOOL_NOT:%.*]] = icmp eq i32 [[CND]], 0
+; IS__CGSCC_OPM-NEXT:    br i1 [[TOBOOL_NOT]], label [[COND_FALSE:%.*]], label [[COND_TRUE:%.*]]
+; IS__CGSCC_OPM:       cond.true:
+; IS__CGSCC_OPM-NEXT:    br label [[COND_END:%.*]]
+; IS__CGSCC_OPM:       cond.false:
+; IS__CGSCC_OPM-NEXT:    br label [[COND_END]]
+; IS__CGSCC_OPM:       cond.end:
+; IS__CGSCC_OPM-NEXT:    [[I1:%.*]] = bitcast i32* [[L]] to i8*
+; IS__CGSCC_OPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I1]]) #[[ATTR15]]
+; IS__CGSCC_OPM-NEXT:    ret i32 5
+;
+; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn
+; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@multi_obj_simplifiable_2
+; IS__CGSCC_NPM-SAME: (i32 [[CND:%.*]]) #[[ATTR4]] {
+; IS__CGSCC_NPM-NEXT:  entry:
+; IS__CGSCC_NPM-NEXT:    [[L:%.*]] = alloca i32, align 4
+; IS__CGSCC_NPM-NEXT:    [[I:%.*]] = bitcast i32* [[L]] to i8*
+; IS__CGSCC_NPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR14]]
+; IS__CGSCC_NPM-NEXT:    [[TOBOOL_NOT:%.*]] = icmp eq i32 [[CND]], 0
+; IS__CGSCC_NPM-NEXT:    br i1 [[TOBOOL_NOT]], label [[COND_FALSE:%.*]], label [[COND_TRUE:%.*]]
+; IS__CGSCC_NPM:       cond.true:
+; IS__CGSCC_NPM-NEXT:    br label [[COND_END:%.*]]
+; IS__CGSCC_NPM:       cond.false:
+; IS__CGSCC_NPM-NEXT:    br label [[COND_END]]
+; IS__CGSCC_NPM:       cond.end:
+; IS__CGSCC_NPM-NEXT:    [[I1:%.*]] = bitcast i32* [[L]] to i8*
+; IS__CGSCC_NPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I1]]) #[[ATTR14]]
+; IS__CGSCC_NPM-NEXT:    ret i32 5
 ;
 entry:
   %L = alloca i32, align 4
@@ -1011,41 +1114,77 @@ define void @static_global_simplifiable_1(%struct.S* noalias sret(%struct.S) ali
 ; IS__TUNIT_NPM-NEXT:    store i32 4, i32* [[I3]], align 4, !tbaa [[TBAA14]]
 ; IS__TUNIT_NPM-NEXT:    ret void
 ;
-; IS__CGSCC____: Function Attrs: nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@static_global_simplifiable_1
-; IS__CGSCC____-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]]) #[[ATTR5:[0-9]+]] {
-; IS__CGSCC____-NEXT:  entry:
-; IS__CGSCC____-NEXT:    store float 0x3FF19999A0000000, float* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 3), align 4, !tbaa [[TBAA7]]
-; IS__CGSCC____-NEXT:    store float 0x40019999A0000000, float* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 4), align 4, !tbaa [[TBAA10]]
-; IS__CGSCC____-NEXT:    store float 0x400A666660000000, float* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 5), align 4, !tbaa [[TBAA11]]
-; IS__CGSCC____-NEXT:    call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(24) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i32 0, i32 0), i32 noundef 1) #[[ATTR14]]
-; IS__CGSCC____-NEXT:    call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(20) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 1), i32 noundef 2) #[[ATTR14]]
-; IS__CGSCC____-NEXT:    call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(16) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 2), i32 noundef 3) #[[ATTR14]]
-; IS__CGSCC____-NEXT:    [[I:%.*]] = load float, float* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 3), align 4, !tbaa [[TBAA7]]
-; IS__CGSCC____-NEXT:    [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3
-; IS__CGSCC____-NEXT:    store float [[I]], float* [[F1]], align 4, !tbaa [[TBAA7]]
-; IS__CGSCC____-NEXT:    [[I4:%.*]] = load float, float* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 4), align 4, !tbaa [[TBAA10]]
-; IS__CGSCC____-NEXT:    [[MUL:%.*]] = fmul float [[I4]], 2.000000e+00
-; IS__CGSCC____-NEXT:    [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4
-; IS__CGSCC____-NEXT:    store float [[MUL]], float* [[F2]], align 4, !tbaa [[TBAA10]]
-; IS__CGSCC____-NEXT:    [[I5:%.*]] = load float, float* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 5), align 4, !tbaa [[TBAA11]]
-; IS__CGSCC____-NEXT:    [[I6:%.*]] = load float, float* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 3), align 4, !tbaa [[TBAA7]]
-; IS__CGSCC____-NEXT:    [[ADD:%.*]] = fadd float [[I5]], [[I6]]
-; IS__CGSCC____-NEXT:    [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5
-; IS__CGSCC____-NEXT:    store float [[ADD]], float* [[F3]], align 4, !tbaa [[TBAA11]]
-; IS__CGSCC____-NEXT:    [[I7:%.*]] = load i32, i32* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i32 0, i32 0), align 4, !tbaa [[TBAA12]]
-; IS__CGSCC____-NEXT:    [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0
-; IS__CGSCC____-NEXT:    store i32 [[I7]], i32* [[I1]], align 4, !tbaa [[TBAA12]]
-; IS__CGSCC____-NEXT:    [[I8:%.*]] = load i32, i32* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 1), align 4, !tbaa [[TBAA13]]
-; IS__CGSCC____-NEXT:    [[MUL1:%.*]] = shl nsw i32 [[I8]], 1
-; IS__CGSCC____-NEXT:    [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1
-; IS__CGSCC____-NEXT:    store i32 [[MUL1]], i32* [[I2]], align 4, !tbaa [[TBAA13]]
-; IS__CGSCC____-NEXT:    [[I9:%.*]] = load i32, i32* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 2), align 4, !tbaa [[TBAA14]]
-; IS__CGSCC____-NEXT:    [[I10:%.*]] = load i32, i32* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i32 0, i32 0), align 4, !tbaa [[TBAA12]]
-; IS__CGSCC____-NEXT:    [[ADD2:%.*]] = add nsw i32 [[I9]], [[I10]]
-; IS__CGSCC____-NEXT:    [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2
-; IS__CGSCC____-NEXT:    store i32 [[ADD2]], i32* [[I3]], align 4, !tbaa [[TBAA14]]
-; IS__CGSCC____-NEXT:    ret void
+; IS__CGSCC_OPM: Function Attrs: nofree nosync nounwind willreturn
+; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@static_global_simplifiable_1
+; IS__CGSCC_OPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]]) #[[ATTR5:[0-9]+]] {
+; IS__CGSCC_OPM-NEXT:  entry:
+; IS__CGSCC_OPM-NEXT:    store float 0x3FF19999A0000000, float* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 3), align 4, !tbaa [[TBAA7]]
+; IS__CGSCC_OPM-NEXT:    store float 0x40019999A0000000, float* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 4), align 4, !tbaa [[TBAA10]]
+; IS__CGSCC_OPM-NEXT:    store float 0x400A666660000000, float* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 5), align 4, !tbaa [[TBAA11]]
+; IS__CGSCC_OPM-NEXT:    call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(24) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i32 0, i32 0), i32 noundef 1) #[[ATTR16]]
+; IS__CGSCC_OPM-NEXT:    call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(20) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 1), i32 noundef 2) #[[ATTR16]]
+; IS__CGSCC_OPM-NEXT:    call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(16) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 2), i32 noundef 3) #[[ATTR16]]
+; IS__CGSCC_OPM-NEXT:    [[I:%.*]] = load float, float* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 3), align 4, !tbaa [[TBAA7]]
+; IS__CGSCC_OPM-NEXT:    [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3
+; IS__CGSCC_OPM-NEXT:    store float [[I]], float* [[F1]], align 4, !tbaa [[TBAA7]]
+; IS__CGSCC_OPM-NEXT:    [[I4:%.*]] = load float, float* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 4), align 4, !tbaa [[TBAA10]]
+; IS__CGSCC_OPM-NEXT:    [[MUL:%.*]] = fmul float [[I4]], 2.000000e+00
+; IS__CGSCC_OPM-NEXT:    [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4
+; IS__CGSCC_OPM-NEXT:    store float [[MUL]], float* [[F2]], align 4, !tbaa [[TBAA10]]
+; IS__CGSCC_OPM-NEXT:    [[I5:%.*]] = load float, float* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 5), align 4, !tbaa [[TBAA11]]
+; IS__CGSCC_OPM-NEXT:    [[I6:%.*]] = load float, float* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 3), align 4, !tbaa [[TBAA7]]
+; IS__CGSCC_OPM-NEXT:    [[ADD:%.*]] = fadd float [[I5]], [[I6]]
+; IS__CGSCC_OPM-NEXT:    [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5
+; IS__CGSCC_OPM-NEXT:    store float [[ADD]], float* [[F3]], align 4, !tbaa [[TBAA11]]
+; IS__CGSCC_OPM-NEXT:    [[I7:%.*]] = load i32, i32* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 0), align 4, !tbaa [[TBAA12]]
+; IS__CGSCC_OPM-NEXT:    [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0
+; IS__CGSCC_OPM-NEXT:    store i32 [[I7]], i32* [[I1]], align 4, !tbaa [[TBAA12]]
+; IS__CGSCC_OPM-NEXT:    [[I8:%.*]] = load i32, i32* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 1), align 4, !tbaa [[TBAA13]]
+; IS__CGSCC_OPM-NEXT:    [[MUL1:%.*]] = shl nsw i32 [[I8]], 1
+; IS__CGSCC_OPM-NEXT:    [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1
+; IS__CGSCC_OPM-NEXT:    store i32 [[MUL1]], i32* [[I2]], align 4, !tbaa [[TBAA13]]
+; IS__CGSCC_OPM-NEXT:    [[I9:%.*]] = load i32, i32* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 2), align 4, !tbaa [[TBAA14]]
+; IS__CGSCC_OPM-NEXT:    [[I10:%.*]] = load i32, i32* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 0), align 4, !tbaa [[TBAA12]]
+; IS__CGSCC_OPM-NEXT:    [[ADD2:%.*]] = add nsw i32 [[I9]], [[I10]]
+; IS__CGSCC_OPM-NEXT:    [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2
+; IS__CGSCC_OPM-NEXT:    store i32 [[ADD2]], i32* [[I3]], align 4, !tbaa [[TBAA14]]
+; IS__CGSCC_OPM-NEXT:    ret void
+;
+; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind willreturn
+; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@static_global_simplifiable_1
+; IS__CGSCC_NPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]]) #[[ATTR5:[0-9]+]] {
+; IS__CGSCC_NPM-NEXT:  entry:
+; IS__CGSCC_NPM-NEXT:    store float 0x3FF19999A0000000, float* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 3), align 4, !tbaa [[TBAA7]]
+; IS__CGSCC_NPM-NEXT:    store float 0x40019999A0000000, float* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 4), align 4, !tbaa [[TBAA10]]
+; IS__CGSCC_NPM-NEXT:    store float 0x400A666660000000, float* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 5), align 4, !tbaa [[TBAA11]]
+; IS__CGSCC_NPM-NEXT:    call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(24) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i32 0, i32 0), i32 noundef 1) #[[ATTR15]]
+; IS__CGSCC_NPM-NEXT:    call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(20) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 1), i32 noundef 2) #[[ATTR15]]
+; IS__CGSCC_NPM-NEXT:    call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(16) getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 2), i32 noundef 3) #[[ATTR15]]
+; IS__CGSCC_NPM-NEXT:    [[I:%.*]] = load float, float* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 3), align 4, !tbaa [[TBAA7]]
+; IS__CGSCC_NPM-NEXT:    [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3
+; IS__CGSCC_NPM-NEXT:    store float [[I]], float* [[F1]], align 4, !tbaa [[TBAA7]]
+; IS__CGSCC_NPM-NEXT:    [[I4:%.*]] = load float, float* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 4), align 4, !tbaa [[TBAA10]]
+; IS__CGSCC_NPM-NEXT:    [[MUL:%.*]] = fmul float [[I4]], 2.000000e+00
+; IS__CGSCC_NPM-NEXT:    [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4
+; IS__CGSCC_NPM-NEXT:    store float [[MUL]], float* [[F2]], align 4, !tbaa [[TBAA10]]
+; IS__CGSCC_NPM-NEXT:    [[I5:%.*]] = load float, float* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 5), align 4, !tbaa [[TBAA11]]
+; IS__CGSCC_NPM-NEXT:    [[I6:%.*]] = load float, float* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 3), align 4, !tbaa [[TBAA7]]
+; IS__CGSCC_NPM-NEXT:    [[ADD:%.*]] = fadd float [[I5]], [[I6]]
+; IS__CGSCC_NPM-NEXT:    [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5
+; IS__CGSCC_NPM-NEXT:    store float [[ADD]], float* [[F3]], align 4, !tbaa [[TBAA11]]
+; IS__CGSCC_NPM-NEXT:    [[I7:%.*]] = load i32, i32* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 0), align 4, !tbaa [[TBAA12]]
+; IS__CGSCC_NPM-NEXT:    [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0
+; IS__CGSCC_NPM-NEXT:    store i32 [[I7]], i32* [[I1]], align 4, !tbaa [[TBAA12]]
+; IS__CGSCC_NPM-NEXT:    [[I8:%.*]] = load i32, i32* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 1), align 4, !tbaa [[TBAA13]]
+; IS__CGSCC_NPM-NEXT:    [[MUL1:%.*]] = shl nsw i32 [[I8]], 1
+; IS__CGSCC_NPM-NEXT:    [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1
+; IS__CGSCC_NPM-NEXT:    store i32 [[MUL1]], i32* [[I2]], align 4, !tbaa [[TBAA13]]
+; IS__CGSCC_NPM-NEXT:    [[I9:%.*]] = load i32, i32* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 2), align 4, !tbaa [[TBAA14]]
+; IS__CGSCC_NPM-NEXT:    [[I10:%.*]] = load i32, i32* getelementptr inbounds ([[STRUCT_S]], %struct.S* @Gs1, i64 0, i32 0), align 4, !tbaa [[TBAA12]]
+; IS__CGSCC_NPM-NEXT:    [[ADD2:%.*]] = add nsw i32 [[I9]], [[I10]]
+; IS__CGSCC_NPM-NEXT:    [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2
+; IS__CGSCC_NPM-NEXT:    store i32 [[ADD2]], i32* [[I3]], align 4, !tbaa [[TBAA14]]
+; IS__CGSCC_NPM-NEXT:    ret void
 ;
 entry:
   store float 0x3FF19999A0000000, float* getelementptr inbounds (%struct.S, %struct.S* @Gs1, i64 0, i32 3), align 4, !tbaa !7
@@ -1097,9 +1236,9 @@ entry:
 ;    }
 ;
 define void @static_global_simplifiable_2() {
-; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind writeonly
+; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind
 ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@static_global_simplifiable_2
-; IS__TUNIT_OPM-SAME: () #[[ATTR7:[0-9]+]] {
+; IS__TUNIT_OPM-SAME: () #[[ATTR3]] {
 ; IS__TUNIT_OPM-NEXT:  entry:
 ; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND:%.*]]
 ; IS__TUNIT_OPM:       for.cond:
@@ -1111,10 +1250,11 @@ define void @static_global_simplifiable_2() {
 ; IS__TUNIT_OPM:       for.body:
 ; IS__TUNIT_OPM-NEXT:    [[I:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10
 ; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 [[I]]
+; IS__TUNIT_OPM-NEXT:    store i8 0, i8* [[ARRAYIDX]], align 2, !tbaa [[TBAA15]]
 ; IS__TUNIT_OPM-NEXT:    br label [[FOR_INC]]
 ; IS__TUNIT_OPM:       for.inc:
 ; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
-; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND]], !llvm.loop [[LOOP21:![0-9]+]]
+; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND]], !llvm.loop [[LOOP24:![0-9]+]]
 ; IS__TUNIT_OPM:       for.end:
 ; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND2:%.*]]
 ; IS__TUNIT_OPM:       for.cond2:
@@ -1127,11 +1267,11 @@ define void @static_global_simplifiable_2() {
 ; IS__TUNIT_OPM-NEXT:    [[I15:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10
 ; IS__TUNIT_OPM-NEXT:    [[I16:%.*]] = or i64 [[I15]], 1
 ; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* bitcast ([1024 x i8]* @GBytes to float*), i64 [[I16]]
-; IS__TUNIT_OPM-NEXT:    store float 0.000000e+00, float* [[ARRAYIDX8]], align 4, !tbaa [[TBAA22:![0-9]+]]
+; IS__TUNIT_OPM-NEXT:    store float 0.000000e+00, float* [[ARRAYIDX8]], align 4, !tbaa [[TBAA18]]
 ; IS__TUNIT_OPM-NEXT:    br label [[FOR_INC9]]
 ; IS__TUNIT_OPM:       for.inc9:
 ; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1
-; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND2]], !llvm.loop [[LOOP23:![0-9]+]]
+; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND2]], !llvm.loop [[LOOP25:![0-9]+]]
 ; IS__TUNIT_OPM:       for.end11:
 ; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND13:%.*]]
 ; IS__TUNIT_OPM:       for.cond13:
@@ -1144,11 +1284,13 @@ define void @static_global_simplifiable_2() {
 ; IS__TUNIT_OPM-NEXT:    [[I17:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10
 ; IS__TUNIT_OPM-NEXT:    [[I18:%.*]] = add nuw nsw i64 [[I17]], 2
 ; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX20:%.*]] = getelementptr inbounds i64, i64* bitcast ([1024 x i8]* @GBytes to i64*), i64 [[I18]]
+; IS__TUNIT_OPM-NEXT:    store i64 0, i64* [[ARRAYIDX20]], align 16, !tbaa [[TBAA20]]
 ; IS__TUNIT_OPM-NEXT:    br label [[FOR_INC21]]
 ; IS__TUNIT_OPM:       for.inc21:
 ; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1
-; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND13]], !llvm.loop [[LOOP24:![0-9]+]]
+; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND13]], !llvm.loop [[LOOP26:![0-9]+]]
 ; IS__TUNIT_OPM:       for.end23:
+; IS__TUNIT_OPM-NEXT:    store i8 0, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 1023), align 1, !tbaa [[TBAA15]]
 ; IS__TUNIT_OPM-NEXT:    call void @write_arg(i32* nocapture nofree writeonly align 4 dereferenceable_or_null(524) bitcast (i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 500) to i32*), i32 noundef 0) #[[ATTR15]]
 ; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND25:%.*]]
 ; IS__TUNIT_OPM:       for.cond25:
@@ -1158,18 +1300,20 @@ define void @static_global_simplifiable_2() {
 ; IS__TUNIT_OPM:       for.cond.cleanup27:
 ; IS__TUNIT_OPM-NEXT:    br label [[FOR_END35:%.*]]
 ; IS__TUNIT_OPM:       for.body28:
+; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX30:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 [[INDVARS_IV12]]
+; IS__TUNIT_OPM-NEXT:    [[I19:%.*]] = load i8, i8* [[ARRAYIDX30]], align 1, !tbaa [[TBAA15]]
 ; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX32:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]]
-; IS__TUNIT_OPM-NEXT:    store i8 0, i8* [[ARRAYIDX32]], align 1, !tbaa [[TBAA19]]
+; IS__TUNIT_OPM-NEXT:    store i8 [[I19]], i8* [[ARRAYIDX32]], align 1, !tbaa [[TBAA15]]
 ; IS__TUNIT_OPM-NEXT:    br label [[FOR_INC33]]
 ; IS__TUNIT_OPM:       for.inc33:
 ; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1
-; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND25]], !llvm.loop [[LOOP25:![0-9]+]]
+; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND25]], !llvm.loop [[LOOP27:![0-9]+]]
 ; IS__TUNIT_OPM:       for.end35:
 ; IS__TUNIT_OPM-NEXT:    ret void
 ;
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn writeonly
+; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn
 ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@static_global_simplifiable_2
-; IS__TUNIT_NPM-SAME: () #[[ATTR5]] {
+; IS__TUNIT_NPM-SAME: () #[[ATTR3]] {
 ; IS__TUNIT_NPM-NEXT:  entry:
 ; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND:%.*]]
 ; IS__TUNIT_NPM:       for.cond:
@@ -1181,10 +1325,11 @@ define void @static_global_simplifiable_2() {
 ; IS__TUNIT_NPM:       for.body:
 ; IS__TUNIT_NPM-NEXT:    [[I:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10
 ; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 [[I]]
+; IS__TUNIT_NPM-NEXT:    store i8 0, i8* [[ARRAYIDX]], align 2, !tbaa [[TBAA15]]
 ; IS__TUNIT_NPM-NEXT:    br label [[FOR_INC]]
 ; IS__TUNIT_NPM:       for.inc:
 ; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
-; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND]], !llvm.loop [[LOOP21:![0-9]+]]
+; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND]], !llvm.loop [[LOOP24:![0-9]+]]
 ; IS__TUNIT_NPM:       for.end:
 ; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND2:%.*]]
 ; IS__TUNIT_NPM:       for.cond2:
@@ -1197,11 +1342,11 @@ define void @static_global_simplifiable_2() {
 ; IS__TUNIT_NPM-NEXT:    [[I15:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10
 ; IS__TUNIT_NPM-NEXT:    [[I16:%.*]] = or i64 [[I15]], 1
 ; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* bitcast ([1024 x i8]* @GBytes to float*), i64 [[I16]]
-; IS__TUNIT_NPM-NEXT:    store float 0.000000e+00, float* [[ARRAYIDX8]], align 4, !tbaa [[TBAA22:![0-9]+]]
+; IS__TUNIT_NPM-NEXT:    store float 0.000000e+00, float* [[ARRAYIDX8]], align 4, !tbaa [[TBAA18]]
 ; IS__TUNIT_NPM-NEXT:    br label [[FOR_INC9]]
 ; IS__TUNIT_NPM:       for.inc9:
 ; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1
-; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND2]], !llvm.loop [[LOOP23:![0-9]+]]
+; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND2]], !llvm.loop [[LOOP25:![0-9]+]]
 ; IS__TUNIT_NPM:       for.end11:
 ; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND13:%.*]]
 ; IS__TUNIT_NPM:       for.cond13:
@@ -1214,11 +1359,13 @@ define void @static_global_simplifiable_2() {
 ; IS__TUNIT_NPM-NEXT:    [[I17:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10
 ; IS__TUNIT_NPM-NEXT:    [[I18:%.*]] = add nuw nsw i64 [[I17]], 2
 ; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX20:%.*]] = getelementptr inbounds i64, i64* bitcast ([1024 x i8]* @GBytes to i64*), i64 [[I18]]
+; IS__TUNIT_NPM-NEXT:    store i64 0, i64* [[ARRAYIDX20]], align 16, !tbaa [[TBAA20]]
 ; IS__TUNIT_NPM-NEXT:    br label [[FOR_INC21]]
 ; IS__TUNIT_NPM:       for.inc21:
 ; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1
-; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND13]], !llvm.loop [[LOOP24:![0-9]+]]
+; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND13]], !llvm.loop [[LOOP26:![0-9]+]]
 ; IS__TUNIT_NPM:       for.end23:
+; IS__TUNIT_NPM-NEXT:    store i8 0, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 1023), align 1, !tbaa [[TBAA15]]
 ; IS__TUNIT_NPM-NEXT:    call void @write_arg(i32* nocapture nofree writeonly align 4 dereferenceable_or_null(524) bitcast (i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 500) to i32*), i32 noundef 0) #[[ATTR13]]
 ; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND25:%.*]]
 ; IS__TUNIT_NPM:       for.cond25:
@@ -1228,87 +1375,162 @@ define void @static_global_simplifiable_2() {
 ; IS__TUNIT_NPM:       for.cond.cleanup27:
 ; IS__TUNIT_NPM-NEXT:    br label [[FOR_END35:%.*]]
 ; IS__TUNIT_NPM:       for.body28:
+; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX30:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 [[INDVARS_IV12]]
+; IS__TUNIT_NPM-NEXT:    [[I19:%.*]] = load i8, i8* [[ARRAYIDX30]], align 1, !tbaa [[TBAA15]]
 ; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX32:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]]
-; IS__TUNIT_NPM-NEXT:    store i8 0, i8* [[ARRAYIDX32]], align 1, !tbaa [[TBAA19]]
+; IS__TUNIT_NPM-NEXT:    store i8 [[I19]], i8* [[ARRAYIDX32]], align 1, !tbaa [[TBAA15]]
 ; IS__TUNIT_NPM-NEXT:    br label [[FOR_INC33]]
 ; IS__TUNIT_NPM:       for.inc33:
 ; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1
-; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND25]], !llvm.loop [[LOOP25:![0-9]+]]
+; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND25]], !llvm.loop [[LOOP27:![0-9]+]]
 ; IS__TUNIT_NPM:       for.end35:
 ; IS__TUNIT_NPM-NEXT:    ret void
 ;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@static_global_simplifiable_2() {
-; IS__CGSCC____-NEXT:  entry:
-; IS__CGSCC____-NEXT:    br label [[FOR_COND:%.*]]
-; IS__CGSCC____:       for.cond:
-; IS__CGSCC____-NEXT:    [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ]
-; IS__CGSCC____-NEXT:    [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], 100
-; IS__CGSCC____-NEXT:    br i1 [[EXITCOND]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]]
-; IS__CGSCC____:       for.cond.cleanup:
-; IS__CGSCC____-NEXT:    br label [[FOR_END:%.*]]
-; IS__CGSCC____:       for.body:
-; IS__CGSCC____-NEXT:    [[I:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10
-; IS__CGSCC____-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 [[I]]
-; IS__CGSCC____-NEXT:    store i8 0, i8* [[ARRAYIDX]], align 16, !tbaa [[TBAA15:![0-9]+]]
-; IS__CGSCC____-NEXT:    br label [[FOR_INC]]
-; IS__CGSCC____:       for.inc:
-; IS__CGSCC____-NEXT:    [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
-; IS__CGSCC____-NEXT:    br label [[FOR_COND]], !llvm.loop [[LOOP24:![0-9]+]]
-; IS__CGSCC____:       for.end:
-; IS__CGSCC____-NEXT:    br label [[FOR_COND2:%.*]]
-; IS__CGSCC____:       for.cond2:
-; IS__CGSCC____-NEXT:    [[INDVARS_IV2:%.*]] = phi i64 [ [[INDVARS_IV_NEXT3:%.*]], [[FOR_INC9:%.*]] ], [ 0, [[FOR_END]] ]
-; IS__CGSCC____-NEXT:    [[EXITCOND6:%.*]] = icmp ne i64 [[INDVARS_IV2]], 10
-; IS__CGSCC____-NEXT:    br i1 [[EXITCOND6]], label [[FOR_BODY5:%.*]], label [[FOR_COND_CLEANUP4:%.*]]
-; IS__CGSCC____:       for.cond.cleanup4:
-; IS__CGSCC____-NEXT:    br label [[FOR_END11:%.*]]
-; IS__CGSCC____:       for.body5:
-; IS__CGSCC____-NEXT:    [[I15:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10
-; IS__CGSCC____-NEXT:    [[I16:%.*]] = or i64 [[I15]], 1
-; IS__CGSCC____-NEXT:    [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* bitcast ([1024 x i8]* @GBytes to float*), i64 [[I16]]
-; IS__CGSCC____-NEXT:    store float 0.000000e+00, float* [[ARRAYIDX8]], align 4, !tbaa [[TBAA18:![0-9]+]]
-; IS__CGSCC____-NEXT:    br label [[FOR_INC9]]
-; IS__CGSCC____:       for.inc9:
-; IS__CGSCC____-NEXT:    [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1
-; IS__CGSCC____-NEXT:    br label [[FOR_COND2]], !llvm.loop [[LOOP25:![0-9]+]]
-; IS__CGSCC____:       for.end11:
-; IS__CGSCC____-NEXT:    br label [[FOR_COND13:%.*]]
-; IS__CGSCC____:       for.cond13:
-; IS__CGSCC____-NEXT:    [[INDVARS_IV7:%.*]] = phi i64 [ [[INDVARS_IV_NEXT8:%.*]], [[FOR_INC21:%.*]] ], [ 0, [[FOR_END11]] ]
-; IS__CGSCC____-NEXT:    [[EXITCOND11:%.*]] = icmp ne i64 [[INDVARS_IV7]], 20
-; IS__CGSCC____-NEXT:    br i1 [[EXITCOND11]], label [[FOR_BODY16:%.*]], label [[FOR_COND_CLEANUP15:%.*]]
-; IS__CGSCC____:       for.cond.cleanup15:
-; IS__CGSCC____-NEXT:    br label [[FOR_END23:%.*]]
-; IS__CGSCC____:       for.body16:
-; IS__CGSCC____-NEXT:    [[I17:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10
-; IS__CGSCC____-NEXT:    [[I18:%.*]] = add nuw nsw i64 [[I17]], 2
-; IS__CGSCC____-NEXT:    [[ARRAYIDX20:%.*]] = getelementptr inbounds i64, i64* bitcast ([1024 x i8]* @GBytes to i64*), i64 [[I18]]
-; IS__CGSCC____-NEXT:    store i64 0, i64* [[ARRAYIDX20]], align 16, !tbaa [[TBAA20:![0-9]+]]
-; IS__CGSCC____-NEXT:    br label [[FOR_INC21]]
-; IS__CGSCC____:       for.inc21:
-; IS__CGSCC____-NEXT:    [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1
-; IS__CGSCC____-NEXT:    br label [[FOR_COND13]], !llvm.loop [[LOOP26:![0-9]+]]
-; IS__CGSCC____:       for.end23:
-; IS__CGSCC____-NEXT:    store i8 0, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 1023), align 1, !tbaa [[TBAA15]]
-; IS__CGSCC____-NEXT:    call void @write_arg(i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) bitcast (i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 500) to i32*), i32 noundef 0) #[[ATTR15:[0-9]+]]
-; IS__CGSCC____-NEXT:    br label [[FOR_COND25:%.*]]
-; IS__CGSCC____:       for.cond25:
-; IS__CGSCC____-NEXT:    [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC33:%.*]] ], [ 0, [[FOR_END23]] ]
-; IS__CGSCC____-NEXT:    [[EXITCOND14:%.*]] = icmp ne i64 [[INDVARS_IV12]], 1024
-; IS__CGSCC____-NEXT:    br i1 [[EXITCOND14]], label [[FOR_BODY28:%.*]], label [[FOR_COND_CLEANUP27:%.*]]
-; IS__CGSCC____:       for.cond.cleanup27:
-; IS__CGSCC____-NEXT:    br label [[FOR_END35:%.*]]
-; IS__CGSCC____:       for.body28:
-; IS__CGSCC____-NEXT:    [[ARRAYIDX30:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 [[INDVARS_IV12]]
-; IS__CGSCC____-NEXT:    [[I19:%.*]] = load i8, i8* [[ARRAYIDX30]], align 1, !tbaa [[TBAA15]]
-; IS__CGSCC____-NEXT:    [[ARRAYIDX32:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]]
-; IS__CGSCC____-NEXT:    store i8 [[I19]], i8* [[ARRAYIDX32]], align 1, !tbaa [[TBAA15]]
-; IS__CGSCC____-NEXT:    br label [[FOR_INC33]]
-; IS__CGSCC____:       for.inc33:
-; IS__CGSCC____-NEXT:    [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1
-; IS__CGSCC____-NEXT:    br label [[FOR_COND25]], !llvm.loop [[LOOP27:![0-9]+]]
-; IS__CGSCC____:       for.end35:
-; IS__CGSCC____-NEXT:    ret void
+; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@static_global_simplifiable_2() {
+; IS__CGSCC_OPM-NEXT:  entry:
+; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND:%.*]]
+; IS__CGSCC_OPM:       for.cond:
+; IS__CGSCC_OPM-NEXT:    [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ]
+; IS__CGSCC_OPM-NEXT:    [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], 100
+; IS__CGSCC_OPM-NEXT:    br i1 [[EXITCOND]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]]
+; IS__CGSCC_OPM:       for.cond.cleanup:
+; IS__CGSCC_OPM-NEXT:    br label [[FOR_END:%.*]]
+; IS__CGSCC_OPM:       for.body:
+; IS__CGSCC_OPM-NEXT:    [[I:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10
+; IS__CGSCC_OPM-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 [[I]]
+; IS__CGSCC_OPM-NEXT:    store i8 0, i8* [[ARRAYIDX]], align 2, !tbaa [[TBAA15]]
+; IS__CGSCC_OPM-NEXT:    br label [[FOR_INC]]
+; IS__CGSCC_OPM:       for.inc:
+; IS__CGSCC_OPM-NEXT:    [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
+; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND]], !llvm.loop [[LOOP24:![0-9]+]]
+; IS__CGSCC_OPM:       for.end:
+; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND2:%.*]]
+; IS__CGSCC_OPM:       for.cond2:
+; IS__CGSCC_OPM-NEXT:    [[INDVARS_IV2:%.*]] = phi i64 [ [[INDVARS_IV_NEXT3:%.*]], [[FOR_INC9:%.*]] ], [ 0, [[FOR_END]] ]
+; IS__CGSCC_OPM-NEXT:    [[EXITCOND6:%.*]] = icmp ne i64 [[INDVARS_IV2]], 10
+; IS__CGSCC_OPM-NEXT:    br i1 [[EXITCOND6]], label [[FOR_BODY5:%.*]], label [[FOR_COND_CLEANUP4:%.*]]
+; IS__CGSCC_OPM:       for.cond.cleanup4:
+; IS__CGSCC_OPM-NEXT:    br label [[FOR_END11:%.*]]
+; IS__CGSCC_OPM:       for.body5:
+; IS__CGSCC_OPM-NEXT:    [[I15:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10
+; IS__CGSCC_OPM-NEXT:    [[I16:%.*]] = or i64 [[I15]], 1
+; IS__CGSCC_OPM-NEXT:    [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* bitcast ([1024 x i8]* @GBytes to float*), i64 [[I16]]
+; IS__CGSCC_OPM-NEXT:    store float 0.000000e+00, float* [[ARRAYIDX8]], align 4, !tbaa [[TBAA18]]
+; IS__CGSCC_OPM-NEXT:    br label [[FOR_INC9]]
+; IS__CGSCC_OPM:       for.inc9:
+; IS__CGSCC_OPM-NEXT:    [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1
+; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND2]], !llvm.loop [[LOOP25:![0-9]+]]
+; IS__CGSCC_OPM:       for.end11:
+; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND13:%.*]]
+; IS__CGSCC_OPM:       for.cond13:
+; IS__CGSCC_OPM-NEXT:    [[INDVARS_IV7:%.*]] = phi i64 [ [[INDVARS_IV_NEXT8:%.*]], [[FOR_INC21:%.*]] ], [ 0, [[FOR_END11]] ]
+; IS__CGSCC_OPM-NEXT:    [[EXITCOND11:%.*]] = icmp ne i64 [[INDVARS_IV7]], 20
+; IS__CGSCC_OPM-NEXT:    br i1 [[EXITCOND11]], label [[FOR_BODY16:%.*]], label [[FOR_COND_CLEANUP15:%.*]]
+; IS__CGSCC_OPM:       for.cond.cleanup15:
+; IS__CGSCC_OPM-NEXT:    br label [[FOR_END23:%.*]]
+; IS__CGSCC_OPM:       for.body16:
+; IS__CGSCC_OPM-NEXT:    [[I17:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10
+; IS__CGSCC_OPM-NEXT:    [[I18:%.*]] = add nuw nsw i64 [[I17]], 2
+; IS__CGSCC_OPM-NEXT:    [[ARRAYIDX20:%.*]] = getelementptr inbounds i64, i64* bitcast ([1024 x i8]* @GBytes to i64*), i64 [[I18]]
+; IS__CGSCC_OPM-NEXT:    store i64 0, i64* [[ARRAYIDX20]], align 16, !tbaa [[TBAA20]]
+; IS__CGSCC_OPM-NEXT:    br label [[FOR_INC21]]
+; IS__CGSCC_OPM:       for.inc21:
+; IS__CGSCC_OPM-NEXT:    [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1
+; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND13]], !llvm.loop [[LOOP26:![0-9]+]]
+; IS__CGSCC_OPM:       for.end23:
+; IS__CGSCC_OPM-NEXT:    store i8 0, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 1023), align 1, !tbaa [[TBAA15]]
+; IS__CGSCC_OPM-NEXT:    call void @write_arg(i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) bitcast (i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 500) to i32*), i32 noundef 0) #[[ATTR17]]
+; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND25:%.*]]
+; IS__CGSCC_OPM:       for.cond25:
+; IS__CGSCC_OPM-NEXT:    [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC33:%.*]] ], [ 0, [[FOR_END23]] ]
+; IS__CGSCC_OPM-NEXT:    [[EXITCOND14:%.*]] = icmp ne i64 [[INDVARS_IV12]], 1024
+; IS__CGSCC_OPM-NEXT:    br i1 [[EXITCOND14]], label [[FOR_BODY28:%.*]], label [[FOR_COND_CLEANUP27:%.*]]
+; IS__CGSCC_OPM:       for.cond.cleanup27:
+; IS__CGSCC_OPM-NEXT:    br label [[FOR_END35:%.*]]
+; IS__CGSCC_OPM:       for.body28:
+; IS__CGSCC_OPM-NEXT:    [[ARRAYIDX30:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 [[INDVARS_IV12]]
+; IS__CGSCC_OPM-NEXT:    [[I19:%.*]] = load i8, i8* [[ARRAYIDX30]], align 1, !tbaa [[TBAA15]]
+; IS__CGSCC_OPM-NEXT:    [[ARRAYIDX32:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]]
+; IS__CGSCC_OPM-NEXT:    store i8 [[I19]], i8* [[ARRAYIDX32]], align 1, !tbaa [[TBAA15]]
+; IS__CGSCC_OPM-NEXT:    br label [[FOR_INC33]]
+; IS__CGSCC_OPM:       for.inc33:
+; IS__CGSCC_OPM-NEXT:    [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1
+; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND25]], !llvm.loop [[LOOP27:![0-9]+]]
+; IS__CGSCC_OPM:       for.end35:
+; IS__CGSCC_OPM-NEXT:    ret void
+;
+; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@static_global_simplifiable_2() {
+; IS__CGSCC_NPM-NEXT:  entry:
+; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND:%.*]]
+; IS__CGSCC_NPM:       for.cond:
+; IS__CGSCC_NPM-NEXT:    [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ]
+; IS__CGSCC_NPM-NEXT:    [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], 100
+; IS__CGSCC_NPM-NEXT:    br i1 [[EXITCOND]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]]
+; IS__CGSCC_NPM:       for.cond.cleanup:
+; IS__CGSCC_NPM-NEXT:    br label [[FOR_END:%.*]]
+; IS__CGSCC_NPM:       for.body:
+; IS__CGSCC_NPM-NEXT:    [[I:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10
+; IS__CGSCC_NPM-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 [[I]]
+; IS__CGSCC_NPM-NEXT:    store i8 0, i8* [[ARRAYIDX]], align 2, !tbaa [[TBAA15]]
+; IS__CGSCC_NPM-NEXT:    br label [[FOR_INC]]
+; IS__CGSCC_NPM:       for.inc:
+; IS__CGSCC_NPM-NEXT:    [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
+; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND]], !llvm.loop [[LOOP24:![0-9]+]]
+; IS__CGSCC_NPM:       for.end:
+; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND2:%.*]]
+; IS__CGSCC_NPM:       for.cond2:
+; IS__CGSCC_NPM-NEXT:    [[INDVARS_IV2:%.*]] = phi i64 [ [[INDVARS_IV_NEXT3:%.*]], [[FOR_INC9:%.*]] ], [ 0, [[FOR_END]] ]
+; IS__CGSCC_NPM-NEXT:    [[EXITCOND6:%.*]] = icmp ne i64 [[INDVARS_IV2]], 10
+; IS__CGSCC_NPM-NEXT:    br i1 [[EXITCOND6]], label [[FOR_BODY5:%.*]], label [[FOR_COND_CLEANUP4:%.*]]
+; IS__CGSCC_NPM:       for.cond.cleanup4:
+; IS__CGSCC_NPM-NEXT:    br label [[FOR_END11:%.*]]
+; IS__CGSCC_NPM:       for.body5:
+; IS__CGSCC_NPM-NEXT:    [[I15:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10
+; IS__CGSCC_NPM-NEXT:    [[I16:%.*]] = or i64 [[I15]], 1
+; IS__CGSCC_NPM-NEXT:    [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* bitcast ([1024 x i8]* @GBytes to float*), i64 [[I16]]
+; IS__CGSCC_NPM-NEXT:    store float 0.000000e+00, float* [[ARRAYIDX8]], align 4, !tbaa [[TBAA18]]
+; IS__CGSCC_NPM-NEXT:    br label [[FOR_INC9]]
+; IS__CGSCC_NPM:       for.inc9:
+; IS__CGSCC_NPM-NEXT:    [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1
+; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND2]], !llvm.loop [[LOOP25:![0-9]+]]
+; IS__CGSCC_NPM:       for.end11:
+; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND13:%.*]]
+; IS__CGSCC_NPM:       for.cond13:
+; IS__CGSCC_NPM-NEXT:    [[INDVARS_IV7:%.*]] = phi i64 [ [[INDVARS_IV_NEXT8:%.*]], [[FOR_INC21:%.*]] ], [ 0, [[FOR_END11]] ]
+; IS__CGSCC_NPM-NEXT:    [[EXITCOND11:%.*]] = icmp ne i64 [[INDVARS_IV7]], 20
+; IS__CGSCC_NPM-NEXT:    br i1 [[EXITCOND11]], label [[FOR_BODY16:%.*]], label [[FOR_COND_CLEANUP15:%.*]]
+; IS__CGSCC_NPM:       for.cond.cleanup15:
+; IS__CGSCC_NPM-NEXT:    br label [[FOR_END23:%.*]]
+; IS__CGSCC_NPM:       for.body16:
+; IS__CGSCC_NPM-NEXT:    [[I17:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10
+; IS__CGSCC_NPM-NEXT:    [[I18:%.*]] = add nuw nsw i64 [[I17]], 2
+; IS__CGSCC_NPM-NEXT:    [[ARRAYIDX20:%.*]] = getelementptr inbounds i64, i64* bitcast ([1024 x i8]* @GBytes to i64*), i64 [[I18]]
+; IS__CGSCC_NPM-NEXT:    store i64 0, i64* [[ARRAYIDX20]], align 16, !tbaa [[TBAA20]]
+; IS__CGSCC_NPM-NEXT:    br label [[FOR_INC21]]
+; IS__CGSCC_NPM:       for.inc21:
+; IS__CGSCC_NPM-NEXT:    [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1
+; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND13]], !llvm.loop [[LOOP26:![0-9]+]]
+; IS__CGSCC_NPM:       for.end23:
+; IS__CGSCC_NPM-NEXT:    store i8 0, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 1023), align 1, !tbaa [[TBAA15]]
+; IS__CGSCC_NPM-NEXT:    call void @write_arg(i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) bitcast (i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 500) to i32*), i32 noundef 0) #[[ATTR16]]
+; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND25:%.*]]
+; IS__CGSCC_NPM:       for.cond25:
+; IS__CGSCC_NPM-NEXT:    [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC33:%.*]] ], [ 0, [[FOR_END23]] ]
+; IS__CGSCC_NPM-NEXT:    [[EXITCOND14:%.*]] = icmp ne i64 [[INDVARS_IV12]], 1024
+; IS__CGSCC_NPM-NEXT:    br i1 [[EXITCOND14]], label [[FOR_BODY28:%.*]], label [[FOR_COND_CLEANUP27:%.*]]
+; IS__CGSCC_NPM:       for.cond.cleanup27:
+; IS__CGSCC_NPM-NEXT:    br label [[FOR_END35:%.*]]
+; IS__CGSCC_NPM:       for.body28:
+; IS__CGSCC_NPM-NEXT:    [[ARRAYIDX30:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @GBytes, i64 0, i64 [[INDVARS_IV12]]
+; IS__CGSCC_NPM-NEXT:    [[I19:%.*]] = load i8, i8* [[ARRAYIDX30]], align 1, !tbaa [[TBAA15]]
+; IS__CGSCC_NPM-NEXT:    [[ARRAYIDX32:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]]
+; IS__CGSCC_NPM-NEXT:    store i8 [[I19]], i8* [[ARRAYIDX32]], align 1, !tbaa [[TBAA15]]
+; IS__CGSCC_NPM-NEXT:    br label [[FOR_INC33]]
+; IS__CGSCC_NPM:       for.inc33:
+; IS__CGSCC_NPM-NEXT:    [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1
+; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND25]], !llvm.loop [[LOOP27:![0-9]+]]
+; IS__CGSCC_NPM:       for.end35:
+; IS__CGSCC_NPM-NEXT:    ret void
 ;
 entry:
   br label %for.cond
@@ -1425,7 +1647,7 @@ define i32 @static_global_simplifiable_3() {
 ;
 ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@static_global_simplifiable_3
-; IS__CGSCC____-SAME: () #[[ATTR4]] {
+; IS__CGSCC____-SAME: () #[[ATTR4:[0-9]+]] {
 ; IS__CGSCC____-NEXT:    store i32 1, i32* @Flag3, align 4, !tbaa [[TBAA3]]
 ; IS__CGSCC____-NEXT:    [[I:%.*]] = load i32, i32* @Flag3, align 4, !tbaa [[TBAA3]]
 ; IS__CGSCC____-NEXT:    ret i32 [[I]]
@@ -1553,55 +1775,105 @@ define void @noalias_arg_simplifiable_1(%struct.S* noalias sret(%struct.S) align
 ; IS__TUNIT_NPM-NEXT:    store i32 [[ADD15]], i32* [[I316]], align 4, !tbaa [[TBAA14]]
 ; IS__TUNIT_NPM-NEXT:    ret void
 ;
-; IS__CGSCC____: Function Attrs: argmemonly nofree nosync nounwind willreturn
-; IS__CGSCC____-LABEL: define {{[^@]+}}@noalias_arg_simplifiable_1
-; IS__CGSCC____-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]], %struct.S* noalias nocapture nofree nonnull byval([[STRUCT_S]]) align 8 dereferenceable(24) [[S:%.*]]) #[[ATTR1]] {
-; IS__CGSCC____-NEXT:  entry:
-; IS__CGSCC____-NEXT:    [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
-; IS__CGSCC____-NEXT:    store float 0x3FF19999A0000000, float* [[F1]], align 4, !tbaa [[TBAA7]]
-; IS__CGSCC____-NEXT:    [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4
-; IS__CGSCC____-NEXT:    store float 0x40019999A0000000, float* [[F2]], align 8, !tbaa [[TBAA10]]
-; IS__CGSCC____-NEXT:    [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5
-; IS__CGSCC____-NEXT:    store float 0x400A666660000000, float* [[F3]], align 4, !tbaa [[TBAA11]]
-; IS__CGSCC____-NEXT:    [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
-; IS__CGSCC____-NEXT:    call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 8 dereferenceable(24) [[I1]], i32 noundef 1) #[[ATTR14]]
-; IS__CGSCC____-NEXT:    [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1
-; IS__CGSCC____-NEXT:    call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(20) [[I2]], i32 noundef 2) #[[ATTR14]]
-; IS__CGSCC____-NEXT:    [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
-; IS__CGSCC____-NEXT:    call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 8 dereferenceable(16) [[I3]], i32 noundef 3) #[[ATTR14]]
-; IS__CGSCC____-NEXT:    [[F11:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
-; IS__CGSCC____-NEXT:    [[I:%.*]] = load float, float* [[F11]], align 4, !tbaa [[TBAA7]]
-; IS__CGSCC____-NEXT:    [[F12:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3
-; IS__CGSCC____-NEXT:    store float [[I]], float* [[F12]], align 4, !tbaa [[TBAA7]]
-; IS__CGSCC____-NEXT:    [[F23:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4
-; IS__CGSCC____-NEXT:    [[I4:%.*]] = load float, float* [[F23]], align 8, !tbaa [[TBAA10]]
-; IS__CGSCC____-NEXT:    [[MUL:%.*]] = fmul float [[I4]], 2.000000e+00
-; IS__CGSCC____-NEXT:    [[F24:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4
-; IS__CGSCC____-NEXT:    store float [[MUL]], float* [[F24]], align 4, !tbaa [[TBAA10]]
-; IS__CGSCC____-NEXT:    [[F35:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5
-; IS__CGSCC____-NEXT:    [[I5:%.*]] = load float, float* [[F35]], align 4, !tbaa [[TBAA11]]
-; IS__CGSCC____-NEXT:    [[F16:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
-; IS__CGSCC____-NEXT:    [[I6:%.*]] = load float, float* [[F16]], align 4, !tbaa [[TBAA7]]
-; IS__CGSCC____-NEXT:    [[ADD:%.*]] = fadd float [[I5]], [[I6]]
-; IS__CGSCC____-NEXT:    [[F37:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5
-; IS__CGSCC____-NEXT:    store float [[ADD]], float* [[F37]], align 4, !tbaa [[TBAA11]]
-; IS__CGSCC____-NEXT:    [[I18:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
-; IS__CGSCC____-NEXT:    [[I7:%.*]] = load i32, i32* [[I18]], align 8, !tbaa [[TBAA12]]
-; IS__CGSCC____-NEXT:    [[I19:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0
-; IS__CGSCC____-NEXT:    store i32 [[I7]], i32* [[I19]], align 4, !tbaa [[TBAA12]]
-; IS__CGSCC____-NEXT:    [[I210:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1
-; IS__CGSCC____-NEXT:    [[I8:%.*]] = load i32, i32* [[I210]], align 4, !tbaa [[TBAA13]]
-; IS__CGSCC____-NEXT:    [[MUL11:%.*]] = shl nsw i32 [[I8]], 1
-; IS__CGSCC____-NEXT:    [[I212:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1
-; IS__CGSCC____-NEXT:    store i32 [[MUL11]], i32* [[I212]], align 4, !tbaa [[TBAA13]]
-; IS__CGSCC____-NEXT:    [[I313:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
-; IS__CGSCC____-NEXT:    [[I9:%.*]] = load i32, i32* [[I313]], align 8, !tbaa [[TBAA14]]
-; IS__CGSCC____-NEXT:    [[I114:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
-; IS__CGSCC____-NEXT:    [[I10:%.*]] = load i32, i32* [[I114]], align 8, !tbaa [[TBAA12]]
-; IS__CGSCC____-NEXT:    [[ADD15:%.*]] = add nsw i32 [[I9]], [[I10]]
-; IS__CGSCC____-NEXT:    [[I316:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2
-; IS__CGSCC____-NEXT:    store i32 [[ADD15]], i32* [[I316]], align 4, !tbaa [[TBAA14]]
-; IS__CGSCC____-NEXT:    ret void
+; IS__CGSCC_OPM: Function Attrs: argmemonly nofree nosync nounwind willreturn
+; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@noalias_arg_simplifiable_1
+; IS__CGSCC_OPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]], %struct.S* noalias nocapture nofree nonnull byval([[STRUCT_S]]) align 8 dereferenceable(24) [[S:%.*]]) #[[ATTR1]] {
+; IS__CGSCC_OPM-NEXT:  entry:
+; IS__CGSCC_OPM-NEXT:    [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
+; IS__CGSCC_OPM-NEXT:    store float 0x3FF19999A0000000, float* [[F1]], align 4, !tbaa [[TBAA7]]
+; IS__CGSCC_OPM-NEXT:    [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4
+; IS__CGSCC_OPM-NEXT:    store float 0x40019999A0000000, float* [[F2]], align 8, !tbaa [[TBAA10]]
+; IS__CGSCC_OPM-NEXT:    [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5
+; IS__CGSCC_OPM-NEXT:    store float 0x400A666660000000, float* [[F3]], align 4, !tbaa [[TBAA11]]
+; IS__CGSCC_OPM-NEXT:    [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
+; IS__CGSCC_OPM-NEXT:    call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 8 dereferenceable(24) [[I1]], i32 noundef 1) #[[ATTR16]]
+; IS__CGSCC_OPM-NEXT:    [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1
+; IS__CGSCC_OPM-NEXT:    call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(20) [[I2]], i32 noundef 2) #[[ATTR16]]
+; IS__CGSCC_OPM-NEXT:    [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
+; IS__CGSCC_OPM-NEXT:    call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 8 dereferenceable(16) [[I3]], i32 noundef 3) #[[ATTR16]]
+; IS__CGSCC_OPM-NEXT:    [[F11:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
+; IS__CGSCC_OPM-NEXT:    [[I:%.*]] = load float, float* [[F11]], align 4, !tbaa [[TBAA7]]
+; IS__CGSCC_OPM-NEXT:    [[F12:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3
+; IS__CGSCC_OPM-NEXT:    store float [[I]], float* [[F12]], align 4, !tbaa [[TBAA7]]
+; IS__CGSCC_OPM-NEXT:    [[F23:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4
+; IS__CGSCC_OPM-NEXT:    [[I4:%.*]] = load float, float* [[F23]], align 8, !tbaa [[TBAA10]]
+; IS__CGSCC_OPM-NEXT:    [[MUL:%.*]] = fmul float [[I4]], 2.000000e+00
+; IS__CGSCC_OPM-NEXT:    [[F24:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4
+; IS__CGSCC_OPM-NEXT:    store float [[MUL]], float* [[F24]], align 4, !tbaa [[TBAA10]]
+; IS__CGSCC_OPM-NEXT:    [[F35:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5
+; IS__CGSCC_OPM-NEXT:    [[I5:%.*]] = load float, float* [[F35]], align 4, !tbaa [[TBAA11]]
+; IS__CGSCC_OPM-NEXT:    [[F16:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
+; IS__CGSCC_OPM-NEXT:    [[I6:%.*]] = load float, float* [[F16]], align 4, !tbaa [[TBAA7]]
+; IS__CGSCC_OPM-NEXT:    [[ADD:%.*]] = fadd float [[I5]], [[I6]]
+; IS__CGSCC_OPM-NEXT:    [[F37:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5
+; IS__CGSCC_OPM-NEXT:    store float [[ADD]], float* [[F37]], align 4, !tbaa [[TBAA11]]
+; IS__CGSCC_OPM-NEXT:    [[I18:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
+; IS__CGSCC_OPM-NEXT:    [[I7:%.*]] = load i32, i32* [[I18]], align 8, !tbaa [[TBAA12]]
+; IS__CGSCC_OPM-NEXT:    [[I19:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0
+; IS__CGSCC_OPM-NEXT:    store i32 [[I7]], i32* [[I19]], align 4, !tbaa [[TBAA12]]
+; IS__CGSCC_OPM-NEXT:    [[I210:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1
+; IS__CGSCC_OPM-NEXT:    [[I8:%.*]] = load i32, i32* [[I210]], align 4, !tbaa [[TBAA13]]
+; IS__CGSCC_OPM-NEXT:    [[MUL11:%.*]] = shl nsw i32 [[I8]], 1
+; IS__CGSCC_OPM-NEXT:    [[I212:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1
+; IS__CGSCC_OPM-NEXT:    store i32 [[MUL11]], i32* [[I212]], align 4, !tbaa [[TBAA13]]
+; IS__CGSCC_OPM-NEXT:    [[I313:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
+; IS__CGSCC_OPM-NEXT:    [[I9:%.*]] = load i32, i32* [[I313]], align 8, !tbaa [[TBAA14]]
+; IS__CGSCC_OPM-NEXT:    [[I114:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
+; IS__CGSCC_OPM-NEXT:    [[I10:%.*]] = load i32, i32* [[I114]], align 8, !tbaa [[TBAA12]]
+; IS__CGSCC_OPM-NEXT:    [[ADD15:%.*]] = add nsw i32 [[I9]], [[I10]]
+; IS__CGSCC_OPM-NEXT:    [[I316:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2
+; IS__CGSCC_OPM-NEXT:    store i32 [[ADD15]], i32* [[I316]], align 4, !tbaa [[TBAA14]]
+; IS__CGSCC_OPM-NEXT:    ret void
+;
+; IS__CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn
+; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@noalias_arg_simplifiable_1
+; IS__CGSCC_NPM-SAME: (%struct.S* noalias nocapture nofree nonnull writeonly sret([[STRUCT_S:%.*]]) align 4 dereferenceable(24) [[AGG_RESULT:%.*]], %struct.S* noalias nocapture nofree nonnull byval([[STRUCT_S]]) align 8 dereferenceable(24) [[S:%.*]]) #[[ATTR1]] {
+; IS__CGSCC_NPM-NEXT:  entry:
+; IS__CGSCC_NPM-NEXT:    [[F1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
+; IS__CGSCC_NPM-NEXT:    store float 0x3FF19999A0000000, float* [[F1]], align 4, !tbaa [[TBAA7]]
+; IS__CGSCC_NPM-NEXT:    [[F2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4
+; IS__CGSCC_NPM-NEXT:    store float 0x40019999A0000000, float* [[F2]], align 8, !tbaa [[TBAA10]]
+; IS__CGSCC_NPM-NEXT:    [[F3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5
+; IS__CGSCC_NPM-NEXT:    store float 0x400A666660000000, float* [[F3]], align 4, !tbaa [[TBAA11]]
+; IS__CGSCC_NPM-NEXT:    [[I1:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
+; IS__CGSCC_NPM-NEXT:    call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 8 dereferenceable(24) [[I1]], i32 noundef 1) #[[ATTR15]]
+; IS__CGSCC_NPM-NEXT:    [[I2:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1
+; IS__CGSCC_NPM-NEXT:    call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(20) [[I2]], i32 noundef 2) #[[ATTR15]]
+; IS__CGSCC_NPM-NEXT:    [[I3:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
+; IS__CGSCC_NPM-NEXT:    call void @write_arg(i32* nocapture nofree noundef nonnull writeonly align 8 dereferenceable(16) [[I3]], i32 noundef 3) #[[ATTR15]]
+; IS__CGSCC_NPM-NEXT:    [[F11:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
+; IS__CGSCC_NPM-NEXT:    [[I:%.*]] = load float, float* [[F11]], align 4, !tbaa [[TBAA7]]
+; IS__CGSCC_NPM-NEXT:    [[F12:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 3
+; IS__CGSCC_NPM-NEXT:    store float [[I]], float* [[F12]], align 4, !tbaa [[TBAA7]]
+; IS__CGSCC_NPM-NEXT:    [[F23:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 4
+; IS__CGSCC_NPM-NEXT:    [[I4:%.*]] = load float, float* [[F23]], align 8, !tbaa [[TBAA10]]
+; IS__CGSCC_NPM-NEXT:    [[MUL:%.*]] = fmul float [[I4]], 2.000000e+00
+; IS__CGSCC_NPM-NEXT:    [[F24:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 4
+; IS__CGSCC_NPM-NEXT:    store float [[MUL]], float* [[F24]], align 4, !tbaa [[TBAA10]]
+; IS__CGSCC_NPM-NEXT:    [[F35:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 5
+; IS__CGSCC_NPM-NEXT:    [[I5:%.*]] = load float, float* [[F35]], align 4, !tbaa [[TBAA11]]
+; IS__CGSCC_NPM-NEXT:    [[F16:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 3
+; IS__CGSCC_NPM-NEXT:    [[I6:%.*]] = load float, float* [[F16]], align 4, !tbaa [[TBAA7]]
+; IS__CGSCC_NPM-NEXT:    [[ADD:%.*]] = fadd float [[I5]], [[I6]]
+; IS__CGSCC_NPM-NEXT:    [[F37:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 5
+; IS__CGSCC_NPM-NEXT:    store float [[ADD]], float* [[F37]], align 4, !tbaa [[TBAA11]]
+; IS__CGSCC_NPM-NEXT:    [[I18:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
+; IS__CGSCC_NPM-NEXT:    [[I7:%.*]] = load i32, i32* [[I18]], align 8, !tbaa [[TBAA12]]
+; IS__CGSCC_NPM-NEXT:    [[I19:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 0
+; IS__CGSCC_NPM-NEXT:    store i32 [[I7]], i32* [[I19]], align 4, !tbaa [[TBAA12]]
+; IS__CGSCC_NPM-NEXT:    [[I210:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 1
+; IS__CGSCC_NPM-NEXT:    [[I8:%.*]] = load i32, i32* [[I210]], align 4, !tbaa [[TBAA13]]
+; IS__CGSCC_NPM-NEXT:    [[MUL11:%.*]] = shl nsw i32 [[I8]], 1
+; IS__CGSCC_NPM-NEXT:    [[I212:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 1
+; IS__CGSCC_NPM-NEXT:    store i32 [[MUL11]], i32* [[I212]], align 4, !tbaa [[TBAA13]]
+; IS__CGSCC_NPM-NEXT:    [[I313:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 2
+; IS__CGSCC_NPM-NEXT:    [[I9:%.*]] = load i32, i32* [[I313]], align 8, !tbaa [[TBAA14]]
+; IS__CGSCC_NPM-NEXT:    [[I114:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[S]], i64 0, i32 0
+; IS__CGSCC_NPM-NEXT:    [[I10:%.*]] = load i32, i32* [[I114]], align 8, !tbaa [[TBAA12]]
+; IS__CGSCC_NPM-NEXT:    [[ADD15:%.*]] = add nsw i32 [[I9]], [[I10]]
+; IS__CGSCC_NPM-NEXT:    [[I316:%.*]] = getelementptr inbounds [[STRUCT_S]], %struct.S* [[AGG_RESULT]], i64 0, i32 2
+; IS__CGSCC_NPM-NEXT:    store i32 [[ADD15]], i32* [[I316]], align 4, !tbaa [[TBAA14]]
+; IS__CGSCC_NPM-NEXT:    ret void
 ;
 entry:
   %f1 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 3
@@ -1680,11 +1952,11 @@ define void @noalias_arg_simplifiable_2(i8* %Bytes) {
 ; IS__TUNIT_OPM:       for.body:
 ; IS__TUNIT_OPM-NEXT:    [[I:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10
 ; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 [[I]]
-; IS__TUNIT_OPM-NEXT:    store i8 0, i8* [[ARRAYIDX]], align 1, !tbaa [[TBAA19]]
+; IS__TUNIT_OPM-NEXT:    store i8 0, i8* [[ARRAYIDX]], align 1, !tbaa [[TBAA15]]
 ; IS__TUNIT_OPM-NEXT:    br label [[FOR_INC]]
 ; IS__TUNIT_OPM:       for.inc:
 ; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
-; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND]], !llvm.loop [[LOOP26:![0-9]+]]
+; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND]], !llvm.loop [[LOOP28:![0-9]+]]
 ; IS__TUNIT_OPM:       for.end:
 ; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND2:%.*]]
 ; IS__TUNIT_OPM:       for.cond2:
@@ -1698,11 +1970,11 @@ define void @noalias_arg_simplifiable_2(i8* %Bytes) {
 ; IS__TUNIT_OPM-NEXT:    [[I16:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10
 ; IS__TUNIT_OPM-NEXT:    [[I17:%.*]] = or i64 [[I16]], 1
 ; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* [[I15]], i64 [[I17]]
-; IS__TUNIT_OPM-NEXT:    store float 0.000000e+00, float* [[ARRAYIDX8]], align 4, !tbaa [[TBAA22]]
+; IS__TUNIT_OPM-NEXT:    store float 0.000000e+00, float* [[ARRAYIDX8]], align 4, !tbaa [[TBAA18]]
 ; IS__TUNIT_OPM-NEXT:    br label [[FOR_INC9]]
 ; IS__TUNIT_OPM:       for.inc9:
 ; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1
-; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND2]], !llvm.loop [[LOOP27:![0-9]+]]
+; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND2]], !llvm.loop [[LOOP29:![0-9]+]]
 ; IS__TUNIT_OPM:       for.end11:
 ; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND13:%.*]]
 ; IS__TUNIT_OPM:       for.cond13:
@@ -1716,14 +1988,14 @@ define void @noalias_arg_simplifiable_2(i8* %Bytes) {
 ; IS__TUNIT_OPM-NEXT:    [[I19:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10
 ; IS__TUNIT_OPM-NEXT:    [[I20:%.*]] = add nuw nsw i64 [[I19]], 2
 ; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX20:%.*]] = getelementptr inbounds i64, i64* [[I18]], i64 [[I20]]
-; IS__TUNIT_OPM-NEXT:    store i64 0, i64* [[ARRAYIDX20]], align 8, !tbaa [[TBAA28:![0-9]+]]
+; IS__TUNIT_OPM-NEXT:    store i64 0, i64* [[ARRAYIDX20]], align 8, !tbaa [[TBAA20]]
 ; IS__TUNIT_OPM-NEXT:    br label [[FOR_INC21]]
 ; IS__TUNIT_OPM:       for.inc21:
 ; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1
 ; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND13]], !llvm.loop [[LOOP30:![0-9]+]]
 ; IS__TUNIT_OPM:       for.end23:
 ; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX24:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 1023
-; IS__TUNIT_OPM-NEXT:    store i8 0, i8* [[ARRAYIDX24]], align 1, !tbaa [[TBAA19]]
+; IS__TUNIT_OPM-NEXT:    store i8 0, i8* [[ARRAYIDX24]], align 1, !tbaa [[TBAA15]]
 ; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX25:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 500
 ; IS__TUNIT_OPM-NEXT:    [[I21:%.*]] = bitcast i8* [[ARRAYIDX25]] to i32*
 ; IS__TUNIT_OPM-NEXT:    call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 [[I21]], i32 noundef 0) #[[ATTR15]]
@@ -1736,9 +2008,9 @@ define void @noalias_arg_simplifiable_2(i8* %Bytes) {
 ; IS__TUNIT_OPM-NEXT:    br label [[FOR_END37:%.*]]
 ; IS__TUNIT_OPM:       for.body30:
 ; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX32:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 [[INDVARS_IV12]]
-; IS__TUNIT_OPM-NEXT:    [[I22:%.*]] = load i8, i8* [[ARRAYIDX32]], align 1, !tbaa [[TBAA19]]
+; IS__TUNIT_OPM-NEXT:    [[I22:%.*]] = load i8, i8* [[ARRAYIDX32]], align 1, !tbaa [[TBAA15]]
 ; IS__TUNIT_OPM-NEXT:    [[ARRAYIDX34:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]]
-; IS__TUNIT_OPM-NEXT:    store i8 [[I22]], i8* [[ARRAYIDX34]], align 1, !tbaa [[TBAA19]]
+; IS__TUNIT_OPM-NEXT:    store i8 [[I22]], i8* [[ARRAYIDX34]], align 1, !tbaa [[TBAA15]]
 ; IS__TUNIT_OPM-NEXT:    br label [[FOR_INC35]]
 ; IS__TUNIT_OPM:       for.inc35:
 ; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1
@@ -1760,11 +2032,11 @@ define void @noalias_arg_simplifiable_2(i8* %Bytes) {
 ; IS__TUNIT_NPM:       for.body:
 ; IS__TUNIT_NPM-NEXT:    [[I:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10
 ; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 [[I]]
-; IS__TUNIT_NPM-NEXT:    store i8 0, i8* [[ARRAYIDX]], align 1, !tbaa [[TBAA19]]
+; IS__TUNIT_NPM-NEXT:    store i8 0, i8* [[ARRAYIDX]], align 1, !tbaa [[TBAA15]]
 ; IS__TUNIT_NPM-NEXT:    br label [[FOR_INC]]
 ; IS__TUNIT_NPM:       for.inc:
 ; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
-; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND]], !llvm.loop [[LOOP26:![0-9]+]]
+; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND]], !llvm.loop [[LOOP28:![0-9]+]]
 ; IS__TUNIT_NPM:       for.end:
 ; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND2:%.*]]
 ; IS__TUNIT_NPM:       for.cond2:
@@ -1778,11 +2050,11 @@ define void @noalias_arg_simplifiable_2(i8* %Bytes) {
 ; IS__TUNIT_NPM-NEXT:    [[I16:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10
 ; IS__TUNIT_NPM-NEXT:    [[I17:%.*]] = or i64 [[I16]], 1
 ; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* [[I15]], i64 [[I17]]
-; IS__TUNIT_NPM-NEXT:    store float 0.000000e+00, float* [[ARRAYIDX8]], align 4, !tbaa [[TBAA22]]
+; IS__TUNIT_NPM-NEXT:    store float 0.000000e+00, float* [[ARRAYIDX8]], align 4, !tbaa [[TBAA18]]
 ; IS__TUNIT_NPM-NEXT:    br label [[FOR_INC9]]
 ; IS__TUNIT_NPM:       for.inc9:
 ; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1
-; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND2]], !llvm.loop [[LOOP27:![0-9]+]]
+; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND2]], !llvm.loop [[LOOP29:![0-9]+]]
 ; IS__TUNIT_NPM:       for.end11:
 ; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND13:%.*]]
 ; IS__TUNIT_NPM:       for.cond13:
@@ -1796,14 +2068,14 @@ define void @noalias_arg_simplifiable_2(i8* %Bytes) {
 ; IS__TUNIT_NPM-NEXT:    [[I19:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10
 ; IS__TUNIT_NPM-NEXT:    [[I20:%.*]] = add nuw nsw i64 [[I19]], 2
 ; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX20:%.*]] = getelementptr inbounds i64, i64* [[I18]], i64 [[I20]]
-; IS__TUNIT_NPM-NEXT:    store i64 0, i64* [[ARRAYIDX20]], align 8, !tbaa [[TBAA28:![0-9]+]]
+; IS__TUNIT_NPM-NEXT:    store i64 0, i64* [[ARRAYIDX20]], align 8, !tbaa [[TBAA20]]
 ; IS__TUNIT_NPM-NEXT:    br label [[FOR_INC21]]
 ; IS__TUNIT_NPM:       for.inc21:
 ; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1
 ; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND13]], !llvm.loop [[LOOP30:![0-9]+]]
 ; IS__TUNIT_NPM:       for.end23:
 ; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX24:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 1023
-; IS__TUNIT_NPM-NEXT:    store i8 0, i8* [[ARRAYIDX24]], align 1, !tbaa [[TBAA19]]
+; IS__TUNIT_NPM-NEXT:    store i8 0, i8* [[ARRAYIDX24]], align 1, !tbaa [[TBAA15]]
 ; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX25:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 500
 ; IS__TUNIT_NPM-NEXT:    [[I21:%.*]] = bitcast i8* [[ARRAYIDX25]] to i32*
 ; IS__TUNIT_NPM-NEXT:    call void @write_arg(i32* nocapture nofree nonnull writeonly align 4 [[I21]], i32 noundef 0) #[[ATTR13]]
@@ -1816,9 +2088,9 @@ define void @noalias_arg_simplifiable_2(i8* %Bytes) {
 ; IS__TUNIT_NPM-NEXT:    br label [[FOR_END37:%.*]]
 ; IS__TUNIT_NPM:       for.body30:
 ; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX32:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 [[INDVARS_IV12]]
-; IS__TUNIT_NPM-NEXT:    [[I22:%.*]] = load i8, i8* [[ARRAYIDX32]], align 1, !tbaa [[TBAA19]]
+; IS__TUNIT_NPM-NEXT:    [[I22:%.*]] = load i8, i8* [[ARRAYIDX32]], align 1, !tbaa [[TBAA15]]
 ; IS__TUNIT_NPM-NEXT:    [[ARRAYIDX34:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]]
-; IS__TUNIT_NPM-NEXT:    store i8 [[I22]], i8* [[ARRAYIDX34]], align 1, !tbaa [[TBAA19]]
+; IS__TUNIT_NPM-NEXT:    store i8 [[I22]], i8* [[ARRAYIDX34]], align 1, !tbaa [[TBAA15]]
 ; IS__TUNIT_NPM-NEXT:    br label [[FOR_INC35]]
 ; IS__TUNIT_NPM:       for.inc35:
 ; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1
@@ -1826,84 +2098,163 @@ define void @noalias_arg_simplifiable_2(i8* %Bytes) {
 ; IS__TUNIT_NPM:       for.end37:
 ; IS__TUNIT_NPM-NEXT:    ret void
 ;
-; IS__CGSCC____-LABEL: define {{[^@]+}}@noalias_arg_simplifiable_2
-; IS__CGSCC____-SAME: (i8* [[BYTES:%.*]]) {
-; IS__CGSCC____-NEXT:  entry:
-; IS__CGSCC____-NEXT:    br label [[FOR_COND:%.*]]
-; IS__CGSCC____:       for.cond:
-; IS__CGSCC____-NEXT:    [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ]
-; IS__CGSCC____-NEXT:    [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], 100
-; IS__CGSCC____-NEXT:    br i1 [[EXITCOND]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]]
-; IS__CGSCC____:       for.cond.cleanup:
-; IS__CGSCC____-NEXT:    br label [[FOR_END:%.*]]
-; IS__CGSCC____:       for.body:
-; IS__CGSCC____-NEXT:    [[I:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10
-; IS__CGSCC____-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 [[I]]
-; IS__CGSCC____-NEXT:    store i8 0, i8* [[ARRAYIDX]], align 1, !tbaa [[TBAA15]]
-; IS__CGSCC____-NEXT:    br label [[FOR_INC]]
-; IS__CGSCC____:       for.inc:
-; IS__CGSCC____-NEXT:    [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
-; IS__CGSCC____-NEXT:    br label [[FOR_COND]], !llvm.loop [[LOOP28:![0-9]+]]
-; IS__CGSCC____:       for.end:
-; IS__CGSCC____-NEXT:    br label [[FOR_COND2:%.*]]
-; IS__CGSCC____:       for.cond2:
-; IS__CGSCC____-NEXT:    [[INDVARS_IV2:%.*]] = phi i64 [ [[INDVARS_IV_NEXT3:%.*]], [[FOR_INC9:%.*]] ], [ 0, [[FOR_END]] ]
-; IS__CGSCC____-NEXT:    [[EXITCOND6:%.*]] = icmp ne i64 [[INDVARS_IV2]], 10
-; IS__CGSCC____-NEXT:    br i1 [[EXITCOND6]], label [[FOR_BODY5:%.*]], label [[FOR_COND_CLEANUP4:%.*]]
-; IS__CGSCC____:       for.cond.cleanup4:
-; IS__CGSCC____-NEXT:    br label [[FOR_END11:%.*]]
-; IS__CGSCC____:       for.body5:
-; IS__CGSCC____-NEXT:    [[I15:%.*]] = bitcast i8* [[BYTES]] to float*
-; IS__CGSCC____-NEXT:    [[I16:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10
-; IS__CGSCC____-NEXT:    [[I17:%.*]] = or i64 [[I16]], 1
-; IS__CGSCC____-NEXT:    [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* [[I15]], i64 [[I17]]
-; IS__CGSCC____-NEXT:    store float 0.000000e+00, float* [[ARRAYIDX8]], align 4, !tbaa [[TBAA18]]
-; IS__CGSCC____-NEXT:    br label [[FOR_INC9]]
-; IS__CGSCC____:       for.inc9:
-; IS__CGSCC____-NEXT:    [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1
-; IS__CGSCC____-NEXT:    br label [[FOR_COND2]], !llvm.loop [[LOOP29:![0-9]+]]
-; IS__CGSCC____:       for.end11:
-; IS__CGSCC____-NEXT:    br label [[FOR_COND13:%.*]]
-; IS__CGSCC____:       for.cond13:
-; IS__CGSCC____-NEXT:    [[INDVARS_IV7:%.*]] = phi i64 [ [[INDVARS_IV_NEXT8:%.*]], [[FOR_INC21:%.*]] ], [ 0, [[FOR_END11]] ]
-; IS__CGSCC____-NEXT:    [[EXITCOND11:%.*]] = icmp ne i64 [[INDVARS_IV7]], 20
-; IS__CGSCC____-NEXT:    br i1 [[EXITCOND11]], label [[FOR_BODY16:%.*]], label [[FOR_COND_CLEANUP15:%.*]]
-; IS__CGSCC____:       for.cond.cleanup15:
-; IS__CGSCC____-NEXT:    br label [[FOR_END23:%.*]]
-; IS__CGSCC____:       for.body16:
-; IS__CGSCC____-NEXT:    [[I18:%.*]] = bitcast i8* [[BYTES]] to i64*
-; IS__CGSCC____-NEXT:    [[I19:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10
-; IS__CGSCC____-NEXT:    [[I20:%.*]] = add nuw nsw i64 [[I19]], 2
-; IS__CGSCC____-NEXT:    [[ARRAYIDX20:%.*]] = getelementptr inbounds i64, i64* [[I18]], i64 [[I20]]
-; IS__CGSCC____-NEXT:    store i64 0, i64* [[ARRAYIDX20]], align 8, !tbaa [[TBAA20]]
-; IS__CGSCC____-NEXT:    br label [[FOR_INC21]]
-; IS__CGSCC____:       for.inc21:
-; IS__CGSCC____-NEXT:    [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1
-; IS__CGSCC____-NEXT:    br label [[FOR_COND13]], !llvm.loop [[LOOP30:![0-9]+]]
-; IS__CGSCC____:       for.end23:
-; IS__CGSCC____-NEXT:    [[ARRAYIDX24:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 1023
-; IS__CGSCC____-NEXT:    store i8 0, i8* [[ARRAYIDX24]], align 1, !tbaa [[TBAA15]]
-; IS__CGSCC____-NEXT:    [[ARRAYIDX25:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 500
-; IS__CGSCC____-NEXT:    [[I21:%.*]] = bitcast i8* [[ARRAYIDX25]] to i32*
-; IS__CGSCC____-NEXT:    call void @write_arg(i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) [[I21]], i32 noundef 0) #[[ATTR15]]
-; IS__CGSCC____-NEXT:    br label [[FOR_COND27:%.*]]
-; IS__CGSCC____:       for.cond27:
-; IS__CGSCC____-NEXT:    [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC35:%.*]] ], [ 0, [[FOR_END23]] ]
-; IS__CGSCC____-NEXT:    [[EXITCOND14:%.*]] = icmp ne i64 [[INDVARS_IV12]], 1024
-; IS__CGSCC____-NEXT:    br i1 [[EXITCOND14]], label [[FOR_BODY30:%.*]], label [[FOR_COND_CLEANUP29:%.*]]
-; IS__CGSCC____:       for.cond.cleanup29:
-; IS__CGSCC____-NEXT:    br label [[FOR_END37:%.*]]
-; IS__CGSCC____:       for.body30:
-; IS__CGSCC____-NEXT:    [[ARRAYIDX32:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 [[INDVARS_IV12]]
-; IS__CGSCC____-NEXT:    [[I22:%.*]] = load i8, i8* [[ARRAYIDX32]], align 1, !tbaa [[TBAA15]]
-; IS__CGSCC____-NEXT:    [[ARRAYIDX34:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]]
-; IS__CGSCC____-NEXT:    store i8 [[I22]], i8* [[ARRAYIDX34]], align 1, !tbaa [[TBAA15]]
-; IS__CGSCC____-NEXT:    br label [[FOR_INC35]]
-; IS__CGSCC____:       for.inc35:
-; IS__CGSCC____-NEXT:    [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1
-; IS__CGSCC____-NEXT:    br label [[FOR_COND27]], !llvm.loop [[LOOP31:![0-9]+]]
-; IS__CGSCC____:       for.end37:
-; IS__CGSCC____-NEXT:    ret void
+; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@noalias_arg_simplifiable_2
+; IS__CGSCC_OPM-SAME: (i8* [[BYTES:%.*]]) {
+; IS__CGSCC_OPM-NEXT:  entry:
+; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND:%.*]]
+; IS__CGSCC_OPM:       for.cond:
+; IS__CGSCC_OPM-NEXT:    [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ]
+; IS__CGSCC_OPM-NEXT:    [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], 100
+; IS__CGSCC_OPM-NEXT:    br i1 [[EXITCOND]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]]
+; IS__CGSCC_OPM:       for.cond.cleanup:
+; IS__CGSCC_OPM-NEXT:    br label [[FOR_END:%.*]]
+; IS__CGSCC_OPM:       for.body:
+; IS__CGSCC_OPM-NEXT:    [[I:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10
+; IS__CGSCC_OPM-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 [[I]]
+; IS__CGSCC_OPM-NEXT:    store i8 0, i8* [[ARRAYIDX]], align 1, !tbaa [[TBAA15]]
+; IS__CGSCC_OPM-NEXT:    br label [[FOR_INC]]
+; IS__CGSCC_OPM:       for.inc:
+; IS__CGSCC_OPM-NEXT:    [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
+; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND]], !llvm.loop [[LOOP28:![0-9]+]]
+; IS__CGSCC_OPM:       for.end:
+; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND2:%.*]]
+; IS__CGSCC_OPM:       for.cond2:
+; IS__CGSCC_OPM-NEXT:    [[INDVARS_IV2:%.*]] = phi i64 [ [[INDVARS_IV_NEXT3:%.*]], [[FOR_INC9:%.*]] ], [ 0, [[FOR_END]] ]
+; IS__CGSCC_OPM-NEXT:    [[EXITCOND6:%.*]] = icmp ne i64 [[INDVARS_IV2]], 10
+; IS__CGSCC_OPM-NEXT:    br i1 [[EXITCOND6]], label [[FOR_BODY5:%.*]], label [[FOR_COND_CLEANUP4:%.*]]
+; IS__CGSCC_OPM:       for.cond.cleanup4:
+; IS__CGSCC_OPM-NEXT:    br label [[FOR_END11:%.*]]
+; IS__CGSCC_OPM:       for.body5:
+; IS__CGSCC_OPM-NEXT:    [[I15:%.*]] = bitcast i8* [[BYTES]] to float*
+; IS__CGSCC_OPM-NEXT:    [[I16:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10
+; IS__CGSCC_OPM-NEXT:    [[I17:%.*]] = or i64 [[I16]], 1
+; IS__CGSCC_OPM-NEXT:    [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* [[I15]], i64 [[I17]]
+; IS__CGSCC_OPM-NEXT:    store float 0.000000e+00, float* [[ARRAYIDX8]], align 4, !tbaa [[TBAA18]]
+; IS__CGSCC_OPM-NEXT:    br label [[FOR_INC9]]
+; IS__CGSCC_OPM:       for.inc9:
+; IS__CGSCC_OPM-NEXT:    [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1
+; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND2]], !llvm.loop [[LOOP29:![0-9]+]]
+; IS__CGSCC_OPM:       for.end11:
+; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND13:%.*]]
+; IS__CGSCC_OPM:       for.cond13:
+; IS__CGSCC_OPM-NEXT:    [[INDVARS_IV7:%.*]] = phi i64 [ [[INDVARS_IV_NEXT8:%.*]], [[FOR_INC21:%.*]] ], [ 0, [[FOR_END11]] ]
+; IS__CGSCC_OPM-NEXT:    [[EXITCOND11:%.*]] = icmp ne i64 [[INDVARS_IV7]], 20
+; IS__CGSCC_OPM-NEXT:    br i1 [[EXITCOND11]], label [[FOR_BODY16:%.*]], label [[FOR_COND_CLEANUP15:%.*]]
+; IS__CGSCC_OPM:       for.cond.cleanup15:
+; IS__CGSCC_OPM-NEXT:    br label [[FOR_END23:%.*]]
+; IS__CGSCC_OPM:       for.body16:
+; IS__CGSCC_OPM-NEXT:    [[I18:%.*]] = bitcast i8* [[BYTES]] to i64*
+; IS__CGSCC_OPM-NEXT:    [[I19:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10
+; IS__CGSCC_OPM-NEXT:    [[I20:%.*]] = add nuw nsw i64 [[I19]], 2
+; IS__CGSCC_OPM-NEXT:    [[ARRAYIDX20:%.*]] = getelementptr inbounds i64, i64* [[I18]], i64 [[I20]]
+; IS__CGSCC_OPM-NEXT:    store i64 0, i64* [[ARRAYIDX20]], align 8, !tbaa [[TBAA20]]
+; IS__CGSCC_OPM-NEXT:    br label [[FOR_INC21]]
+; IS__CGSCC_OPM:       for.inc21:
+; IS__CGSCC_OPM-NEXT:    [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1
+; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND13]], !llvm.loop [[LOOP30:![0-9]+]]
+; IS__CGSCC_OPM:       for.end23:
+; IS__CGSCC_OPM-NEXT:    [[ARRAYIDX24:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 1023
+; IS__CGSCC_OPM-NEXT:    store i8 0, i8* [[ARRAYIDX24]], align 1, !tbaa [[TBAA15]]
+; IS__CGSCC_OPM-NEXT:    [[ARRAYIDX25:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 500
+; IS__CGSCC_OPM-NEXT:    [[I21:%.*]] = bitcast i8* [[ARRAYIDX25]] to i32*
+; IS__CGSCC_OPM-NEXT:    call void @write_arg(i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) [[I21]], i32 noundef 0) #[[ATTR17]]
+; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND27:%.*]]
+; IS__CGSCC_OPM:       for.cond27:
+; IS__CGSCC_OPM-NEXT:    [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC35:%.*]] ], [ 0, [[FOR_END23]] ]
+; IS__CGSCC_OPM-NEXT:    [[EXITCOND14:%.*]] = icmp ne i64 [[INDVARS_IV12]], 1024
+; IS__CGSCC_OPM-NEXT:    br i1 [[EXITCOND14]], label [[FOR_BODY30:%.*]], label [[FOR_COND_CLEANUP29:%.*]]
+; IS__CGSCC_OPM:       for.cond.cleanup29:
+; IS__CGSCC_OPM-NEXT:    br label [[FOR_END37:%.*]]
+; IS__CGSCC_OPM:       for.body30:
+; IS__CGSCC_OPM-NEXT:    [[ARRAYIDX32:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 [[INDVARS_IV12]]
+; IS__CGSCC_OPM-NEXT:    [[I22:%.*]] = load i8, i8* [[ARRAYIDX32]], align 1, !tbaa [[TBAA15]]
+; IS__CGSCC_OPM-NEXT:    [[ARRAYIDX34:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]]
+; IS__CGSCC_OPM-NEXT:    store i8 [[I22]], i8* [[ARRAYIDX34]], align 1, !tbaa [[TBAA15]]
+; IS__CGSCC_OPM-NEXT:    br label [[FOR_INC35]]
+; IS__CGSCC_OPM:       for.inc35:
+; IS__CGSCC_OPM-NEXT:    [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1
+; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND27]], !llvm.loop [[LOOP31:![0-9]+]]
+; IS__CGSCC_OPM:       for.end37:
+; IS__CGSCC_OPM-NEXT:    ret void
+;
+; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@noalias_arg_simplifiable_2
+; IS__CGSCC_NPM-SAME: (i8* [[BYTES:%.*]]) {
+; IS__CGSCC_NPM-NEXT:  entry:
+; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND:%.*]]
+; IS__CGSCC_NPM:       for.cond:
+; IS__CGSCC_NPM-NEXT:    [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_INC:%.*]] ], [ 0, [[ENTRY:%.*]] ]
+; IS__CGSCC_NPM-NEXT:    [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], 100
+; IS__CGSCC_NPM-NEXT:    br i1 [[EXITCOND]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]]
+; IS__CGSCC_NPM:       for.cond.cleanup:
+; IS__CGSCC_NPM-NEXT:    br label [[FOR_END:%.*]]
+; IS__CGSCC_NPM:       for.body:
+; IS__CGSCC_NPM-NEXT:    [[I:%.*]] = mul nuw nsw i64 [[INDVARS_IV]], 10
+; IS__CGSCC_NPM-NEXT:    [[ARRAYIDX:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 [[I]]
+; IS__CGSCC_NPM-NEXT:    store i8 0, i8* [[ARRAYIDX]], align 1, !tbaa [[TBAA15]]
+; IS__CGSCC_NPM-NEXT:    br label [[FOR_INC]]
+; IS__CGSCC_NPM:       for.inc:
+; IS__CGSCC_NPM-NEXT:    [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
+; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND]], !llvm.loop [[LOOP28:![0-9]+]]
+; IS__CGSCC_NPM:       for.end:
+; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND2:%.*]]
+; IS__CGSCC_NPM:       for.cond2:
+; IS__CGSCC_NPM-NEXT:    [[INDVARS_IV2:%.*]] = phi i64 [ [[INDVARS_IV_NEXT3:%.*]], [[FOR_INC9:%.*]] ], [ 0, [[FOR_END]] ]
+; IS__CGSCC_NPM-NEXT:    [[EXITCOND6:%.*]] = icmp ne i64 [[INDVARS_IV2]], 10
+; IS__CGSCC_NPM-NEXT:    br i1 [[EXITCOND6]], label [[FOR_BODY5:%.*]], label [[FOR_COND_CLEANUP4:%.*]]
+; IS__CGSCC_NPM:       for.cond.cleanup4:
+; IS__CGSCC_NPM-NEXT:    br label [[FOR_END11:%.*]]
+; IS__CGSCC_NPM:       for.body5:
+; IS__CGSCC_NPM-NEXT:    [[I15:%.*]] = bitcast i8* [[BYTES]] to float*
+; IS__CGSCC_NPM-NEXT:    [[I16:%.*]] = mul nuw nsw i64 [[INDVARS_IV2]], 10
+; IS__CGSCC_NPM-NEXT:    [[I17:%.*]] = or i64 [[I16]], 1
+; IS__CGSCC_NPM-NEXT:    [[ARRAYIDX8:%.*]] = getelementptr inbounds float, float* [[I15]], i64 [[I17]]
+; IS__CGSCC_NPM-NEXT:    store float 0.000000e+00, float* [[ARRAYIDX8]], align 4, !tbaa [[TBAA18]]
+; IS__CGSCC_NPM-NEXT:    br label [[FOR_INC9]]
+; IS__CGSCC_NPM:       for.inc9:
+; IS__CGSCC_NPM-NEXT:    [[INDVARS_IV_NEXT3]] = add nuw nsw i64 [[INDVARS_IV2]], 1
+; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND2]], !llvm.loop [[LOOP29:![0-9]+]]
+; IS__CGSCC_NPM:       for.end11:
+; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND13:%.*]]
+; IS__CGSCC_NPM:       for.cond13:
+; IS__CGSCC_NPM-NEXT:    [[INDVARS_IV7:%.*]] = phi i64 [ [[INDVARS_IV_NEXT8:%.*]], [[FOR_INC21:%.*]] ], [ 0, [[FOR_END11]] ]
+; IS__CGSCC_NPM-NEXT:    [[EXITCOND11:%.*]] = icmp ne i64 [[INDVARS_IV7]], 20
+; IS__CGSCC_NPM-NEXT:    br i1 [[EXITCOND11]], label [[FOR_BODY16:%.*]], label [[FOR_COND_CLEANUP15:%.*]]
+; IS__CGSCC_NPM:       for.cond.cleanup15:
+; IS__CGSCC_NPM-NEXT:    br label [[FOR_END23:%.*]]
+; IS__CGSCC_NPM:       for.body16:
+; IS__CGSCC_NPM-NEXT:    [[I18:%.*]] = bitcast i8* [[BYTES]] to i64*
+; IS__CGSCC_NPM-NEXT:    [[I19:%.*]] = mul nuw nsw i64 [[INDVARS_IV7]], 10
+; IS__CGSCC_NPM-NEXT:    [[I20:%.*]] = add nuw nsw i64 [[I19]], 2
+; IS__CGSCC_NPM-NEXT:    [[ARRAYIDX20:%.*]] = getelementptr inbounds i64, i64* [[I18]], i64 [[I20]]
+; IS__CGSCC_NPM-NEXT:    store i64 0, i64* [[ARRAYIDX20]], align 8, !tbaa [[TBAA20]]
+; IS__CGSCC_NPM-NEXT:    br label [[FOR_INC21]]
+; IS__CGSCC_NPM:       for.inc21:
+; IS__CGSCC_NPM-NEXT:    [[INDVARS_IV_NEXT8]] = add nuw nsw i64 [[INDVARS_IV7]], 1
+; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND13]], !llvm.loop [[LOOP30:![0-9]+]]
+; IS__CGSCC_NPM:       for.end23:
+; IS__CGSCC_NPM-NEXT:    [[ARRAYIDX24:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 1023
+; IS__CGSCC_NPM-NEXT:    store i8 0, i8* [[ARRAYIDX24]], align 1, !tbaa [[TBAA15]]
+; IS__CGSCC_NPM-NEXT:    [[ARRAYIDX25:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 500
+; IS__CGSCC_NPM-NEXT:    [[I21:%.*]] = bitcast i8* [[ARRAYIDX25]] to i32*
+; IS__CGSCC_NPM-NEXT:    call void @write_arg(i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) [[I21]], i32 noundef 0) #[[ATTR16]]
+; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND27:%.*]]
+; IS__CGSCC_NPM:       for.cond27:
+; IS__CGSCC_NPM-NEXT:    [[INDVARS_IV12:%.*]] = phi i64 [ [[INDVARS_IV_NEXT13:%.*]], [[FOR_INC35:%.*]] ], [ 0, [[FOR_END23]] ]
+; IS__CGSCC_NPM-NEXT:    [[EXITCOND14:%.*]] = icmp ne i64 [[INDVARS_IV12]], 1024
+; IS__CGSCC_NPM-NEXT:    br i1 [[EXITCOND14]], label [[FOR_BODY30:%.*]], label [[FOR_COND_CLEANUP29:%.*]]
+; IS__CGSCC_NPM:       for.cond.cleanup29:
+; IS__CGSCC_NPM-NEXT:    br label [[FOR_END37:%.*]]
+; IS__CGSCC_NPM:       for.body30:
+; IS__CGSCC_NPM-NEXT:    [[ARRAYIDX32:%.*]] = getelementptr inbounds i8, i8* [[BYTES]], i64 [[INDVARS_IV12]]
+; IS__CGSCC_NPM-NEXT:    [[I22:%.*]] = load i8, i8* [[ARRAYIDX32]], align 1, !tbaa [[TBAA15]]
+; IS__CGSCC_NPM-NEXT:    [[ARRAYIDX34:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* @globalBytes, i64 0, i64 [[INDVARS_IV12]]
+; IS__CGSCC_NPM-NEXT:    store i8 [[I22]], i8* [[ARRAYIDX34]], align 1, !tbaa [[TBAA15]]
+; IS__CGSCC_NPM-NEXT:    br label [[FOR_INC35]]
+; IS__CGSCC_NPM:       for.inc35:
+; IS__CGSCC_NPM-NEXT:    [[INDVARS_IV_NEXT13]] = add nuw nsw i64 [[INDVARS_IV12]], 1
+; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND27]], !llvm.loop [[LOOP31:![0-9]+]]
+; IS__CGSCC_NPM:       for.end37:
+; IS__CGSCC_NPM-NEXT:    ret void
 ;
 entry:
   br label %for.cond
@@ -2013,30 +2364,30 @@ for.end37:                                        ; preds = %for.cond.cleanup29
 ;    }
 ;
 define i32 @local_alloca_not_simplifiable_1() {
-; NOT_TUNIT_NPM-LABEL: define {{[^@]+}}@local_alloca_not_simplifiable_1() {
-; NOT_TUNIT_NPM-NEXT:  entry:
-; NOT_TUNIT_NPM-NEXT:    [[X:%.*]] = alloca i32, align 4
-; NOT_TUNIT_NPM-NEXT:    [[Y:%.*]] = alloca i32, align 4
-; NOT_TUNIT_NPM-NEXT:    [[I:%.*]] = bitcast i32* [[X]] to i8*
-; NOT_TUNIT_NPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR13:[0-9]+]]
-; NOT_TUNIT_NPM-NEXT:    [[I1:%.*]] = bitcast i32* [[Y]] to i8*
-; NOT_TUNIT_NPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I1]]) #[[ATTR13]]
-; NOT_TUNIT_NPM-NEXT:    store i32 1, i32* [[Y]], align 4, !tbaa [[TBAA3]]
-; NOT_TUNIT_NPM-NEXT:    store i32 1, i32* [[X]], align 4, !tbaa [[TBAA3]]
-; NOT_TUNIT_NPM-NEXT:    [[I2:%.*]] = bitcast i32* [[X]] to i8*
-; NOT_TUNIT_NPM-NEXT:    call void @escape(i8* noundef nonnull align 4 dereferenceable(4) [[I2]])
-; NOT_TUNIT_NPM-NEXT:    call void @write_random(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[Y]])
-; NOT_TUNIT_NPM-NEXT:    [[I3:%.*]] = load i32, i32* [[X]], align 4, !tbaa [[TBAA3]]
-; NOT_TUNIT_NPM-NEXT:    [[TOBOOL_NOT:%.*]] = icmp eq i32 [[I3]], 0
-; NOT_TUNIT_NPM-NEXT:    [[COND:%.*]] = select i1 [[TOBOOL_NOT]], i32 2, i32 1
-; NOT_TUNIT_NPM-NEXT:    [[I4:%.*]] = load i32, i32* [[Y]], align 4, !tbaa [[TBAA3]]
-; NOT_TUNIT_NPM-NEXT:    [[ADD:%.*]] = add nsw i32 [[I3]], [[I4]]
-; NOT_TUNIT_NPM-NEXT:    [[ADD1:%.*]] = add nsw i32 [[ADD]], [[COND]]
-; NOT_TUNIT_NPM-NEXT:    [[I5:%.*]] = bitcast i32* [[Y]] to i8*
-; NOT_TUNIT_NPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I5]])
-; NOT_TUNIT_NPM-NEXT:    [[I6:%.*]] = bitcast i32* [[X]] to i8*
-; NOT_TUNIT_NPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I6]])
-; NOT_TUNIT_NPM-NEXT:    ret i32 [[ADD1]]
+; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@local_alloca_not_simplifiable_1() {
+; IS__TUNIT_OPM-NEXT:  entry:
+; IS__TUNIT_OPM-NEXT:    [[X:%.*]] = alloca i32, align 4
+; IS__TUNIT_OPM-NEXT:    [[Y:%.*]] = alloca i32, align 4
+; IS__TUNIT_OPM-NEXT:    [[I:%.*]] = bitcast i32* [[X]] to i8*
+; IS__TUNIT_OPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR13]]
+; IS__TUNIT_OPM-NEXT:    [[I1:%.*]] = bitcast i32* [[Y]] to i8*
+; IS__TUNIT_OPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I1]]) #[[ATTR13]]
+; IS__TUNIT_OPM-NEXT:    store i32 1, i32* [[Y]], align 4, !tbaa [[TBAA3]]
+; IS__TUNIT_OPM-NEXT:    store i32 1, i32* [[X]], align 4, !tbaa [[TBAA3]]
+; IS__TUNIT_OPM-NEXT:    [[I2:%.*]] = bitcast i32* [[X]] to i8*
+; IS__TUNIT_OPM-NEXT:    call void @escape(i8* noundef nonnull align 4 dereferenceable(4) [[I2]])
+; IS__TUNIT_OPM-NEXT:    call void @write_random(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[Y]])
+; IS__TUNIT_OPM-NEXT:    [[I3:%.*]] = load i32, i32* [[X]], align 4, !tbaa [[TBAA3]]
+; IS__TUNIT_OPM-NEXT:    [[TOBOOL_NOT:%.*]] = icmp eq i32 [[I3]], 0
+; IS__TUNIT_OPM-NEXT:    [[COND:%.*]] = select i1 [[TOBOOL_NOT]], i32 2, i32 1
+; IS__TUNIT_OPM-NEXT:    [[I4:%.*]] = load i32, i32* [[Y]], align 4, !tbaa [[TBAA3]]
+; IS__TUNIT_OPM-NEXT:    [[ADD:%.*]] = add nsw i32 [[I3]], [[I4]]
+; IS__TUNIT_OPM-NEXT:    [[ADD1:%.*]] = add nsw i32 [[ADD]], [[COND]]
+; IS__TUNIT_OPM-NEXT:    [[I5:%.*]] = bitcast i32* [[Y]] to i8*
+; IS__TUNIT_OPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I5]])
+; IS__TUNIT_OPM-NEXT:    [[I6:%.*]] = bitcast i32* [[X]] to i8*
+; IS__TUNIT_OPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I6]])
+; IS__TUNIT_OPM-NEXT:    ret i32 [[ADD1]]
 ;
 ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@local_alloca_not_simplifiable_1() {
 ; IS__TUNIT_NPM-NEXT:  entry:
@@ -2063,6 +2414,56 @@ define i32 @local_alloca_not_simplifiable_1() {
 ; IS__TUNIT_NPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I6]])
 ; IS__TUNIT_NPM-NEXT:    ret i32 [[ADD1]]
 ;
+; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@local_alloca_not_simplifiable_1() {
+; IS__CGSCC_OPM-NEXT:  entry:
+; IS__CGSCC_OPM-NEXT:    [[X:%.*]] = alloca i32, align 4
+; IS__CGSCC_OPM-NEXT:    [[Y:%.*]] = alloca i32, align 4
+; IS__CGSCC_OPM-NEXT:    [[I:%.*]] = bitcast i32* [[X]] to i8*
+; IS__CGSCC_OPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR15]]
+; IS__CGSCC_OPM-NEXT:    [[I1:%.*]] = bitcast i32* [[Y]] to i8*
+; IS__CGSCC_OPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I1]]) #[[ATTR15]]
+; IS__CGSCC_OPM-NEXT:    store i32 1, i32* [[Y]], align 4, !tbaa [[TBAA3]]
+; IS__CGSCC_OPM-NEXT:    store i32 1, i32* [[X]], align 4, !tbaa [[TBAA3]]
+; IS__CGSCC_OPM-NEXT:    [[I2:%.*]] = bitcast i32* [[X]] to i8*
+; IS__CGSCC_OPM-NEXT:    call void @escape(i8* noundef nonnull align 4 dereferenceable(4) [[I2]])
+; IS__CGSCC_OPM-NEXT:    call void @write_random(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[Y]])
+; IS__CGSCC_OPM-NEXT:    [[I3:%.*]] = load i32, i32* [[X]], align 4, !tbaa [[TBAA3]]
+; IS__CGSCC_OPM-NEXT:    [[TOBOOL_NOT:%.*]] = icmp eq i32 [[I3]], 0
+; IS__CGSCC_OPM-NEXT:    [[COND:%.*]] = select i1 [[TOBOOL_NOT]], i32 2, i32 1
+; IS__CGSCC_OPM-NEXT:    [[I4:%.*]] = load i32, i32* [[Y]], align 4, !tbaa [[TBAA3]]
+; IS__CGSCC_OPM-NEXT:    [[ADD:%.*]] = add nsw i32 [[I3]], [[I4]]
+; IS__CGSCC_OPM-NEXT:    [[ADD1:%.*]] = add nsw i32 [[ADD]], [[COND]]
+; IS__CGSCC_OPM-NEXT:    [[I5:%.*]] = bitcast i32* [[Y]] to i8*
+; IS__CGSCC_OPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I5]])
+; IS__CGSCC_OPM-NEXT:    [[I6:%.*]] = bitcast i32* [[X]] to i8*
+; IS__CGSCC_OPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I6]])
+; IS__CGSCC_OPM-NEXT:    ret i32 [[ADD1]]
+;
+; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@local_alloca_not_simplifiable_1() {
+; IS__CGSCC_NPM-NEXT:  entry:
+; IS__CGSCC_NPM-NEXT:    [[X:%.*]] = alloca i32, align 4
+; IS__CGSCC_NPM-NEXT:    [[Y:%.*]] = alloca i32, align 4
+; IS__CGSCC_NPM-NEXT:    [[I:%.*]] = bitcast i32* [[X]] to i8*
+; IS__CGSCC_NPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I]]) #[[ATTR14]]
+; IS__CGSCC_NPM-NEXT:    [[I1:%.*]] = bitcast i32* [[Y]] to i8*
+; IS__CGSCC_NPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I1]]) #[[ATTR14]]
+; IS__CGSCC_NPM-NEXT:    store i32 1, i32* [[Y]], align 4, !tbaa [[TBAA3]]
+; IS__CGSCC_NPM-NEXT:    store i32 1, i32* [[X]], align 4, !tbaa [[TBAA3]]
+; IS__CGSCC_NPM-NEXT:    [[I2:%.*]] = bitcast i32* [[X]] to i8*
+; IS__CGSCC_NPM-NEXT:    call void @escape(i8* noundef nonnull align 4 dereferenceable(4) [[I2]])
+; IS__CGSCC_NPM-NEXT:    call void @write_random(i32* noalias nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[Y]])
+; IS__CGSCC_NPM-NEXT:    [[I3:%.*]] = load i32, i32* [[X]], align 4, !tbaa [[TBAA3]]
+; IS__CGSCC_NPM-NEXT:    [[TOBOOL_NOT:%.*]] = icmp eq i32 [[I3]], 0
+; IS__CGSCC_NPM-NEXT:    [[COND:%.*]] = select i1 [[TOBOOL_NOT]], i32 2, i32 1
+; IS__CGSCC_NPM-NEXT:    [[I4:%.*]] = load i32, i32* [[Y]], align 4, !tbaa [[TBAA3]]
+; IS__CGSCC_NPM-NEXT:    [[ADD:%.*]] = add nsw i32 [[I3]], [[I4]]
+; IS__CGSCC_NPM-NEXT:    [[ADD1:%.*]] = add nsw i32 [[ADD]], [[COND]]
+; IS__CGSCC_NPM-NEXT:    [[I5:%.*]] = bitcast i32* [[Y]] to i8*
+; IS__CGSCC_NPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I5]])
+; IS__CGSCC_NPM-NEXT:    [[I6:%.*]] = bitcast i32* [[X]] to i8*
+; IS__CGSCC_NPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 4, i8* nocapture nofree noundef nonnull align 4 dereferenceable(4) [[I6]])
+; IS__CGSCC_NPM-NEXT:    ret i32 [[ADD1]]
+;
 entry:
   %X = alloca i32, align 4
   %Y = alloca i32, align 4
@@ -2230,7 +2631,7 @@ declare void @escape(i8*)
 define i32 @global_not_simplifiable_1(i32 %cnd) {
 ; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind readonly willreturn
 ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@global_not_simplifiable_1
-; IS__TUNIT_OPM-SAME: (i32 [[CND:%.*]]) #[[ATTR8:[0-9]+]] {
+; IS__TUNIT_OPM-SAME: (i32 [[CND:%.*]]) #[[ATTR7:[0-9]+]] {
 ; IS__TUNIT_OPM-NEXT:  entry:
 ; IS__TUNIT_OPM-NEXT:    [[I:%.*]] = load i32, i32* @Flag0, align 4, !tbaa [[TBAA3]]
 ; IS__TUNIT_OPM-NEXT:    ret i32 [[I]]
@@ -2373,7 +2774,7 @@ define void @write_global() {
 define i32 @read_global() {
 ; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind readonly willreturn
 ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@read_global
-; IS__TUNIT_OPM-SAME: () #[[ATTR8]] {
+; IS__TUNIT_OPM-SAME: () #[[ATTR7]] {
 ; IS__TUNIT_OPM-NEXT:    [[L:%.*]] = load i32, i32* @Gint2, align 4
 ; IS__TUNIT_OPM-NEXT:    ret i32 [[L]]
 ;
@@ -2438,7 +2839,7 @@ define void @write_static_global() {
 define i32 @read_static_global() {
 ; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind readonly willreturn
 ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@read_static_global
-; IS__TUNIT_OPM-SAME: () #[[ATTR8]] {
+; IS__TUNIT_OPM-SAME: () #[[ATTR7]] {
 ; IS__TUNIT_OPM-NEXT:    [[L:%.*]] = load i32, i32* @Gstatic_int2, align 4
 ; IS__TUNIT_OPM-NEXT:    ret i32 [[L]]
 ;
@@ -2522,29 +2923,28 @@ define i32 @single_read_of_static_global() {
 }
 
 define i8 @phi_store() {
-; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind
-; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@phi_store
-; IS__TUNIT_OPM-SAME: () #[[ATTR3]] {
-; IS__TUNIT_OPM-NEXT:  entry:
-; IS__TUNIT_OPM-NEXT:    [[A:%.*]] = alloca i16, align 2
-; IS__TUNIT_OPM-NEXT:    [[B:%.*]] = bitcast i16* [[A]] to i8*
-; IS__TUNIT_OPM-NEXT:    br label [[LOOP:%.*]]
-; IS__TUNIT_OPM:       loop:
-; IS__TUNIT_OPM-NEXT:    [[P:%.*]] = phi i8* [ [[B]], [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ]
-; IS__TUNIT_OPM-NEXT:    [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ]
-; IS__TUNIT_OPM-NEXT:    store i8 1, i8* [[P]], align 1
-; IS__TUNIT_OPM-NEXT:    [[G]] = getelementptr i8, i8* [[P]], i64 1
-; IS__TUNIT_OPM-NEXT:    [[O]] = add nsw i8 [[I]], 1
-; IS__TUNIT_OPM-NEXT:    [[C:%.*]] = icmp eq i8 [[O]], 2
-; IS__TUNIT_OPM-NEXT:    br i1 [[C]], label [[END:%.*]], label [[LOOP]]
-; IS__TUNIT_OPM:       end:
-; IS__TUNIT_OPM-NEXT:    [[S:%.*]] = getelementptr i8, i8* [[B]], i64 1
-; IS__TUNIT_OPM-NEXT:    [[L:%.*]] = load i8, i8* [[S]], align 1
-; IS__TUNIT_OPM-NEXT:    ret i8 [[L]]
-;
-; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn
+; IS________OPM: Function Attrs: nofree norecurse nosync nounwind readnone
+; IS________OPM-LABEL: define {{[^@]+}}@phi_store
+; IS________OPM-SAME: () #[[ATTR8:[0-9]+]] {
+; IS________OPM-NEXT:  entry:
+; IS________OPM-NEXT:    [[A:%.*]] = alloca i16, align 2
+; IS________OPM-NEXT:    [[B:%.*]] = bitcast i16* [[A]] to i8*
+; IS________OPM-NEXT:    br label [[LOOP:%.*]]
+; IS________OPM:       loop:
+; IS________OPM-NEXT:    [[P:%.*]] = phi i8* [ [[B]], [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ]
+; IS________OPM-NEXT:    [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ]
+; IS________OPM-NEXT:    [[G]] = getelementptr i8, i8* [[P]], i64 1
+; IS________OPM-NEXT:    [[O]] = add nsw i8 [[I]], 1
+; IS________OPM-NEXT:    [[C:%.*]] = icmp eq i8 [[O]], 2
+; IS________OPM-NEXT:    br i1 [[C]], label [[END:%.*]], label [[LOOP]]
+; IS________OPM:       end:
+; IS________OPM-NEXT:    [[S:%.*]] = getelementptr i8, i8* [[B]], i64 1
+; IS________OPM-NEXT:    [[L:%.*]] = load i8, i8* [[S]], align 1
+; IS________OPM-NEXT:    ret i8 [[L]]
+;
+; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
 ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@phi_store
-; IS__TUNIT_NPM-SAME: () #[[ATTR3]] {
+; IS__TUNIT_NPM-SAME: () #[[ATTR4]] {
 ; IS__TUNIT_NPM-NEXT:  entry:
 ; IS__TUNIT_NPM-NEXT:    [[A:%.*]] = alloca i16, align 2
 ; IS__TUNIT_NPM-NEXT:    [[B:%.*]] = bitcast i16* [[A]] to i8*
@@ -2552,7 +2952,6 @@ define i8 @phi_store() {
 ; IS__TUNIT_NPM:       loop:
 ; IS__TUNIT_NPM-NEXT:    [[P:%.*]] = phi i8* [ [[B]], [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ]
 ; IS__TUNIT_NPM-NEXT:    [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ]
-; IS__TUNIT_NPM-NEXT:    store i8 1, i8* [[P]], align 1
 ; IS__TUNIT_NPM-NEXT:    [[G]] = getelementptr i8, i8* [[P]], i64 1
 ; IS__TUNIT_NPM-NEXT:    [[O]] = add nsw i8 [[I]], 1
 ; IS__TUNIT_NPM-NEXT:    [[C:%.*]] = icmp eq i8 [[O]], 2
@@ -2562,29 +2961,9 @@ define i8 @phi_store() {
 ; IS__TUNIT_NPM-NEXT:    [[L:%.*]] = load i8, i8* [[S]], align 1
 ; IS__TUNIT_NPM-NEXT:    ret i8 [[L]]
 ;
-; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind
-; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@phi_store
-; IS__CGSCC_OPM-SAME: () #[[ATTR8:[0-9]+]] {
-; IS__CGSCC_OPM-NEXT:  entry:
-; IS__CGSCC_OPM-NEXT:    [[A:%.*]] = alloca i16, align 2
-; IS__CGSCC_OPM-NEXT:    [[B:%.*]] = bitcast i16* [[A]] to i8*
-; IS__CGSCC_OPM-NEXT:    br label [[LOOP:%.*]]
-; IS__CGSCC_OPM:       loop:
-; IS__CGSCC_OPM-NEXT:    [[P:%.*]] = phi i8* [ [[B]], [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ]
-; IS__CGSCC_OPM-NEXT:    [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ]
-; IS__CGSCC_OPM-NEXT:    store i8 1, i8* [[P]], align 1
-; IS__CGSCC_OPM-NEXT:    [[G]] = getelementptr i8, i8* [[P]], i64 1
-; IS__CGSCC_OPM-NEXT:    [[O]] = add nsw i8 [[I]], 1
-; IS__CGSCC_OPM-NEXT:    [[C:%.*]] = icmp eq i8 [[O]], 2
-; IS__CGSCC_OPM-NEXT:    br i1 [[C]], label [[END:%.*]], label [[LOOP]]
-; IS__CGSCC_OPM:       end:
-; IS__CGSCC_OPM-NEXT:    [[S:%.*]] = getelementptr i8, i8* [[B]], i64 1
-; IS__CGSCC_OPM-NEXT:    [[L:%.*]] = load i8, i8* [[S]], align 1
-; IS__CGSCC_OPM-NEXT:    ret i8 [[L]]
-;
-; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn
+; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
 ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@phi_store
-; IS__CGSCC_NPM-SAME: () #[[ATTR4]] {
+; IS__CGSCC_NPM-SAME: () #[[ATTR3]] {
 ; IS__CGSCC_NPM-NEXT:  entry:
 ; IS__CGSCC_NPM-NEXT:    [[A:%.*]] = alloca i16, align 2
 ; IS__CGSCC_NPM-NEXT:    [[B:%.*]] = bitcast i16* [[A]] to i8*
@@ -2592,7 +2971,6 @@ define i8 @phi_store() {
 ; IS__CGSCC_NPM:       loop:
 ; IS__CGSCC_NPM-NEXT:    [[P:%.*]] = phi i8* [ [[B]], [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ]
 ; IS__CGSCC_NPM-NEXT:    [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ]
-; IS__CGSCC_NPM-NEXT:    store i8 1, i8* [[P]], align 1
 ; IS__CGSCC_NPM-NEXT:    [[G]] = getelementptr i8, i8* [[P]], i64 1
 ; IS__CGSCC_NPM-NEXT:    [[O]] = add nsw i8 [[I]], 1
 ; IS__CGSCC_NPM-NEXT:    [[C:%.*]] = icmp eq i8 [[O]], 2
@@ -2631,7 +3009,6 @@ define i8 @phi_no_store_1() {
 ; IS__TUNIT_OPM:       loop:
 ; IS__TUNIT_OPM-NEXT:    [[P:%.*]] = phi i8* [ bitcast (i32* @a1 to i8*), [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ]
 ; IS__TUNIT_OPM-NEXT:    [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ]
-; IS__TUNIT_OPM-NEXT:    store i8 1, i8* [[P]], align 1
 ; IS__TUNIT_OPM-NEXT:    [[G]] = getelementptr i8, i8* [[P]], i64 1
 ; IS__TUNIT_OPM-NEXT:    [[O]] = add nsw i8 [[I]], 1
 ; IS__TUNIT_OPM-NEXT:    [[C:%.*]] = icmp eq i8 [[O]], 3
@@ -2650,7 +3027,6 @@ define i8 @phi_no_store_1() {
 ; IS__TUNIT_NPM:       loop:
 ; IS__TUNIT_NPM-NEXT:    [[P:%.*]] = phi i8* [ bitcast (i32* @a1 to i8*), [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ]
 ; IS__TUNIT_NPM-NEXT:    [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ]
-; IS__TUNIT_NPM-NEXT:    store i8 1, i8* [[P]], align 1
 ; IS__TUNIT_NPM-NEXT:    [[G]] = getelementptr i8, i8* [[P]], i64 1
 ; IS__TUNIT_NPM-NEXT:    [[O]] = add nsw i8 [[I]], 1
 ; IS__TUNIT_NPM-NEXT:    [[C:%.*]] = icmp eq i8 [[O]], 3
@@ -2663,13 +3039,12 @@ define i8 @phi_no_store_1() {
 ;
 ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind
 ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@phi_no_store_1
-; IS__CGSCC_OPM-SAME: () #[[ATTR8]] {
+; IS__CGSCC_OPM-SAME: () #[[ATTR9:[0-9]+]] {
 ; IS__CGSCC_OPM-NEXT:  entry:
 ; IS__CGSCC_OPM-NEXT:    br label [[LOOP:%.*]]
 ; IS__CGSCC_OPM:       loop:
 ; IS__CGSCC_OPM-NEXT:    [[P:%.*]] = phi i8* [ bitcast (i32* @a1 to i8*), [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ]
 ; IS__CGSCC_OPM-NEXT:    [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ]
-; IS__CGSCC_OPM-NEXT:    store i8 1, i8* [[P]], align 1
 ; IS__CGSCC_OPM-NEXT:    [[G]] = getelementptr i8, i8* [[P]], i64 1
 ; IS__CGSCC_OPM-NEXT:    [[O]] = add nsw i8 [[I]], 1
 ; IS__CGSCC_OPM-NEXT:    [[C:%.*]] = icmp eq i8 [[O]], 3
@@ -2688,7 +3063,6 @@ define i8 @phi_no_store_1() {
 ; IS__CGSCC_NPM:       loop:
 ; IS__CGSCC_NPM-NEXT:    [[P:%.*]] = phi i8* [ bitcast (i32* @a1 to i8*), [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ]
 ; IS__CGSCC_NPM-NEXT:    [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ]
-; IS__CGSCC_NPM-NEXT:    store i8 1, i8* [[P]], align 1
 ; IS__CGSCC_NPM-NEXT:    [[G]] = getelementptr i8, i8* [[P]], i64 1
 ; IS__CGSCC_NPM-NEXT:    [[O]] = add nsw i8 [[I]], 1
 ; IS__CGSCC_NPM-NEXT:    [[C:%.*]] = icmp eq i8 [[O]], 3
@@ -2728,10 +3102,9 @@ define i8 @phi_no_store_2() {
 ; IS__TUNIT_OPM-NEXT:  entry:
 ; IS__TUNIT_OPM-NEXT:    br label [[LOOP:%.*]]
 ; IS__TUNIT_OPM:       loop:
-; IS__TUNIT_OPM-NEXT:    [[P:%.*]] = phi i8* [ bitcast (i32* @a2 to i8*), [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ]
+; IS__TUNIT_OPM-NEXT:    [[P:%.*]] = phi i8* [ bitcast (i32* @a2 to i8*), [[ENTRY:%.*]] ], [ getelementptr (i8, i8* bitcast (i32* @a2 to i8*), i64 2), [[LOOP]] ]
 ; IS__TUNIT_OPM-NEXT:    [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ]
 ; IS__TUNIT_OPM-NEXT:    store i8 1, i8* [[P]], align 2
-; IS__TUNIT_OPM-NEXT:    [[G]] = getelementptr i8, i8* bitcast (i32* @a2 to i8*), i64 2
 ; IS__TUNIT_OPM-NEXT:    [[O]] = add nsw i8 [[I]], 1
 ; IS__TUNIT_OPM-NEXT:    [[C:%.*]] = icmp eq i8 [[O]], 7
 ; IS__TUNIT_OPM-NEXT:    br i1 [[C]], label [[END:%.*]], label [[LOOP]]
@@ -2746,10 +3119,9 @@ define i8 @phi_no_store_2() {
 ; IS__TUNIT_NPM-NEXT:  entry:
 ; IS__TUNIT_NPM-NEXT:    br label [[LOOP:%.*]]
 ; IS__TUNIT_NPM:       loop:
-; IS__TUNIT_NPM-NEXT:    [[P:%.*]] = phi i8* [ bitcast (i32* @a2 to i8*), [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ]
+; IS__TUNIT_NPM-NEXT:    [[P:%.*]] = phi i8* [ bitcast (i32* @a2 to i8*), [[ENTRY:%.*]] ], [ getelementptr (i8, i8* bitcast (i32* @a2 to i8*), i64 2), [[LOOP]] ]
 ; IS__TUNIT_NPM-NEXT:    [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ]
 ; IS__TUNIT_NPM-NEXT:    store i8 1, i8* [[P]], align 2
-; IS__TUNIT_NPM-NEXT:    [[G]] = getelementptr i8, i8* bitcast (i32* @a2 to i8*), i64 2
 ; IS__TUNIT_NPM-NEXT:    [[O]] = add nsw i8 [[I]], 1
 ; IS__TUNIT_NPM-NEXT:    [[C:%.*]] = icmp eq i8 [[O]], 7
 ; IS__TUNIT_NPM-NEXT:    br i1 [[C]], label [[END:%.*]], label [[LOOP]]
@@ -2760,14 +3132,13 @@ define i8 @phi_no_store_2() {
 ;
 ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind
 ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@phi_no_store_2
-; IS__CGSCC_OPM-SAME: () #[[ATTR8]] {
+; IS__CGSCC_OPM-SAME: () #[[ATTR9]] {
 ; IS__CGSCC_OPM-NEXT:  entry:
 ; IS__CGSCC_OPM-NEXT:    br label [[LOOP:%.*]]
 ; IS__CGSCC_OPM:       loop:
-; IS__CGSCC_OPM-NEXT:    [[P:%.*]] = phi i8* [ bitcast (i32* @a2 to i8*), [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ]
+; IS__CGSCC_OPM-NEXT:    [[P:%.*]] = phi i8* [ bitcast (i32* @a2 to i8*), [[ENTRY:%.*]] ], [ getelementptr (i8, i8* bitcast (i32* @a2 to i8*), i64 2), [[LOOP]] ]
 ; IS__CGSCC_OPM-NEXT:    [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ]
 ; IS__CGSCC_OPM-NEXT:    store i8 1, i8* [[P]], align 2
-; IS__CGSCC_OPM-NEXT:    [[G]] = getelementptr i8, i8* bitcast (i32* @a2 to i8*), i64 2
 ; IS__CGSCC_OPM-NEXT:    [[O]] = add nsw i8 [[I]], 1
 ; IS__CGSCC_OPM-NEXT:    [[C:%.*]] = icmp eq i8 [[O]], 7
 ; IS__CGSCC_OPM-NEXT:    br i1 [[C]], label [[END:%.*]], label [[LOOP]]
@@ -2782,10 +3153,9 @@ define i8 @phi_no_store_2() {
 ; IS__CGSCC_NPM-NEXT:  entry:
 ; IS__CGSCC_NPM-NEXT:    br label [[LOOP:%.*]]
 ; IS__CGSCC_NPM:       loop:
-; IS__CGSCC_NPM-NEXT:    [[P:%.*]] = phi i8* [ bitcast (i32* @a2 to i8*), [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ]
+; IS__CGSCC_NPM-NEXT:    [[P:%.*]] = phi i8* [ bitcast (i32* @a2 to i8*), [[ENTRY:%.*]] ], [ getelementptr (i8, i8* bitcast (i32* @a2 to i8*), i64 2), [[LOOP]] ]
 ; IS__CGSCC_NPM-NEXT:    [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ]
 ; IS__CGSCC_NPM-NEXT:    store i8 1, i8* [[P]], align 2
-; IS__CGSCC_NPM-NEXT:    [[G]] = getelementptr i8, i8* bitcast (i32* @a2 to i8*), i64 2
 ; IS__CGSCC_NPM-NEXT:    [[O]] = add nsw i8 [[I]], 1
 ; IS__CGSCC_NPM-NEXT:    [[C:%.*]] = icmp eq i8 [[O]], 7
 ; IS__CGSCC_NPM-NEXT:    br i1 [[C]], label [[END:%.*]], label [[LOOP]]
@@ -2817,13 +3187,12 @@ end:
 define i8 @phi_no_store_3() {
 ; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind writeonly
 ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@phi_no_store_3
-; IS__TUNIT_OPM-SAME: () #[[ATTR7]] {
+; IS__TUNIT_OPM-SAME: () #[[ATTR9:[0-9]+]] {
 ; IS__TUNIT_OPM-NEXT:  entry:
 ; IS__TUNIT_OPM-NEXT:    br label [[LOOP:%.*]]
 ; IS__TUNIT_OPM:       loop:
-; IS__TUNIT_OPM-NEXT:    [[P:%.*]] = phi i8* [ bitcast (i32* @a3 to i8*), [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ]
+; IS__TUNIT_OPM-NEXT:    [[P:%.*]] = phi i8* [ bitcast (i32* @a3 to i8*), [[ENTRY:%.*]] ], [ getelementptr (i8, i8* bitcast (i32* @a3 to i8*), i64 2), [[LOOP]] ]
 ; IS__TUNIT_OPM-NEXT:    [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ]
-; IS__TUNIT_OPM-NEXT:    [[G]] = getelementptr i8, i8* bitcast (i32* @a3 to i8*), i64 2
 ; IS__TUNIT_OPM-NEXT:    [[O]] = add nsw i8 [[I]], 1
 ; IS__TUNIT_OPM-NEXT:    [[C:%.*]] = icmp eq i8 [[O]], 7
 ; IS__TUNIT_OPM-NEXT:    br i1 [[C]], label [[END:%.*]], label [[LOOP]]
@@ -2836,9 +3205,8 @@ define i8 @phi_no_store_3() {
 ; IS__TUNIT_NPM-NEXT:  entry:
 ; IS__TUNIT_NPM-NEXT:    br label [[LOOP:%.*]]
 ; IS__TUNIT_NPM:       loop:
-; IS__TUNIT_NPM-NEXT:    [[P:%.*]] = phi i8* [ bitcast (i32* @a3 to i8*), [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ]
+; IS__TUNIT_NPM-NEXT:    [[P:%.*]] = phi i8* [ bitcast (i32* @a3 to i8*), [[ENTRY:%.*]] ], [ getelementptr (i8, i8* bitcast (i32* @a3 to i8*), i64 2), [[LOOP]] ]
 ; IS__TUNIT_NPM-NEXT:    [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ]
-; IS__TUNIT_NPM-NEXT:    [[G]] = getelementptr i8, i8* bitcast (i32* @a3 to i8*), i64 2
 ; IS__TUNIT_NPM-NEXT:    [[O]] = add nsw i8 [[I]], 1
 ; IS__TUNIT_NPM-NEXT:    [[C:%.*]] = icmp eq i8 [[O]], 7
 ; IS__TUNIT_NPM-NEXT:    br i1 [[C]], label [[END:%.*]], label [[LOOP]]
@@ -2847,13 +3215,12 @@ define i8 @phi_no_store_3() {
 ;
 ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind writeonly
 ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@phi_no_store_3
-; IS__CGSCC_OPM-SAME: () #[[ATTR9:[0-9]+]] {
+; IS__CGSCC_OPM-SAME: () #[[ATTR10:[0-9]+]] {
 ; IS__CGSCC_OPM-NEXT:  entry:
 ; IS__CGSCC_OPM-NEXT:    br label [[LOOP:%.*]]
 ; IS__CGSCC_OPM:       loop:
-; IS__CGSCC_OPM-NEXT:    [[P:%.*]] = phi i8* [ bitcast (i32* @a3 to i8*), [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ]
+; IS__CGSCC_OPM-NEXT:    [[P:%.*]] = phi i8* [ bitcast (i32* @a3 to i8*), [[ENTRY:%.*]] ], [ getelementptr (i8, i8* bitcast (i32* @a3 to i8*), i64 2), [[LOOP]] ]
 ; IS__CGSCC_OPM-NEXT:    [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ]
-; IS__CGSCC_OPM-NEXT:    [[G]] = getelementptr i8, i8* bitcast (i32* @a3 to i8*), i64 2
 ; IS__CGSCC_OPM-NEXT:    [[O]] = add nsw i8 [[I]], 1
 ; IS__CGSCC_OPM-NEXT:    [[C:%.*]] = icmp eq i8 [[O]], 7
 ; IS__CGSCC_OPM-NEXT:    br i1 [[C]], label [[END:%.*]], label [[LOOP]]
@@ -2866,9 +3233,8 @@ define i8 @phi_no_store_3() {
 ; IS__CGSCC_NPM-NEXT:  entry:
 ; IS__CGSCC_NPM-NEXT:    br label [[LOOP:%.*]]
 ; IS__CGSCC_NPM:       loop:
-; IS__CGSCC_NPM-NEXT:    [[P:%.*]] = phi i8* [ bitcast (i32* @a3 to i8*), [[ENTRY:%.*]] ], [ [[G:%.*]], [[LOOP]] ]
+; IS__CGSCC_NPM-NEXT:    [[P:%.*]] = phi i8* [ bitcast (i32* @a3 to i8*), [[ENTRY:%.*]] ], [ getelementptr (i8, i8* bitcast (i32* @a3 to i8*), i64 2), [[LOOP]] ]
 ; IS__CGSCC_NPM-NEXT:    [[I:%.*]] = phi i8 [ 0, [[ENTRY]] ], [ [[O:%.*]], [[LOOP]] ]
-; IS__CGSCC_NPM-NEXT:    [[G]] = getelementptr i8, i8* bitcast (i32* @a3 to i8*), i64 2
 ; IS__CGSCC_NPM-NEXT:    [[O]] = add nsw i8 [[I]], 1
 ; IS__CGSCC_NPM-NEXT:    [[C:%.*]] = icmp eq i8 [[O]], 7
 ; IS__CGSCC_NPM-NEXT:    br i1 [[C]], label [[END:%.*]], label [[LOOP]]
@@ -2955,24 +3321,39 @@ define i64 @cast_and_load_2() {
 
 define void @recursive_load_store(i64 %N, i32 %v) {
 ;
-; IS__TUNIT____: Function Attrs: nofree norecurse nosync nounwind writeonly
-; IS__TUNIT____-LABEL: define {{[^@]+}}@recursive_load_store
-; IS__TUNIT____-SAME: (i64 [[N:%.*]], i32 [[V:%.*]]) #[[ATTR7:[0-9]+]] {
-; IS__TUNIT____-NEXT:  entry:
-; IS__TUNIT____-NEXT:    br label [[FOR_COND:%.*]]
-; IS__TUNIT____:       for.cond:
-; IS__TUNIT____-NEXT:    [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_BODY:%.*]] ], [ 0, [[ENTRY:%.*]] ]
-; IS__TUNIT____-NEXT:    [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], [[N]]
-; IS__TUNIT____-NEXT:    br i1 [[EXITCOND]], label [[FOR_BODY]], label [[FOR_END:%.*]]
-; IS__TUNIT____:       for.body:
-; IS__TUNIT____-NEXT:    [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
-; IS__TUNIT____-NEXT:    br label [[FOR_COND]]
-; IS__TUNIT____:       for.end:
-; IS__TUNIT____-NEXT:    ret void
+; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind writeonly
+; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@recursive_load_store
+; IS__TUNIT_OPM-SAME: (i64 [[N:%.*]], i32 [[V:%.*]]) #[[ATTR9]] {
+; IS__TUNIT_OPM-NEXT:  entry:
+; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND:%.*]]
+; IS__TUNIT_OPM:       for.cond:
+; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_BODY:%.*]] ], [ 0, [[ENTRY:%.*]] ]
+; IS__TUNIT_OPM-NEXT:    [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], [[N]]
+; IS__TUNIT_OPM-NEXT:    br i1 [[EXITCOND]], label [[FOR_BODY]], label [[FOR_END:%.*]]
+; IS__TUNIT_OPM:       for.body:
+; IS__TUNIT_OPM-NEXT:    [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
+; IS__TUNIT_OPM-NEXT:    br label [[FOR_COND]]
+; IS__TUNIT_OPM:       for.end:
+; IS__TUNIT_OPM-NEXT:    ret void
+;
+; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind writeonly
+; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@recursive_load_store
+; IS__TUNIT_NPM-SAME: (i64 [[N:%.*]], i32 [[V:%.*]]) #[[ATTR7:[0-9]+]] {
+; IS__TUNIT_NPM-NEXT:  entry:
+; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND:%.*]]
+; IS__TUNIT_NPM:       for.cond:
+; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV:%.*]] = phi i64 [ [[INDVARS_IV_NEXT:%.*]], [[FOR_BODY:%.*]] ], [ 0, [[ENTRY:%.*]] ]
+; IS__TUNIT_NPM-NEXT:    [[EXITCOND:%.*]] = icmp ne i64 [[INDVARS_IV]], [[N]]
+; IS__TUNIT_NPM-NEXT:    br i1 [[EXITCOND]], label [[FOR_BODY]], label [[FOR_END:%.*]]
+; IS__TUNIT_NPM:       for.body:
+; IS__TUNIT_NPM-NEXT:    [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1
+; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND]]
+; IS__TUNIT_NPM:       for.end:
+; IS__TUNIT_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind writeonly
 ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@recursive_load_store
-; IS__CGSCC_OPM-SAME: (i64 [[N:%.*]], i32 [[V:%.*]]) #[[ATTR9]] {
+; IS__CGSCC_OPM-SAME: (i64 [[N:%.*]], i32 [[V:%.*]]) #[[ATTR10]] {
 ; IS__CGSCC_OPM-NEXT:  entry:
 ; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND:%.*]]
 ; IS__CGSCC_OPM:       for.cond:
@@ -3022,15 +3403,15 @@ for.end:
 }
 
 define dso_local i32 @round_trip_malloc(i32 %x) {
-; IS________OPM-LABEL: define {{[^@]+}}@round_trip_malloc
-; IS________OPM-SAME: (i32 [[X:%.*]]) {
-; IS________OPM-NEXT:  entry:
-; IS________OPM-NEXT:    [[CALL:%.*]] = call noalias i8* @malloc(i64 noundef 4) #[[ATTR16:[0-9]+]]
-; IS________OPM-NEXT:    [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32*
-; IS________OPM-NEXT:    store i32 [[X]], i32* [[TMP0]], align 4
-; IS________OPM-NEXT:    [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4
-; IS________OPM-NEXT:    call void @free(i8* noundef [[CALL]]) #[[ATTR16]]
-; IS________OPM-NEXT:    ret i32 [[TMP1]]
+; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@round_trip_malloc
+; IS__TUNIT_OPM-SAME: (i32 [[X:%.*]]) {
+; IS__TUNIT_OPM-NEXT:  entry:
+; IS__TUNIT_OPM-NEXT:    [[CALL:%.*]] = call noalias i8* @malloc(i64 noundef 4) #[[ATTR16:[0-9]+]]
+; IS__TUNIT_OPM-NEXT:    [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32*
+; IS__TUNIT_OPM-NEXT:    store i32 [[X]], i32* [[TMP0]], align 4
+; IS__TUNIT_OPM-NEXT:    [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4
+; IS__TUNIT_OPM-NEXT:    call void @free(i8* noundef [[CALL]]) #[[ATTR16]]
+; IS__TUNIT_OPM-NEXT:    ret i32 [[TMP1]]
 ;
 ; IS________NPM-LABEL: define {{[^@]+}}@round_trip_malloc
 ; IS________NPM-SAME: (i32 returned [[X:%.*]]) {
@@ -3040,6 +3421,16 @@ define dso_local i32 @round_trip_malloc(i32 %x) {
 ; IS________NPM-NEXT:    store i32 [[X]], i32* [[TMP1]], align 4
 ; IS________NPM-NEXT:    ret i32 [[X]]
 ;
+; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@round_trip_malloc
+; IS__CGSCC_OPM-SAME: (i32 [[X:%.*]]) {
+; IS__CGSCC_OPM-NEXT:  entry:
+; IS__CGSCC_OPM-NEXT:    [[CALL:%.*]] = call noalias i8* @malloc(i64 noundef 4) #[[ATTR18:[0-9]+]]
+; IS__CGSCC_OPM-NEXT:    [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32*
+; IS__CGSCC_OPM-NEXT:    store i32 [[X]], i32* [[TMP0]], align 4
+; IS__CGSCC_OPM-NEXT:    [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4
+; IS__CGSCC_OPM-NEXT:    call void @free(i8* noundef [[CALL]]) #[[ATTR18]]
+; IS__CGSCC_OPM-NEXT:    ret i32 [[TMP1]]
+;
 entry:
   %call = call noalias i8* @malloc(i64 4) norecurse
   %0 = bitcast i8* %call to i32*
@@ -3051,19 +3442,28 @@ entry:
 }
 
 define dso_local i32 @round_trip_malloc_constant() {
-; IS________OPM-LABEL: define {{[^@]+}}@round_trip_malloc_constant() {
-; IS________OPM-NEXT:  entry:
-; IS________OPM-NEXT:    [[CALL:%.*]] = call noalias i8* @malloc(i64 noundef 4) #[[ATTR16]]
-; IS________OPM-NEXT:    [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32*
-; IS________OPM-NEXT:    store i32 7, i32* [[TMP0]], align 4
-; IS________OPM-NEXT:    [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4
-; IS________OPM-NEXT:    call void @free(i8* noundef [[CALL]]) #[[ATTR16]]
-; IS________OPM-NEXT:    ret i32 [[TMP1]]
+; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@round_trip_malloc_constant() {
+; IS__TUNIT_OPM-NEXT:  entry:
+; IS__TUNIT_OPM-NEXT:    [[CALL:%.*]] = call noalias i8* @malloc(i64 noundef 4) #[[ATTR16]]
+; IS__TUNIT_OPM-NEXT:    [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32*
+; IS__TUNIT_OPM-NEXT:    store i32 7, i32* [[TMP0]], align 4
+; IS__TUNIT_OPM-NEXT:    [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4
+; IS__TUNIT_OPM-NEXT:    call void @free(i8* noundef [[CALL]]) #[[ATTR16]]
+; IS__TUNIT_OPM-NEXT:    ret i32 [[TMP1]]
 ;
 ; IS________NPM-LABEL: define {{[^@]+}}@round_trip_malloc_constant() {
 ; IS________NPM-NEXT:  entry:
 ; IS________NPM-NEXT:    ret i32 7
 ;
+; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@round_trip_malloc_constant() {
+; IS__CGSCC_OPM-NEXT:  entry:
+; IS__CGSCC_OPM-NEXT:    [[CALL:%.*]] = call noalias i8* @malloc(i64 noundef 4) #[[ATTR18]]
+; IS__CGSCC_OPM-NEXT:    [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32*
+; IS__CGSCC_OPM-NEXT:    store i32 7, i32* [[TMP0]], align 4
+; IS__CGSCC_OPM-NEXT:    [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4
+; IS__CGSCC_OPM-NEXT:    call void @free(i8* noundef [[CALL]]) #[[ATTR18]]
+; IS__CGSCC_OPM-NEXT:    ret i32 [[TMP1]]
+;
 entry:
   %call = call noalias i8* @malloc(i64 4) norecurse
   %0 = bitcast i8* %call to i32*
@@ -3079,19 +3479,19 @@ declare noalias i8* @malloc(i64)
 declare void @free(i8*)
 
 define dso_local i32 @conditional_malloc(i32 %x) {
-; IS________OPM-LABEL: define {{[^@]+}}@conditional_malloc
-; IS________OPM-SAME: (i32 [[X:%.*]]) {
-; IS________OPM-NEXT:  entry:
-; IS________OPM-NEXT:    [[CALL:%.*]] = call noalias i8* @malloc(i64 noundef 4) #[[ATTR16]]
-; IS________OPM-NEXT:    [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32*
-; IS________OPM-NEXT:    [[TOBOOL:%.*]] = icmp ne i32 [[X]], 0
-; IS________OPM-NEXT:    br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
-; IS________OPM:       if.then:
-; IS________OPM-NEXT:    store i32 [[X]], i32* [[TMP0]], align 4
-; IS________OPM-NEXT:    br label [[IF_END]]
-; IS________OPM:       if.end:
-; IS________OPM-NEXT:    [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4
-; IS________OPM-NEXT:    ret i32 [[TMP1]]
+; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@conditional_malloc
+; IS__TUNIT_OPM-SAME: (i32 [[X:%.*]]) {
+; IS__TUNIT_OPM-NEXT:  entry:
+; IS__TUNIT_OPM-NEXT:    [[CALL:%.*]] = call noalias i8* @malloc(i64 noundef 4) #[[ATTR16]]
+; IS__TUNIT_OPM-NEXT:    [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32*
+; IS__TUNIT_OPM-NEXT:    [[TOBOOL:%.*]] = icmp ne i32 [[X]], 0
+; IS__TUNIT_OPM-NEXT:    br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
+; IS__TUNIT_OPM:       if.then:
+; IS__TUNIT_OPM-NEXT:    store i32 [[X]], i32* [[TMP0]], align 4
+; IS__TUNIT_OPM-NEXT:    br label [[IF_END]]
+; IS__TUNIT_OPM:       if.end:
+; IS__TUNIT_OPM-NEXT:    [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4
+; IS__TUNIT_OPM-NEXT:    ret i32 [[TMP1]]
 ;
 ; IS________NPM-LABEL: define {{[^@]+}}@conditional_malloc
 ; IS________NPM-SAME: (i32 returned [[X:%.*]]) {
@@ -3106,6 +3506,20 @@ define dso_local i32 @conditional_malloc(i32 %x) {
 ; IS________NPM:       if.end:
 ; IS________NPM-NEXT:    ret i32 [[X]]
 ;
+; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@conditional_malloc
+; IS__CGSCC_OPM-SAME: (i32 [[X:%.*]]) {
+; IS__CGSCC_OPM-NEXT:  entry:
+; IS__CGSCC_OPM-NEXT:    [[CALL:%.*]] = call noalias i8* @malloc(i64 noundef 4) #[[ATTR18]]
+; IS__CGSCC_OPM-NEXT:    [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32*
+; IS__CGSCC_OPM-NEXT:    [[TOBOOL:%.*]] = icmp ne i32 [[X]], 0
+; IS__CGSCC_OPM-NEXT:    br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
+; IS__CGSCC_OPM:       if.then:
+; IS__CGSCC_OPM-NEXT:    store i32 [[X]], i32* [[TMP0]], align 4
+; IS__CGSCC_OPM-NEXT:    br label [[IF_END]]
+; IS__CGSCC_OPM:       if.end:
+; IS__CGSCC_OPM-NEXT:    [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4
+; IS__CGSCC_OPM-NEXT:    ret i32 [[TMP1]]
+;
 entry:
   %call = call noalias i8* @malloc(i64 4) norecurse
   %0 = bitcast i8* %call to i32*
@@ -3122,14 +3536,14 @@ if.end:                                           ; preds = %if.then, %entry
 }
 
 define dso_local i32 @round_trip_calloc(i32 %x) {
-; IS________OPM-LABEL: define {{[^@]+}}@round_trip_calloc
-; IS________OPM-SAME: (i32 [[X:%.*]]) {
-; IS________OPM-NEXT:  entry:
-; IS________OPM-NEXT:    [[CALL:%.*]] = call noalias i8* @calloc(i64 noundef 4, i64 noundef 1) #[[ATTR16]]
-; IS________OPM-NEXT:    [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32*
-; IS________OPM-NEXT:    store i32 [[X]], i32* [[TMP0]], align 4
-; IS________OPM-NEXT:    [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4
-; IS________OPM-NEXT:    ret i32 [[TMP1]]
+; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@round_trip_calloc
+; IS__TUNIT_OPM-SAME: (i32 [[X:%.*]]) {
+; IS__TUNIT_OPM-NEXT:  entry:
+; IS__TUNIT_OPM-NEXT:    [[CALL:%.*]] = call noalias i8* @calloc(i64 noundef 4, i64 noundef 1) #[[ATTR16]]
+; IS__TUNIT_OPM-NEXT:    [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32*
+; IS__TUNIT_OPM-NEXT:    store i32 [[X]], i32* [[TMP0]], align 4
+; IS__TUNIT_OPM-NEXT:    [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4
+; IS__TUNIT_OPM-NEXT:    ret i32 [[TMP1]]
 ;
 ; IS________NPM-LABEL: define {{[^@]+}}@round_trip_calloc
 ; IS________NPM-SAME: (i32 [[X:%.*]]) {
@@ -3141,6 +3555,15 @@ define dso_local i32 @round_trip_calloc(i32 %x) {
 ; IS________NPM-NEXT:    [[TMP2:%.*]] = load i32, i32* [[TMP1]], align 4
 ; IS________NPM-NEXT:    ret i32 [[TMP2]]
 ;
+; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@round_trip_calloc
+; IS__CGSCC_OPM-SAME: (i32 [[X:%.*]]) {
+; IS__CGSCC_OPM-NEXT:  entry:
+; IS__CGSCC_OPM-NEXT:    [[CALL:%.*]] = call noalias i8* @calloc(i64 noundef 4, i64 noundef 1) #[[ATTR18]]
+; IS__CGSCC_OPM-NEXT:    [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32*
+; IS__CGSCC_OPM-NEXT:    store i32 [[X]], i32* [[TMP0]], align 4
+; IS__CGSCC_OPM-NEXT:    [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4
+; IS__CGSCC_OPM-NEXT:    ret i32 [[TMP1]]
+;
 entry:
   %call = call noalias i8* @calloc(i64 4, i64 1) norecurse
   %0 = bitcast i8* %call to i32*
@@ -3150,13 +3573,13 @@ entry:
 }
 
 define dso_local i32 @round_trip_calloc_constant() {
-; IS________OPM-LABEL: define {{[^@]+}}@round_trip_calloc_constant() {
-; IS________OPM-NEXT:  entry:
-; IS________OPM-NEXT:    [[CALL:%.*]] = call noalias i8* @calloc(i64 noundef 4, i64 noundef 1) #[[ATTR16]]
-; IS________OPM-NEXT:    [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32*
-; IS________OPM-NEXT:    store i32 11, i32* [[TMP0]], align 4
-; IS________OPM-NEXT:    [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4
-; IS________OPM-NEXT:    ret i32 [[TMP1]]
+; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@round_trip_calloc_constant() {
+; IS__TUNIT_OPM-NEXT:  entry:
+; IS__TUNIT_OPM-NEXT:    [[CALL:%.*]] = call noalias i8* @calloc(i64 noundef 4, i64 noundef 1) #[[ATTR16]]
+; IS__TUNIT_OPM-NEXT:    [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32*
+; IS__TUNIT_OPM-NEXT:    store i32 11, i32* [[TMP0]], align 4
+; IS__TUNIT_OPM-NEXT:    [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4
+; IS__TUNIT_OPM-NEXT:    ret i32 [[TMP1]]
 ;
 ; IS________NPM-LABEL: define {{[^@]+}}@round_trip_calloc_constant() {
 ; IS________NPM-NEXT:  entry:
@@ -3167,6 +3590,14 @@ define dso_local i32 @round_trip_calloc_constant() {
 ; IS________NPM-NEXT:    [[TMP2:%.*]] = load i32, i32* [[TMP1]], align 4
 ; IS________NPM-NEXT:    ret i32 [[TMP2]]
 ;
+; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@round_trip_calloc_constant() {
+; IS__CGSCC_OPM-NEXT:  entry:
+; IS__CGSCC_OPM-NEXT:    [[CALL:%.*]] = call noalias i8* @calloc(i64 noundef 4, i64 noundef 1) #[[ATTR18]]
+; IS__CGSCC_OPM-NEXT:    [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32*
+; IS__CGSCC_OPM-NEXT:    store i32 11, i32* [[TMP0]], align 4
+; IS__CGSCC_OPM-NEXT:    [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4
+; IS__CGSCC_OPM-NEXT:    ret i32 [[TMP1]]
+;
 entry:
   %call = call noalias i8* @calloc(i64 4, i64 1) norecurse
   %0 = bitcast i8* %call to i32*
@@ -3178,21 +3609,21 @@ entry:
 declare noalias i8* @calloc(i64, i64)
 
 define dso_local i32 @conditional_calloc(i32 %x) {
-; IS________OPM-LABEL: define {{[^@]+}}@conditional_calloc
-; IS________OPM-SAME: (i32 [[X:%.*]]) {
-; IS________OPM-NEXT:  entry:
-; IS________OPM-NEXT:    [[CALL:%.*]] = call noalias i8* @calloc(i64 noundef 1, i64 noundef 4) #[[ATTR16]]
-; IS________OPM-NEXT:    [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32*
-; IS________OPM-NEXT:    [[TOBOOL:%.*]] = icmp ne i32 [[X]], 0
-; IS________OPM-NEXT:    br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
-; IS________OPM:       if.then:
-; IS________OPM-NEXT:    store i32 [[X]], i32* [[TMP0]], align 4
-; IS________OPM-NEXT:    br label [[IF_END]]
-; IS________OPM:       if.end:
-; IS________OPM-NEXT:    [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4
-; IS________OPM-NEXT:    [[TMP2:%.*]] = bitcast i32* [[TMP0]] to i8*
-; IS________OPM-NEXT:    call void @free(i8* [[TMP2]]) #[[ATTR16]]
-; IS________OPM-NEXT:    ret i32 [[TMP1]]
+; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@conditional_calloc
+; IS__TUNIT_OPM-SAME: (i32 [[X:%.*]]) {
+; IS__TUNIT_OPM-NEXT:  entry:
+; IS__TUNIT_OPM-NEXT:    [[CALL:%.*]] = call noalias i8* @calloc(i64 noundef 1, i64 noundef 4) #[[ATTR16]]
+; IS__TUNIT_OPM-NEXT:    [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32*
+; IS__TUNIT_OPM-NEXT:    [[TOBOOL:%.*]] = icmp ne i32 [[X]], 0
+; IS__TUNIT_OPM-NEXT:    br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
+; IS__TUNIT_OPM:       if.then:
+; IS__TUNIT_OPM-NEXT:    store i32 [[X]], i32* [[TMP0]], align 4
+; IS__TUNIT_OPM-NEXT:    br label [[IF_END]]
+; IS__TUNIT_OPM:       if.end:
+; IS__TUNIT_OPM-NEXT:    [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4
+; IS__TUNIT_OPM-NEXT:    [[TMP2:%.*]] = bitcast i32* [[TMP0]] to i8*
+; IS__TUNIT_OPM-NEXT:    call void @free(i8* [[TMP2]]) #[[ATTR16]]
+; IS__TUNIT_OPM-NEXT:    ret i32 [[TMP1]]
 ;
 ; IS________NPM-LABEL: define {{[^@]+}}@conditional_calloc
 ; IS________NPM-SAME: (i32 [[X:%.*]]) {
@@ -3207,8 +3638,25 @@ define dso_local i32 @conditional_calloc(i32 %x) {
 ; IS________NPM-NEXT:    br label [[IF_END]]
 ; IS________NPM:       if.end:
 ; IS________NPM-NEXT:    [[TMP2:%.*]] = load i32, i32* [[TMP1]], align 4
+; IS________NPM-NEXT:    [[TMP3:%.*]] = bitcast i32* [[TMP1]] to i8*
 ; IS________NPM-NEXT:    ret i32 [[TMP2]]
 ;
+; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@conditional_calloc
+; IS__CGSCC_OPM-SAME: (i32 [[X:%.*]]) {
+; IS__CGSCC_OPM-NEXT:  entry:
+; IS__CGSCC_OPM-NEXT:    [[CALL:%.*]] = call noalias i8* @calloc(i64 noundef 1, i64 noundef 4) #[[ATTR18]]
+; IS__CGSCC_OPM-NEXT:    [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32*
+; IS__CGSCC_OPM-NEXT:    [[TOBOOL:%.*]] = icmp ne i32 [[X]], 0
+; IS__CGSCC_OPM-NEXT:    br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
+; IS__CGSCC_OPM:       if.then:
+; IS__CGSCC_OPM-NEXT:    store i32 [[X]], i32* [[TMP0]], align 4
+; IS__CGSCC_OPM-NEXT:    br label [[IF_END]]
+; IS__CGSCC_OPM:       if.end:
+; IS__CGSCC_OPM-NEXT:    [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4
+; IS__CGSCC_OPM-NEXT:    [[TMP2:%.*]] = bitcast i32* [[TMP0]] to i8*
+; IS__CGSCC_OPM-NEXT:    call void @free(i8* [[TMP2]]) #[[ATTR18]]
+; IS__CGSCC_OPM-NEXT:    ret i32 [[TMP1]]
+;
 entry:
   %call = call noalias i8* @calloc(i64 1, i64 4) norecurse
   %0 = bitcast i8* %call to i32*
@@ -3227,32 +3675,49 @@ if.end:                                           ; preds = %if.then, %entry
 }
 
 define dso_local i32 @conditional_calloc_zero(i1 %c) {
-; IS________OPM-LABEL: define {{[^@]+}}@conditional_calloc_zero
-; IS________OPM-SAME: (i1 [[C:%.*]]) {
-; IS________OPM-NEXT:  entry:
-; IS________OPM-NEXT:    [[CALL:%.*]] = call noalias i8* @calloc(i64 noundef 1, i64 noundef 4) #[[ATTR16]]
-; IS________OPM-NEXT:    [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32*
-; IS________OPM-NEXT:    br i1 [[C]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
-; IS________OPM:       if.then:
-; IS________OPM-NEXT:    store i32 0, i32* [[TMP0]], align 4
-; IS________OPM-NEXT:    br label [[IF_END]]
-; IS________OPM:       if.end:
-; IS________OPM-NEXT:    [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4
-; IS________OPM-NEXT:    [[TMP2:%.*]] = bitcast i32* [[TMP0]] to i8*
-; IS________OPM-NEXT:    call void @free(i8* [[TMP2]]) #[[ATTR16]]
-; IS________OPM-NEXT:    ret i32 [[TMP1]]
+; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@conditional_calloc_zero
+; IS__TUNIT_OPM-SAME: (i1 [[C:%.*]]) {
+; IS__TUNIT_OPM-NEXT:  entry:
+; IS__TUNIT_OPM-NEXT:    [[CALL:%.*]] = call noalias i8* @calloc(i64 noundef 1, i64 noundef 4) #[[ATTR16]]
+; IS__TUNIT_OPM-NEXT:    [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32*
+; IS__TUNIT_OPM-NEXT:    br i1 [[C]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
+; IS__TUNIT_OPM:       if.then:
+; IS__TUNIT_OPM-NEXT:    store i32 0, i32* [[TMP0]], align 4
+; IS__TUNIT_OPM-NEXT:    br label [[IF_END]]
+; IS__TUNIT_OPM:       if.end:
+; IS__TUNIT_OPM-NEXT:    [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4
+; IS__TUNIT_OPM-NEXT:    [[TMP2:%.*]] = bitcast i32* [[TMP0]] to i8*
+; IS__TUNIT_OPM-NEXT:    call void @free(i8* [[TMP2]]) #[[ATTR16]]
+; IS__TUNIT_OPM-NEXT:    ret i32 [[TMP1]]
 ;
 ; IS________NPM-LABEL: define {{[^@]+}}@conditional_calloc_zero
 ; IS________NPM-SAME: (i1 [[C:%.*]]) {
 ; IS________NPM-NEXT:  entry:
 ; IS________NPM-NEXT:    [[TMP0:%.*]] = alloca i8, i64 4, align 1
 ; IS________NPM-NEXT:    call void @llvm.memset.p0i8.i64(i8* [[TMP0]], i8 0, i64 4, i1 false)
+; IS________NPM-NEXT:    [[TMP1:%.*]] = bitcast i8* [[TMP0]] to i32*
 ; IS________NPM-NEXT:    br i1 [[C]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
 ; IS________NPM:       if.then:
 ; IS________NPM-NEXT:    br label [[IF_END]]
 ; IS________NPM:       if.end:
+; IS________NPM-NEXT:    [[TMP2:%.*]] = bitcast i32* [[TMP1]] to i8*
 ; IS________NPM-NEXT:    ret i32 0
 ;
+; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@conditional_calloc_zero
+; IS__CGSCC_OPM-SAME: (i1 [[C:%.*]]) {
+; IS__CGSCC_OPM-NEXT:  entry:
+; IS__CGSCC_OPM-NEXT:    [[CALL:%.*]] = call noalias i8* @calloc(i64 noundef 1, i64 noundef 4) #[[ATTR18]]
+; IS__CGSCC_OPM-NEXT:    [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32*
+; IS__CGSCC_OPM-NEXT:    br i1 [[C]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
+; IS__CGSCC_OPM:       if.then:
+; IS__CGSCC_OPM-NEXT:    store i32 0, i32* [[TMP0]], align 4
+; IS__CGSCC_OPM-NEXT:    br label [[IF_END]]
+; IS__CGSCC_OPM:       if.end:
+; IS__CGSCC_OPM-NEXT:    [[TMP1:%.*]] = load i32, i32* [[TMP0]], align 4
+; IS__CGSCC_OPM-NEXT:    [[TMP2:%.*]] = bitcast i32* [[TMP0]] to i8*
+; IS__CGSCC_OPM-NEXT:    call void @free(i8* [[TMP2]]) #[[ATTR18]]
+; IS__CGSCC_OPM-NEXT:    ret i32 [[TMP1]]
+;
 entry:
   %call = call noalias i8* @calloc(i64 1, i64 4) norecurse
   %0 = bitcast i8* %call to i32*
@@ -3270,13 +3735,13 @@ if.end:                                           ; preds = %if.then, %entry
 }
 
 define dso_local i32* @malloc_like(i32 %s) {
-; NOT_TUNIT_NPM-LABEL: define {{[^@]+}}@malloc_like
-; NOT_TUNIT_NPM-SAME: (i32 [[S:%.*]]) {
-; NOT_TUNIT_NPM-NEXT:  entry:
-; NOT_TUNIT_NPM-NEXT:    [[CONV:%.*]] = sext i32 [[S]] to i64
-; NOT_TUNIT_NPM-NEXT:    [[CALL:%.*]] = call noalias i8* @malloc(i64 [[CONV]]) #[[ATTR16:[0-9]+]]
-; NOT_TUNIT_NPM-NEXT:    [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32*
-; NOT_TUNIT_NPM-NEXT:    ret i32* [[TMP0]]
+; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@malloc_like
+; IS__TUNIT_OPM-SAME: (i32 [[S:%.*]]) {
+; IS__TUNIT_OPM-NEXT:  entry:
+; IS__TUNIT_OPM-NEXT:    [[CONV:%.*]] = sext i32 [[S]] to i64
+; IS__TUNIT_OPM-NEXT:    [[CALL:%.*]] = call noalias i8* @malloc(i64 [[CONV]]) #[[ATTR16]]
+; IS__TUNIT_OPM-NEXT:    [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32*
+; IS__TUNIT_OPM-NEXT:    ret i32* [[TMP0]]
 ;
 ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@malloc_like
 ; IS__TUNIT_NPM-SAME: (i32 [[S:%.*]]) {
@@ -3286,6 +3751,22 @@ define dso_local i32* @malloc_like(i32 %s) {
 ; IS__TUNIT_NPM-NEXT:    [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32*
 ; IS__TUNIT_NPM-NEXT:    ret i32* [[TMP0]]
 ;
+; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@malloc_like
+; IS__CGSCC_OPM-SAME: (i32 [[S:%.*]]) {
+; IS__CGSCC_OPM-NEXT:  entry:
+; IS__CGSCC_OPM-NEXT:    [[CONV:%.*]] = sext i32 [[S]] to i64
+; IS__CGSCC_OPM-NEXT:    [[CALL:%.*]] = call noalias i8* @malloc(i64 [[CONV]]) #[[ATTR18]]
+; IS__CGSCC_OPM-NEXT:    [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32*
+; IS__CGSCC_OPM-NEXT:    ret i32* [[TMP0]]
+;
+; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@malloc_like
+; IS__CGSCC_NPM-SAME: (i32 [[S:%.*]]) {
+; IS__CGSCC_NPM-NEXT:  entry:
+; IS__CGSCC_NPM-NEXT:    [[CONV:%.*]] = sext i32 [[S]] to i64
+; IS__CGSCC_NPM-NEXT:    [[CALL:%.*]] = call noalias i8* @malloc(i64 [[CONV]]) #[[ATTR17:[0-9]+]]
+; IS__CGSCC_NPM-NEXT:    [[TMP0:%.*]] = bitcast i8* [[CALL]] to i32*
+; IS__CGSCC_NPM-NEXT:    ret i32* [[TMP0]]
+;
 entry:
   %conv = sext i32 %s to i64
   %call = call noalias i8* @malloc(i64 %conv) norecurse
@@ -3294,15 +3775,15 @@ entry:
 }
 
 define dso_local i32 @round_trip_malloc_like(i32 %x) {
-; IS________OPM-LABEL: define {{[^@]+}}@round_trip_malloc_like
-; IS________OPM-SAME: (i32 [[X:%.*]]) {
-; IS________OPM-NEXT:  entry:
-; IS________OPM-NEXT:    [[CALL:%.*]] = call i32* @malloc_like(i32 noundef 4) #[[ATTR16]]
-; IS________OPM-NEXT:    store i32 [[X]], i32* [[CALL]], align 4
-; IS________OPM-NEXT:    [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4
-; IS________OPM-NEXT:    [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8*
-; IS________OPM-NEXT:    call void @free(i8* noundef [[TMP1]]) #[[ATTR16]]
-; IS________OPM-NEXT:    ret i32 [[TMP0]]
+; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@round_trip_malloc_like
+; IS__TUNIT_OPM-SAME: (i32 [[X:%.*]]) {
+; IS__TUNIT_OPM-NEXT:  entry:
+; IS__TUNIT_OPM-NEXT:    [[CALL:%.*]] = call i32* @malloc_like(i32 noundef 4) #[[ATTR16]]
+; IS__TUNIT_OPM-NEXT:    store i32 [[X]], i32* [[CALL]], align 4
+; IS__TUNIT_OPM-NEXT:    [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4
+; IS__TUNIT_OPM-NEXT:    [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8*
+; IS__TUNIT_OPM-NEXT:    call void @free(i8* noundef [[TMP1]]) #[[ATTR16]]
+; IS__TUNIT_OPM-NEXT:    ret i32 [[TMP0]]
 ;
 ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@round_trip_malloc_like
 ; IS__TUNIT_NPM-SAME: (i32 [[X:%.*]]) {
@@ -3311,17 +3792,27 @@ define dso_local i32 @round_trip_malloc_like(i32 %x) {
 ; IS__TUNIT_NPM-NEXT:    store i32 [[X]], i32* [[CALL]], align 4
 ; IS__TUNIT_NPM-NEXT:    [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4
 ; IS__TUNIT_NPM-NEXT:    [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8*
-; IS__TUNIT_NPM-NEXT:    call void @free(i8* noundef nonnull [[TMP1]]) #[[ATTR14]]
+; IS__TUNIT_NPM-NEXT:    call void @free(i8* noundef [[TMP1]]) #[[ATTR14]]
 ; IS__TUNIT_NPM-NEXT:    ret i32 [[TMP0]]
 ;
+; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@round_trip_malloc_like
+; IS__CGSCC_OPM-SAME: (i32 [[X:%.*]]) {
+; IS__CGSCC_OPM-NEXT:  entry:
+; IS__CGSCC_OPM-NEXT:    [[CALL:%.*]] = call i32* @malloc_like(i32 noundef 4) #[[ATTR18]]
+; IS__CGSCC_OPM-NEXT:    store i32 [[X]], i32* [[CALL]], align 4
+; IS__CGSCC_OPM-NEXT:    [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4
+; IS__CGSCC_OPM-NEXT:    [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8*
+; IS__CGSCC_OPM-NEXT:    call void @free(i8* noundef [[TMP1]]) #[[ATTR18]]
+; IS__CGSCC_OPM-NEXT:    ret i32 [[TMP0]]
+;
 ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@round_trip_malloc_like
 ; IS__CGSCC_NPM-SAME: (i32 [[X:%.*]]) {
 ; IS__CGSCC_NPM-NEXT:  entry:
-; IS__CGSCC_NPM-NEXT:    [[CALL:%.*]] = call i32* @malloc_like(i32 noundef 4) #[[ATTR16]]
+; IS__CGSCC_NPM-NEXT:    [[CALL:%.*]] = call i32* @malloc_like(i32 noundef 4) #[[ATTR17]]
 ; IS__CGSCC_NPM-NEXT:    store i32 [[X]], i32* [[CALL]], align 4
 ; IS__CGSCC_NPM-NEXT:    [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4
 ; IS__CGSCC_NPM-NEXT:    [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8*
-; IS__CGSCC_NPM-NEXT:    call void @free(i8* noundef nonnull [[TMP1]]) #[[ATTR16]]
+; IS__CGSCC_NPM-NEXT:    call void @free(i8* noundef [[TMP1]]) #[[ATTR17]]
 ; IS__CGSCC_NPM-NEXT:    ret i32 [[TMP0]]
 ;
 entry:
@@ -3334,15 +3825,15 @@ entry:
 }
 
 define dso_local i32 @round_trip_unknown_alloc(i32 %x) {
-; IS________OPM-LABEL: define {{[^@]+}}@round_trip_unknown_alloc
-; IS________OPM-SAME: (i32 [[X:%.*]]) {
-; IS________OPM-NEXT:  entry:
-; IS________OPM-NEXT:    [[CALL:%.*]] = call i32* @unknown_alloc(i32 noundef 4) #[[ATTR16]]
-; IS________OPM-NEXT:    store i32 [[X]], i32* [[CALL]], align 4
-; IS________OPM-NEXT:    [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4
-; IS________OPM-NEXT:    [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8*
-; IS________OPM-NEXT:    call void @free(i8* noundef [[TMP1]]) #[[ATTR16]]
-; IS________OPM-NEXT:    ret i32 [[TMP0]]
+; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@round_trip_unknown_alloc
+; IS__TUNIT_OPM-SAME: (i32 [[X:%.*]]) {
+; IS__TUNIT_OPM-NEXT:  entry:
+; IS__TUNIT_OPM-NEXT:    [[CALL:%.*]] = call i32* @unknown_alloc(i32 noundef 4) #[[ATTR16]]
+; IS__TUNIT_OPM-NEXT:    store i32 [[X]], i32* [[CALL]], align 4
+; IS__TUNIT_OPM-NEXT:    [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4
+; IS__TUNIT_OPM-NEXT:    [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8*
+; IS__TUNIT_OPM-NEXT:    call void @free(i8* noundef [[TMP1]]) #[[ATTR16]]
+; IS__TUNIT_OPM-NEXT:    ret i32 [[TMP0]]
 ;
 ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@round_trip_unknown_alloc
 ; IS__TUNIT_NPM-SAME: (i32 [[X:%.*]]) {
@@ -3351,17 +3842,27 @@ define dso_local i32 @round_trip_unknown_alloc(i32 %x) {
 ; IS__TUNIT_NPM-NEXT:    store i32 [[X]], i32* [[CALL]], align 4
 ; IS__TUNIT_NPM-NEXT:    [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4
 ; IS__TUNIT_NPM-NEXT:    [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8*
-; IS__TUNIT_NPM-NEXT:    call void @free(i8* noundef nonnull [[TMP1]]) #[[ATTR14]]
+; IS__TUNIT_NPM-NEXT:    call void @free(i8* noundef [[TMP1]]) #[[ATTR14]]
 ; IS__TUNIT_NPM-NEXT:    ret i32 [[TMP0]]
 ;
+; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@round_trip_unknown_alloc
+; IS__CGSCC_OPM-SAME: (i32 [[X:%.*]]) {
+; IS__CGSCC_OPM-NEXT:  entry:
+; IS__CGSCC_OPM-NEXT:    [[CALL:%.*]] = call i32* @unknown_alloc(i32 noundef 4) #[[ATTR18]]
+; IS__CGSCC_OPM-NEXT:    store i32 [[X]], i32* [[CALL]], align 4
+; IS__CGSCC_OPM-NEXT:    [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4
+; IS__CGSCC_OPM-NEXT:    [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8*
+; IS__CGSCC_OPM-NEXT:    call void @free(i8* noundef [[TMP1]]) #[[ATTR18]]
+; IS__CGSCC_OPM-NEXT:    ret i32 [[TMP0]]
+;
 ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@round_trip_unknown_alloc
 ; IS__CGSCC_NPM-SAME: (i32 [[X:%.*]]) {
 ; IS__CGSCC_NPM-NEXT:  entry:
-; IS__CGSCC_NPM-NEXT:    [[CALL:%.*]] = call i32* @unknown_alloc(i32 noundef 4) #[[ATTR16]]
+; IS__CGSCC_NPM-NEXT:    [[CALL:%.*]] = call i32* @unknown_alloc(i32 noundef 4) #[[ATTR17]]
 ; IS__CGSCC_NPM-NEXT:    store i32 [[X]], i32* [[CALL]], align 4
 ; IS__CGSCC_NPM-NEXT:    [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4
 ; IS__CGSCC_NPM-NEXT:    [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8*
-; IS__CGSCC_NPM-NEXT:    call void @free(i8* noundef nonnull [[TMP1]]) #[[ATTR16]]
+; IS__CGSCC_NPM-NEXT:    call void @free(i8* noundef [[TMP1]]) #[[ATTR17]]
 ; IS__CGSCC_NPM-NEXT:    ret i32 [[TMP0]]
 ;
 entry:
@@ -3376,20 +3877,20 @@ entry:
 declare noalias i32* @unknown_alloc(i32)
 
 define dso_local i32 @conditional_unknown_alloc(i32 %x) {
-; IS________OPM-LABEL: define {{[^@]+}}@conditional_unknown_alloc
-; IS________OPM-SAME: (i32 [[X:%.*]]) {
-; IS________OPM-NEXT:  entry:
-; IS________OPM-NEXT:    [[CALL:%.*]] = call noalias i32* @unknown_alloc(i32 noundef 4) #[[ATTR16]]
-; IS________OPM-NEXT:    [[TOBOOL:%.*]] = icmp ne i32 [[X]], 0
-; IS________OPM-NEXT:    br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
-; IS________OPM:       if.then:
-; IS________OPM-NEXT:    store i32 [[X]], i32* [[CALL]], align 4
-; IS________OPM-NEXT:    br label [[IF_END]]
-; IS________OPM:       if.end:
-; IS________OPM-NEXT:    [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4
-; IS________OPM-NEXT:    [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8*
-; IS________OPM-NEXT:    call void @free(i8* [[TMP1]]) #[[ATTR16]]
-; IS________OPM-NEXT:    ret i32 [[TMP0]]
+; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@conditional_unknown_alloc
+; IS__TUNIT_OPM-SAME: (i32 [[X:%.*]]) {
+; IS__TUNIT_OPM-NEXT:  entry:
+; IS__TUNIT_OPM-NEXT:    [[CALL:%.*]] = call noalias i32* @unknown_alloc(i32 noundef 4) #[[ATTR16]]
+; IS__TUNIT_OPM-NEXT:    [[TOBOOL:%.*]] = icmp ne i32 [[X]], 0
+; IS__TUNIT_OPM-NEXT:    br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
+; IS__TUNIT_OPM:       if.then:
+; IS__TUNIT_OPM-NEXT:    store i32 [[X]], i32* [[CALL]], align 4
+; IS__TUNIT_OPM-NEXT:    br label [[IF_END]]
+; IS__TUNIT_OPM:       if.end:
+; IS__TUNIT_OPM-NEXT:    [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4
+; IS__TUNIT_OPM-NEXT:    [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8*
+; IS__TUNIT_OPM-NEXT:    call void @free(i8* [[TMP1]]) #[[ATTR16]]
+; IS__TUNIT_OPM-NEXT:    ret i32 [[TMP0]]
 ;
 ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@conditional_unknown_alloc
 ; IS__TUNIT_NPM-SAME: (i32 [[X:%.*]]) {
@@ -3403,13 +3904,28 @@ define dso_local i32 @conditional_unknown_alloc(i32 %x) {
 ; IS__TUNIT_NPM:       if.end:
 ; IS__TUNIT_NPM-NEXT:    [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4
 ; IS__TUNIT_NPM-NEXT:    [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8*
-; IS__TUNIT_NPM-NEXT:    call void @free(i8* nonnull [[TMP1]]) #[[ATTR14]]
+; IS__TUNIT_NPM-NEXT:    call void @free(i8* [[TMP1]]) #[[ATTR14]]
 ; IS__TUNIT_NPM-NEXT:    ret i32 [[TMP0]]
 ;
+; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@conditional_unknown_alloc
+; IS__CGSCC_OPM-SAME: (i32 [[X:%.*]]) {
+; IS__CGSCC_OPM-NEXT:  entry:
+; IS__CGSCC_OPM-NEXT:    [[CALL:%.*]] = call noalias i32* @unknown_alloc(i32 noundef 4) #[[ATTR18]]
+; IS__CGSCC_OPM-NEXT:    [[TOBOOL:%.*]] = icmp ne i32 [[X]], 0
+; IS__CGSCC_OPM-NEXT:    br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
+; IS__CGSCC_OPM:       if.then:
+; IS__CGSCC_OPM-NEXT:    store i32 [[X]], i32* [[CALL]], align 4
+; IS__CGSCC_OPM-NEXT:    br label [[IF_END]]
+; IS__CGSCC_OPM:       if.end:
+; IS__CGSCC_OPM-NEXT:    [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4
+; IS__CGSCC_OPM-NEXT:    [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8*
+; IS__CGSCC_OPM-NEXT:    call void @free(i8* [[TMP1]]) #[[ATTR18]]
+; IS__CGSCC_OPM-NEXT:    ret i32 [[TMP0]]
+;
 ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@conditional_unknown_alloc
 ; IS__CGSCC_NPM-SAME: (i32 [[X:%.*]]) {
 ; IS__CGSCC_NPM-NEXT:  entry:
-; IS__CGSCC_NPM-NEXT:    [[CALL:%.*]] = call noalias i32* @unknown_alloc(i32 noundef 4) #[[ATTR16]]
+; IS__CGSCC_NPM-NEXT:    [[CALL:%.*]] = call noalias i32* @unknown_alloc(i32 noundef 4) #[[ATTR17]]
 ; IS__CGSCC_NPM-NEXT:    [[TOBOOL:%.*]] = icmp ne i32 [[X]], 0
 ; IS__CGSCC_NPM-NEXT:    br i1 [[TOBOOL]], label [[IF_END:%.*]], label [[IF_THEN:%.*]]
 ; IS__CGSCC_NPM:       if.then:
@@ -3418,7 +3934,7 @@ define dso_local i32 @conditional_unknown_alloc(i32 %x) {
 ; IS__CGSCC_NPM:       if.end:
 ; IS__CGSCC_NPM-NEXT:    [[TMP0:%.*]] = load i32, i32* [[CALL]], align 4
 ; IS__CGSCC_NPM-NEXT:    [[TMP1:%.*]] = bitcast i32* [[CALL]] to i8*
-; IS__CGSCC_NPM-NEXT:    call void @free(i8* nonnull [[TMP1]]) #[[ATTR16]]
+; IS__CGSCC_NPM-NEXT:    call void @free(i8* [[TMP1]]) #[[ATTR17]]
 ; IS__CGSCC_NPM-NEXT:    ret i32 [[TMP0]]
 ;
 entry:
@@ -3447,38 +3963,32 @@ define dso_local void @test_nested_memory(float* %dst, double* %src) {
 ; IS__TUNIT_OPM-SAME: (float* nocapture nofree writeonly [[DST:%.*]], double* nocapture nofree readonly [[SRC:%.*]]) {
 ; IS__TUNIT_OPM-NEXT:  entry:
 ; IS__TUNIT_OPM-NEXT:    [[LOCAL:%.*]] = alloca [[STRUCT_STY:%.*]], align 8
+; IS__TUNIT_OPM-NEXT:    [[TMP0:%.*]] = bitcast %struct.STy* [[LOCAL]] to i8*
 ; IS__TUNIT_OPM-NEXT:    [[INNER:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[LOCAL]], i64 0, i32 2
-; IS__TUNIT_OPM-NEXT:    store %struct.STy* @global, %struct.STy** [[INNER]], align 8
 ; IS__TUNIT_OPM-NEXT:    [[CALL:%.*]] = call noalias dereferenceable_or_null(24) i8* @malloc(i64 noundef 24)
 ; IS__TUNIT_OPM-NEXT:    [[DST1:%.*]] = bitcast i8* [[CALL]] to float**
 ; IS__TUNIT_OPM-NEXT:    store float* [[DST]], float** [[DST1]], align 8
 ; IS__TUNIT_OPM-NEXT:    [[SRC2:%.*]] = getelementptr inbounds i8, i8* [[CALL]], i64 8
-; IS__TUNIT_OPM-NEXT:    [[TMP0:%.*]] = bitcast i8* [[SRC2]] to double**
-; IS__TUNIT_OPM-NEXT:    store double* [[SRC]], double** [[TMP0]], align 8
+; IS__TUNIT_OPM-NEXT:    [[TMP1:%.*]] = bitcast i8* [[SRC2]] to double**
+; IS__TUNIT_OPM-NEXT:    store double* [[SRC]], double** [[TMP1]], align 8
 ; IS__TUNIT_OPM-NEXT:    store i8* [[CALL]], i8** bitcast (%struct.STy** getelementptr inbounds ([[STRUCT_STY]], %struct.STy* @global, i64 0, i32 2) to i8**), align 8
-; IS__TUNIT_OPM-NEXT:    call fastcc void @nested_memory_callee(%struct.STy* noalias nocapture nofree noundef nonnull readonly align 8 dereferenceable(24) [[LOCAL]]) #[[ATTR17:[0-9]+]]
+; IS__TUNIT_OPM-NEXT:    call fastcc void @nested_memory_callee() #[[ATTR17:[0-9]+]]
 ; IS__TUNIT_OPM-NEXT:    ret void
 ;
 ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@test_nested_memory
 ; IS__TUNIT_NPM-SAME: (float* nocapture nofree writeonly [[DST:%.*]], double* nocapture nofree readonly [[SRC:%.*]]) {
 ; IS__TUNIT_NPM-NEXT:  entry:
 ; IS__TUNIT_NPM-NEXT:    [[LOCAL:%.*]] = alloca [[STRUCT_STY:%.*]], align 8
+; IS__TUNIT_NPM-NEXT:    [[TMP0:%.*]] = bitcast %struct.STy* [[LOCAL]] to i8*
 ; IS__TUNIT_NPM-NEXT:    [[INNER:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[LOCAL]], i64 0, i32 2
-; IS__TUNIT_NPM-NEXT:    store %struct.STy* @global, %struct.STy** [[INNER]], align 8
-; IS__TUNIT_NPM-NEXT:    [[TMP0:%.*]] = alloca i8, i64 24, align 1
-; IS__TUNIT_NPM-NEXT:    [[DST1:%.*]] = bitcast i8* [[TMP0]] to float**
+; IS__TUNIT_NPM-NEXT:    [[TMP1:%.*]] = alloca i8, i64 24, align 1
+; IS__TUNIT_NPM-NEXT:    [[DST1:%.*]] = bitcast i8* [[TMP1]] to float**
 ; IS__TUNIT_NPM-NEXT:    store float* [[DST]], float** [[DST1]], align 8
-; IS__TUNIT_NPM-NEXT:    [[SRC2:%.*]] = getelementptr inbounds i8, i8* [[TMP0]], i64 8
-; IS__TUNIT_NPM-NEXT:    [[TMP1:%.*]] = bitcast i8* [[SRC2]] to double**
-; IS__TUNIT_NPM-NEXT:    store double* [[SRC]], double** [[TMP1]], align 8
-; IS__TUNIT_NPM-NEXT:    store i8* [[TMP0]], i8** bitcast (%struct.STy** getelementptr inbounds ([[STRUCT_STY]], %struct.STy* @global, i64 0, i32 2) to i8**), align 8
-; IS__TUNIT_NPM-NEXT:    [[LOCAL_CAST:%.*]] = bitcast %struct.STy* [[LOCAL]] to float**
-; IS__TUNIT_NPM-NEXT:    [[TMP2:%.*]] = load float*, float** [[LOCAL_CAST]], align 8
-; IS__TUNIT_NPM-NEXT:    [[LOCAL_0_1:%.*]] = getelementptr [[STRUCT_STY]], %struct.STy* [[LOCAL]], i64 0, i32 1
-; IS__TUNIT_NPM-NEXT:    [[TMP3:%.*]] = load double*, double** [[LOCAL_0_1]], align 8
-; IS__TUNIT_NPM-NEXT:    [[LOCAL_0_2:%.*]] = getelementptr [[STRUCT_STY]], %struct.STy* [[LOCAL]], i64 0, i32 2
-; IS__TUNIT_NPM-NEXT:    [[TMP4:%.*]] = load %struct.STy*, %struct.STy** [[LOCAL_0_2]], align 8
-; IS__TUNIT_NPM-NEXT:    call fastcc void @nested_memory_callee(float* [[TMP2]], double* [[TMP3]], %struct.STy* [[TMP4]]) #[[ATTR15:[0-9]+]]
+; IS__TUNIT_NPM-NEXT:    [[SRC2:%.*]] = getelementptr inbounds i8, i8* [[TMP1]], i64 8
+; IS__TUNIT_NPM-NEXT:    [[TMP2:%.*]] = bitcast i8* [[SRC2]] to double**
+; IS__TUNIT_NPM-NEXT:    store double* [[SRC]], double** [[TMP2]], align 8
+; IS__TUNIT_NPM-NEXT:    store i8* [[TMP1]], i8** bitcast (%struct.STy** getelementptr inbounds ([[STRUCT_STY]], %struct.STy* @global, i64 0, i32 2) to i8**), align 8
+; IS__TUNIT_NPM-NEXT:    call fastcc void @nested_memory_callee() #[[ATTR15:[0-9]+]]
 ; IS__TUNIT_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@test_nested_memory
@@ -3495,7 +4005,7 @@ define dso_local void @test_nested_memory(float* %dst, double* %src) {
 ; IS__CGSCC_OPM-NEXT:    [[TMP1:%.*]] = bitcast i8* [[SRC2]] to double**
 ; IS__CGSCC_OPM-NEXT:    store double* [[SRC]], double** [[TMP1]], align 8
 ; IS__CGSCC_OPM-NEXT:    store i8* [[CALL]], i8** bitcast (%struct.STy** getelementptr inbounds ([[STRUCT_STY]], %struct.STy* @global, i64 0, i32 2) to i8**), align 8
-; IS__CGSCC_OPM-NEXT:    call fastcc void @nested_memory_callee(%struct.STy* noalias nocapture nofree noundef nonnull readonly align 8 dereferenceable(24) [[LOCAL]]) #[[ATTR15]]
+; IS__CGSCC_OPM-NEXT:    call fastcc void @nested_memory_callee(%struct.STy* noalias nocapture nofree noundef nonnull readonly align 8 dereferenceable(24) [[LOCAL]]) #[[ATTR17]]
 ; IS__CGSCC_OPM-NEXT:    ret void
 ;
 ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@test_nested_memory
@@ -3511,7 +4021,7 @@ define dso_local void @test_nested_memory(float* %dst, double* %src) {
 ; IS__CGSCC_NPM-NEXT:    [[TMP1:%.*]] = bitcast i8* [[SRC2]] to double**
 ; IS__CGSCC_NPM-NEXT:    store double* [[SRC]], double** [[TMP1]], align 8
 ; IS__CGSCC_NPM-NEXT:    store i8* [[CALL]], i8** bitcast (%struct.STy** getelementptr inbounds ([[STRUCT_STY]], %struct.STy* @global, i64 0, i32 2) to i8**), align 8
-; IS__CGSCC_NPM-NEXT:    call fastcc void @nested_memory_callee(float* nofree nonnull align 4294967296 undef, double* nofree nonnull align 4294967296 undef, %struct.STy* nofree nonnull align 8 @global) #[[ATTR15]]
+; IS__CGSCC_NPM-NEXT:    call fastcc void @nested_memory_callee(float* nofree nonnull align 4294967296 undef, double* nofree nonnull align 4294967296 undef, %struct.STy* nofree noundef nonnull align 8 dereferenceable(24) @global) #[[ATTR16]]
 ; IS__CGSCC_NPM-NEXT:    ret void
 ;
 entry:
@@ -3533,48 +4043,35 @@ entry:
 define internal fastcc void @nested_memory_callee(%struct.STy* nocapture readonly %S) nofree norecurse nounwind uwtable {
 ; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn uwtable
 ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@nested_memory_callee
-; IS__TUNIT_OPM-SAME: (%struct.STy* noalias nocapture nofree noundef nonnull readonly align 8 dereferenceable(24) [[S:%.*]]) #[[ATTR9:[0-9]+]] {
+; IS__TUNIT_OPM-SAME: () #[[ATTR10:[0-9]+]] {
 ; IS__TUNIT_OPM-NEXT:  entry:
-; IS__TUNIT_OPM-NEXT:    [[INNER:%.*]] = getelementptr inbounds [[STRUCT_STY:%.*]], %struct.STy* [[S]], i64 0, i32 2
-; IS__TUNIT_OPM-NEXT:    [[TMP0:%.*]] = load %struct.STy*, %struct.STy** [[INNER]], align 8
-; IS__TUNIT_OPM-NEXT:    [[INNER1:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[TMP0]], i64 0, i32 2
-; IS__TUNIT_OPM-NEXT:    [[TMP1:%.*]] = load %struct.STy*, %struct.STy** [[INNER1]], align 8
-; IS__TUNIT_OPM-NEXT:    [[SRC:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[TMP1]], i64 0, i32 1
-; IS__TUNIT_OPM-NEXT:    [[TMP2:%.*]] = load double*, double** [[SRC]], align 8
-; IS__TUNIT_OPM-NEXT:    [[TMP3:%.*]] = load double, double* [[TMP2]], align 8
-; IS__TUNIT_OPM-NEXT:    [[CONV:%.*]] = fptrunc double [[TMP3]] to float
-; IS__TUNIT_OPM-NEXT:    [[DST:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[TMP1]], i64 0, i32 0
-; IS__TUNIT_OPM-NEXT:    [[TMP4:%.*]] = load float*, float** [[DST]], align 8
-; IS__TUNIT_OPM-NEXT:    store float [[CONV]], float* [[TMP4]], align 4
+; IS__TUNIT_OPM-NEXT:    [[TMP0:%.*]] = load %struct.STy*, %struct.STy** getelementptr inbounds ([[STRUCT_STY:%.*]], %struct.STy* @global, i64 0, i32 2), align 8
+; IS__TUNIT_OPM-NEXT:    [[SRC:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[TMP0]], i64 0, i32 1
+; IS__TUNIT_OPM-NEXT:    [[TMP1:%.*]] = load double*, double** [[SRC]], align 8
+; IS__TUNIT_OPM-NEXT:    [[TMP2:%.*]] = load double, double* [[TMP1]], align 8
+; IS__TUNIT_OPM-NEXT:    [[CONV:%.*]] = fptrunc double [[TMP2]] to float
+; IS__TUNIT_OPM-NEXT:    [[DST:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[TMP0]], i64 0, i32 0
+; IS__TUNIT_OPM-NEXT:    [[TMP3:%.*]] = load float*, float** [[DST]], align 8
+; IS__TUNIT_OPM-NEXT:    store float [[CONV]], float* [[TMP3]], align 4
 ; IS__TUNIT_OPM-NEXT:    ret void
 ;
 ; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind willreturn uwtable
 ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@nested_memory_callee
-; IS__TUNIT_NPM-SAME: (float* [[TMP0:%.*]], double* [[TMP1:%.*]], %struct.STy* [[TMP2:%.*]]) #[[ATTR8:[0-9]+]] {
+; IS__TUNIT_NPM-SAME: () #[[ATTR8:[0-9]+]] {
 ; IS__TUNIT_NPM-NEXT:  entry:
-; IS__TUNIT_NPM-NEXT:    [[S_PRIV:%.*]] = alloca [[STRUCT_STY:%.*]], align 8
-; IS__TUNIT_NPM-NEXT:    [[S_PRIV_CAST:%.*]] = bitcast %struct.STy* [[S_PRIV]] to float**
-; IS__TUNIT_NPM-NEXT:    store float* [[TMP0]], float** [[S_PRIV_CAST]], align 8
-; IS__TUNIT_NPM-NEXT:    [[S_PRIV_0_1:%.*]] = getelementptr [[STRUCT_STY]], %struct.STy* [[S_PRIV]], i64 0, i32 1
-; IS__TUNIT_NPM-NEXT:    store double* [[TMP1]], double** [[S_PRIV_0_1]], align 8
-; IS__TUNIT_NPM-NEXT:    [[S_PRIV_0_2:%.*]] = getelementptr [[STRUCT_STY]], %struct.STy* [[S_PRIV]], i64 0, i32 2
-; IS__TUNIT_NPM-NEXT:    store %struct.STy* [[TMP2]], %struct.STy** [[S_PRIV_0_2]], align 8
-; IS__TUNIT_NPM-NEXT:    [[INNER:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[S_PRIV]], i64 0, i32 2
-; IS__TUNIT_NPM-NEXT:    [[TMP3:%.*]] = load %struct.STy*, %struct.STy** [[INNER]], align 8
-; IS__TUNIT_NPM-NEXT:    [[INNER1:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[TMP3]], i64 0, i32 2
-; IS__TUNIT_NPM-NEXT:    [[TMP4:%.*]] = load %struct.STy*, %struct.STy** [[INNER1]], align 8
-; IS__TUNIT_NPM-NEXT:    [[SRC:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[TMP4]], i64 0, i32 1
-; IS__TUNIT_NPM-NEXT:    [[TMP5:%.*]] = load double*, double** [[SRC]], align 8
-; IS__TUNIT_NPM-NEXT:    [[TMP6:%.*]] = load double, double* [[TMP5]], align 8
-; IS__TUNIT_NPM-NEXT:    [[CONV:%.*]] = fptrunc double [[TMP6]] to float
-; IS__TUNIT_NPM-NEXT:    [[DST:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[TMP4]], i64 0, i32 0
-; IS__TUNIT_NPM-NEXT:    [[TMP7:%.*]] = load float*, float** [[DST]], align 8
-; IS__TUNIT_NPM-NEXT:    store float [[CONV]], float* [[TMP7]], align 4
+; IS__TUNIT_NPM-NEXT:    [[TMP0:%.*]] = load %struct.STy*, %struct.STy** getelementptr inbounds ([[STRUCT_STY:%.*]], %struct.STy* @global, i64 0, i32 2), align 8
+; IS__TUNIT_NPM-NEXT:    [[SRC:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[TMP0]], i64 0, i32 1
+; IS__TUNIT_NPM-NEXT:    [[TMP1:%.*]] = load double*, double** [[SRC]], align 8
+; IS__TUNIT_NPM-NEXT:    [[TMP2:%.*]] = load double, double* [[TMP1]], align 8
+; IS__TUNIT_NPM-NEXT:    [[CONV:%.*]] = fptrunc double [[TMP2]] to float
+; IS__TUNIT_NPM-NEXT:    [[DST:%.*]] = getelementptr inbounds [[STRUCT_STY]], %struct.STy* [[TMP0]], i64 0, i32 0
+; IS__TUNIT_NPM-NEXT:    [[TMP3:%.*]] = load float*, float** [[DST]], align 8
+; IS__TUNIT_NPM-NEXT:    store float [[CONV]], float* [[TMP3]], align 4
 ; IS__TUNIT_NPM-NEXT:    ret void
 ;
 ; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind willreturn uwtable
 ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@nested_memory_callee
-; IS__CGSCC_OPM-SAME: (%struct.STy* noalias nocapture nofree noundef nonnull readonly align 8 dereferenceable(24) [[S:%.*]]) #[[ATTR10:[0-9]+]] {
+; IS__CGSCC_OPM-SAME: (%struct.STy* noalias nocapture nofree noundef nonnull readonly align 8 dereferenceable(24) [[S:%.*]]) #[[ATTR11:[0-9]+]] {
 ; IS__CGSCC_OPM-NEXT:  entry:
 ; IS__CGSCC_OPM-NEXT:    [[INNER:%.*]] = getelementptr inbounds [[STRUCT_STY:%.*]], %struct.STy* [[S]], i64 0, i32 2
 ; IS__CGSCC_OPM-NEXT:    [[TMP0:%.*]] = load %struct.STy*, %struct.STy** [[INNER]], align 8
@@ -3633,7 +4130,7 @@ entry:
 define hidden void @no_propagation_of_unknown_index_access(i32* %in, i32* %out, i32 %idx) #0 {
 ; IS__TUNIT_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind
 ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@no_propagation_of_unknown_index_access
-; IS__TUNIT_OPM-SAME: (i32* nocapture nofree readonly [[IN:%.*]], i32* nocapture nofree writeonly [[OUT:%.*]], i32 [[IDX:%.*]]) #[[ATTR10:[0-9]+]] {
+; IS__TUNIT_OPM-SAME: (i32* nocapture nofree readonly [[IN:%.*]], i32* nocapture nofree writeonly [[OUT:%.*]], i32 [[IDX:%.*]]) #[[ATTR11:[0-9]+]] {
 ; IS__TUNIT_OPM-NEXT:  entry:
 ; IS__TUNIT_OPM-NEXT:    [[BUF:%.*]] = alloca [128 x i32], align 16
 ; IS__TUNIT_OPM-NEXT:    [[TMP0:%.*]] = bitcast [128 x i32]* [[BUF]] to i8*
@@ -3717,8 +4214,9 @@ define hidden void @no_propagation_of_unknown_index_access(i32* %in, i32* %out,
 ; IS__TUNIT_NPM-NEXT:    [[INC16]] = add nsw i32 [[I3_0]], 1
 ; IS__TUNIT_NPM-NEXT:    br label [[FOR_COND4]], !llvm.loop [[TBAA12]]
 ;
+; IS__CGSCC_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind
 ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@no_propagation_of_unknown_index_access
-; IS__CGSCC_OPM-SAME: (i32* [[IN:%.*]], i32* [[OUT:%.*]], i32 [[IDX:%.*]]) {
+; IS__CGSCC_OPM-SAME: (i32* nocapture nofree readonly [[IN:%.*]], i32* nocapture nofree writeonly [[OUT:%.*]], i32 [[IDX:%.*]]) #[[ATTR12:[0-9]+]] {
 ; IS__CGSCC_OPM-NEXT:  entry:
 ; IS__CGSCC_OPM-NEXT:    [[BUF:%.*]] = alloca [128 x i32], align 16
 ; IS__CGSCC_OPM-NEXT:    [[TMP0:%.*]] = bitcast [128 x i32]* [[BUF]] to i8*
@@ -3743,7 +4241,7 @@ define hidden void @no_propagation_of_unknown_index_access(i32* %in, i32* %out,
 ; IS__CGSCC_OPM-NEXT:    [[CMP5:%.*]] = icmp slt i32 [[I3_0]], 128
 ; IS__CGSCC_OPM-NEXT:    br i1 [[CMP5]], label [[FOR_BODY7]], label [[FOR_COND_CLEANUP6:%.*]]
 ; IS__CGSCC_OPM:       for.cond.cleanup6:
-; IS__CGSCC_OPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 512, i8* nofree noundef nonnull align 16 dereferenceable(512) [[TMP0]])
+; IS__CGSCC_OPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 512, i8* nocapture nofree noundef nonnull align 16 dereferenceable(512) [[TMP0]])
 ; IS__CGSCC_OPM-NEXT:    ret void
 ; IS__CGSCC_OPM:       for.body7:
 ; IS__CGSCC_OPM-NEXT:    [[IDXPROM8:%.*]] = sext i32 [[I3_0]] to i64
@@ -3759,12 +4257,13 @@ define hidden void @no_propagation_of_unknown_index_access(i32* %in, i32* %out,
 ; IS__CGSCC_OPM-NEXT:    [[INC16]] = add nsw i32 [[I3_0]], 1
 ; IS__CGSCC_OPM-NEXT:    br label [[FOR_COND4]], !llvm.loop [[TBAA12]]
 ;
+; IS__CGSCC_NPM: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn
 ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@no_propagation_of_unknown_index_access
-; IS__CGSCC_NPM-SAME: (i32* [[IN:%.*]], i32* [[OUT:%.*]], i32 [[IDX:%.*]]) {
+; IS__CGSCC_NPM-SAME: (i32* nocapture nofree readonly [[IN:%.*]], i32* nocapture nofree writeonly [[OUT:%.*]], i32 [[IDX:%.*]]) #[[ATTR10:[0-9]+]] {
 ; IS__CGSCC_NPM-NEXT:  entry:
 ; IS__CGSCC_NPM-NEXT:    [[BUF:%.*]] = alloca [128 x i32], align 16
 ; IS__CGSCC_NPM-NEXT:    [[TMP0:%.*]] = bitcast [128 x i32]* [[BUF]] to i8*
-; IS__CGSCC_NPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 512, i8* nocapture nofree noundef nonnull align 16 dereferenceable(512) [[TMP0]]) #[[ATTR13]]
+; IS__CGSCC_NPM-NEXT:    call void @llvm.lifetime.start.p0i8(i64 noundef 512, i8* nocapture nofree noundef nonnull align 16 dereferenceable(512) [[TMP0]]) #[[ATTR14]]
 ; IS__CGSCC_NPM-NEXT:    br label [[FOR_COND:%.*]]
 ; IS__CGSCC_NPM:       for.cond:
 ; IS__CGSCC_NPM-NEXT:    [[I_0:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[INC:%.*]], [[FOR_BODY:%.*]] ]
@@ -3785,7 +4284,7 @@ define hidden void @no_propagation_of_unknown_index_access(i32* %in, i32* %out,
 ; IS__CGSCC_NPM-NEXT:    [[CMP5:%.*]] = icmp slt i32 [[I3_0]], 128
 ; IS__CGSCC_NPM-NEXT:    br i1 [[CMP5]], label [[FOR_BODY7]], label [[FOR_COND_CLEANUP6:%.*]]
 ; IS__CGSCC_NPM:       for.cond.cleanup6:
-; IS__CGSCC_NPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 512, i8* nofree noundef nonnull align 16 dereferenceable(512) [[TMP0]])
+; IS__CGSCC_NPM-NEXT:    call void @llvm.lifetime.end.p0i8(i64 noundef 512, i8* nocapture nofree noundef nonnull align 16 dereferenceable(512) [[TMP0]]) #[[ATTR14]]
 ; IS__CGSCC_NPM-NEXT:    ret void
 ; IS__CGSCC_NPM:       for.body7:
 ; IS__CGSCC_NPM-NEXT:    [[IDXPROM8:%.*]] = sext i32 [[I3_0]] to i64
@@ -3852,7 +4351,7 @@ for.body7:                                        ; preds = %for.cond4
 define internal i1 @alloca_non_unique(i32* %p, i32 %in, i1 %c) {
 ; IS__TUNIT_OPM: Function Attrs: argmemonly nofree nosync nounwind
 ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@alloca_non_unique
-; IS__TUNIT_OPM-SAME: (i32* nocapture nofree nonnull readonly align 4 [[P:%.*]], i32 [[IN:%.*]], i1 [[C:%.*]]) #[[ATTR11:[0-9]+]] {
+; IS__TUNIT_OPM-SAME: (i32* nocapture nofree nonnull readonly align 4 [[P:%.*]], i32 [[IN:%.*]], i1 [[C:%.*]]) #[[ATTR12:[0-9]+]] {
 ; IS__TUNIT_OPM-NEXT:    [[A:%.*]] = alloca i32, align 4
 ; IS__TUNIT_OPM-NEXT:    store i32 [[IN]], i32* [[A]], align 4
 ; IS__TUNIT_OPM-NEXT:    br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
@@ -3880,12 +4379,12 @@ define internal i1 @alloca_non_unique(i32* %p, i32 %in, i1 %c) {
 ;
 ; IS__CGSCC_OPM: Function Attrs: argmemonly nofree nosync nounwind
 ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@alloca_non_unique
-; IS__CGSCC_OPM-SAME: (i32* nocapture nofree nonnull readonly align 4 [[P:%.*]], i32 [[IN:%.*]], i1 [[C:%.*]]) #[[ATTR11:[0-9]+]] {
+; IS__CGSCC_OPM-SAME: (i32* nocapture nofree nonnull readonly align 4 [[P:%.*]], i32 [[IN:%.*]], i1 [[C:%.*]]) #[[ATTR13:[0-9]+]] {
 ; IS__CGSCC_OPM-NEXT:    [[A:%.*]] = alloca i32, align 4
 ; IS__CGSCC_OPM-NEXT:    store i32 [[IN]], i32* [[A]], align 4
 ; IS__CGSCC_OPM-NEXT:    br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
 ; IS__CGSCC_OPM:       t:
-; IS__CGSCC_OPM-NEXT:    [[R:%.*]] = call i1 @alloca_non_unique(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]], i32 noundef 42, i1 noundef false) #[[ATTR17:[0-9]+]]
+; IS__CGSCC_OPM-NEXT:    [[R:%.*]] = call i1 @alloca_non_unique(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]], i32 noundef 42, i1 noundef false) #[[ATTR19:[0-9]+]]
 ; IS__CGSCC_OPM-NEXT:    ret i1 [[R]]
 ; IS__CGSCC_OPM:       f:
 ; IS__CGSCC_OPM-NEXT:    [[L:%.*]] = load i32, i32* [[P]], align 4
@@ -3894,12 +4393,12 @@ define internal i1 @alloca_non_unique(i32* %p, i32 %in, i1 %c) {
 ;
 ; IS__CGSCC_NPM: Function Attrs: argmemonly nofree nosync nounwind
 ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@alloca_non_unique
-; IS__CGSCC_NPM-SAME: (i32* nocapture nofree nonnull readonly align 4 [[P:%.*]], i32 [[IN:%.*]], i1 [[C:%.*]]) #[[ATTR10:[0-9]+]] {
+; IS__CGSCC_NPM-SAME: (i32* nocapture nofree nonnull readonly align 4 [[P:%.*]], i32 [[IN:%.*]], i1 [[C:%.*]]) #[[ATTR11:[0-9]+]] {
 ; IS__CGSCC_NPM-NEXT:    [[A:%.*]] = alloca i32, align 4
 ; IS__CGSCC_NPM-NEXT:    store i32 [[IN]], i32* [[A]], align 4
 ; IS__CGSCC_NPM-NEXT:    br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
 ; IS__CGSCC_NPM:       t:
-; IS__CGSCC_NPM-NEXT:    [[R:%.*]] = call i1 @alloca_non_unique(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]], i32 noundef 42, i1 noundef false) #[[ATTR17:[0-9]+]]
+; IS__CGSCC_NPM-NEXT:    [[R:%.*]] = call i1 @alloca_non_unique(i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[A]], i32 noundef 42, i1 noundef false) #[[ATTR18:[0-9]+]]
 ; IS__CGSCC_NPM-NEXT:    ret i1 [[R]]
 ; IS__CGSCC_NPM:       f:
 ; IS__CGSCC_NPM-NEXT:    [[L:%.*]] = load i32, i32* [[P]], align 4
@@ -3922,7 +4421,7 @@ f:
 define i1 @alloca_non_unique_caller(i32 %in, i1 %c) {
 ; IS__TUNIT_OPM: Function Attrs: nofree norecurse nosync nounwind readnone
 ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@alloca_non_unique_caller
-; IS__TUNIT_OPM-SAME: (i32 [[IN:%.*]], i1 [[C:%.*]]) #[[ATTR12:[0-9]+]] {
+; IS__TUNIT_OPM-SAME: (i32 [[IN:%.*]], i1 [[C:%.*]]) #[[ATTR8]] {
 ; IS__TUNIT_OPM-NEXT:    [[R:%.*]] = call i1 @alloca_non_unique(i32* undef, i32 [[IN]], i1 [[C]]) #[[ATTR18]]
 ; IS__TUNIT_OPM-NEXT:    ret i1 [[R]]
 ;
@@ -3934,14 +4433,14 @@ define i1 @alloca_non_unique_caller(i32 %in, i1 %c) {
 ;
 ; IS__CGSCC_OPM: Function Attrs: nofree nosync nounwind readnone
 ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@alloca_non_unique_caller
-; IS__CGSCC_OPM-SAME: (i32 [[IN:%.*]], i1 [[C:%.*]]) #[[ATTR12:[0-9]+]] {
-; IS__CGSCC_OPM-NEXT:    [[R:%.*]] = call i1 @alloca_non_unique(i32* undef, i32 [[IN]], i1 [[C]]) #[[ATTR15]]
+; IS__CGSCC_OPM-SAME: (i32 [[IN:%.*]], i1 [[C:%.*]]) #[[ATTR14:[0-9]+]] {
+; IS__CGSCC_OPM-NEXT:    [[R:%.*]] = call i1 @alloca_non_unique(i32* undef, i32 [[IN]], i1 [[C]]) #[[ATTR17]]
 ; IS__CGSCC_OPM-NEXT:    ret i1 [[R]]
 ;
 ; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone
 ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@alloca_non_unique_caller
-; IS__CGSCC_NPM-SAME: (i32 [[IN:%.*]], i1 [[C:%.*]]) #[[ATTR11:[0-9]+]] {
-; IS__CGSCC_NPM-NEXT:    [[R:%.*]] = call i1 @alloca_non_unique(i32* undef, i32 [[IN]], i1 [[C]]) #[[ATTR15]]
+; IS__CGSCC_NPM-SAME: (i32 [[IN:%.*]], i1 [[C:%.*]]) #[[ATTR12:[0-9]+]] {
+; IS__CGSCC_NPM-NEXT:    [[R:%.*]] = call i1 @alloca_non_unique(i32* undef, i32 [[IN]], i1 [[C]]) #[[ATTR16]]
 ; IS__CGSCC_NPM-NEXT:    ret i1 [[R]]
 ;
   %r = call i1 @alloca_non_unique(i32* undef, i32 %in, i1 %c)
@@ -3991,12 +4490,12 @@ define i1 @alloca_non_unique_caller(i32 %in, i1 %c) {
 ; IS__TUNIT_OPM: attributes #[[ATTR4]] = { nofree norecurse nosync nounwind readnone willreturn }
 ; IS__TUNIT_OPM: attributes #[[ATTR5]] = { nofree norecurse nosync nounwind willreturn }
 ; IS__TUNIT_OPM: attributes #[[ATTR6]] = { nofree norecurse nosync nounwind willreturn writeonly }
-; IS__TUNIT_OPM: attributes #[[ATTR7]] = { nofree norecurse nosync nounwind writeonly }
-; IS__TUNIT_OPM: attributes #[[ATTR8]] = { nofree norecurse nosync nounwind readonly willreturn }
-; IS__TUNIT_OPM: attributes #[[ATTR9]] = { nofree norecurse nosync nounwind willreturn uwtable }
-; IS__TUNIT_OPM: attributes #[[ATTR10]] = { argmemonly nofree norecurse nosync nounwind }
-; IS__TUNIT_OPM: attributes #[[ATTR11]] = { argmemonly nofree nosync nounwind }
-; IS__TUNIT_OPM: attributes #[[ATTR12]] = { nofree norecurse nosync nounwind readnone }
+; IS__TUNIT_OPM: attributes #[[ATTR7]] = { nofree norecurse nosync nounwind readonly willreturn }
+; IS__TUNIT_OPM: attributes #[[ATTR8]] = { nofree norecurse nosync nounwind readnone }
+; IS__TUNIT_OPM: attributes #[[ATTR9]] = { nofree norecurse nosync nounwind writeonly }
+; IS__TUNIT_OPM: attributes #[[ATTR10]] = { nofree norecurse nosync nounwind willreturn uwtable }
+; IS__TUNIT_OPM: attributes #[[ATTR11]] = { argmemonly nofree norecurse nosync nounwind }
+; IS__TUNIT_OPM: attributes #[[ATTR12]] = { argmemonly nofree nosync nounwind }
 ; IS__TUNIT_OPM: attributes #[[ATTR13]] = { willreturn }
 ; IS__TUNIT_OPM: attributes #[[ATTR14]] = { nofree nosync nounwind willreturn writeonly }
 ; IS__TUNIT_OPM: attributes #[[ATTR15]] = { nofree nosync nounwind writeonly }
@@ -4030,16 +4529,18 @@ define i1 @alloca_non_unique_caller(i32 %in, i1 %c) {
 ; IS__CGSCC_OPM: attributes #[[ATTR5]] = { nofree nosync nounwind willreturn }
 ; IS__CGSCC_OPM: attributes #[[ATTR6]] = { nofree norecurse nosync nounwind readonly willreturn }
 ; IS__CGSCC_OPM: attributes #[[ATTR7]] = { nofree norecurse nosync nounwind willreturn writeonly }
-; IS__CGSCC_OPM: attributes #[[ATTR8]] = { nofree norecurse nosync nounwind }
-; IS__CGSCC_OPM: attributes #[[ATTR9]] = { nofree norecurse nosync nounwind writeonly }
-; IS__CGSCC_OPM: attributes #[[ATTR10]] = { nofree norecurse nosync nounwind willreturn uwtable }
-; IS__CGSCC_OPM: attributes #[[ATTR11]] = { argmemonly nofree nosync nounwind }
-; IS__CGSCC_OPM: attributes #[[ATTR12]] = { nofree nosync nounwind readnone }
-; IS__CGSCC_OPM: attributes #[[ATTR13]] = { willreturn }
-; IS__CGSCC_OPM: attributes #[[ATTR14]] = { nounwind willreturn writeonly }
-; IS__CGSCC_OPM: attributes #[[ATTR15]] = { nounwind }
-; IS__CGSCC_OPM: attributes #[[ATTR16]] = { norecurse }
-; IS__CGSCC_OPM: attributes #[[ATTR17]] = { nofree nosync nounwind }
+; IS__CGSCC_OPM: attributes #[[ATTR8]] = { nofree norecurse nosync nounwind readnone }
+; IS__CGSCC_OPM: attributes #[[ATTR9]] = { nofree norecurse nosync nounwind }
+; IS__CGSCC_OPM: attributes #[[ATTR10]] = { nofree norecurse nosync nounwind writeonly }
+; IS__CGSCC_OPM: attributes #[[ATTR11]] = { nofree norecurse nosync nounwind willreturn uwtable }
+; IS__CGSCC_OPM: attributes #[[ATTR12]] = { argmemonly nofree norecurse nosync nounwind }
+; IS__CGSCC_OPM: attributes #[[ATTR13]] = { argmemonly nofree nosync nounwind }
+; IS__CGSCC_OPM: attributes #[[ATTR14]] = { nofree nosync nounwind readnone }
+; IS__CGSCC_OPM: attributes #[[ATTR15]] = { willreturn }
+; IS__CGSCC_OPM: attributes #[[ATTR16]] = { nounwind willreturn writeonly }
+; IS__CGSCC_OPM: attributes #[[ATTR17]] = { nounwind }
+; IS__CGSCC_OPM: attributes #[[ATTR18]] = { norecurse }
+; IS__CGSCC_OPM: attributes #[[ATTR19]] = { nofree nosync nounwind }
 ;.
 ; IS__CGSCC_NPM: attributes #[[ATTR0]] = { argmemonly nofree norecurse nosync nounwind willreturn writeonly }
 ; IS__CGSCC_NPM: attributes #[[ATTR1]] = { argmemonly nofree nosync nounwind willreturn }
@@ -4051,78 +4552,46 @@ define i1 @alloca_non_unique_caller(i32 %in, i1 %c) {
 ; IS__CGSCC_NPM: attributes #[[ATTR7]] = { nofree norecurse nosync nounwind willreturn writeonly }
 ; IS__CGSCC_NPM: attributes #[[ATTR8]] = { nofree norecurse nosync nounwind writeonly }
 ; IS__CGSCC_NPM: attributes #[[ATTR9]] = { nofree norecurse nosync nounwind willreturn uwtable }
-; IS__CGSCC_NPM: attributes #[[ATTR10]] = { argmemonly nofree nosync nounwind }
-; IS__CGSCC_NPM: attributes #[[ATTR11]] = { nofree nosync nounwind readnone }
-; IS__CGSCC_NPM: attributes #[[ATTR12:[0-9]+]] = { argmemonly nofree nounwind willreturn writeonly }
-; IS__CGSCC_NPM: attributes #[[ATTR13]] = { willreturn }
-; IS__CGSCC_NPM: attributes #[[ATTR14]] = { nounwind willreturn writeonly }
-; IS__CGSCC_NPM: attributes #[[ATTR15]] = { nounwind }
-; IS__CGSCC_NPM: attributes #[[ATTR16]] = { norecurse }
-; IS__CGSCC_NPM: attributes #[[ATTR17]] = { nofree nosync nounwind }
-;.
-; IS__TUNIT____: [[META0:![0-9]+]] = !{i32 1, !"wchar_size", i32 4}
-; IS__TUNIT____: [[META1:![0-9]+]] = !{i32 7, !"uwtable", i32 1}
-; IS__TUNIT____: [[META2:![0-9]+]] = !{!"clang version 13.0.0"}
-; IS__TUNIT____: [[TBAA3]] = !{!4, !4, i64 0}
-; IS__TUNIT____: [[META4:![0-9]+]] = !{!"int", !5, i64 0}
-; IS__TUNIT____: [[META5:![0-9]+]] = !{!"omnipotent char", !6, i64 0}
-; IS__TUNIT____: [[META6:![0-9]+]] = !{!"Simple C/C++ TBAA"}
-; IS__TUNIT____: [[META7:![0-9]+]] = !{!8, !9, i64 12}
-; IS__TUNIT____: [[META8:![0-9]+]] = !{!"S", !4, i64 0, !4, i64 4, !4, i64 8, !9, i64 12, !9, i64 16, !9, i64 20}
-; IS__TUNIT____: [[META9:![0-9]+]] = !{!"float", !5, i64 0}
-; IS__TUNIT____: [[META10:![0-9]+]] = !{!8, !9, i64 16}
-; IS__TUNIT____: [[META11:![0-9]+]] = !{!8, !9, i64 20}
-; IS__TUNIT____: [[META12:![0-9]+]] = !{!8, !4, i64 0}
-; IS__TUNIT____: [[META13:![0-9]+]] = !{!8, !4, i64 4}
-; IS__TUNIT____: [[META14:![0-9]+]] = !{!8, !4, i64 8}
-; IS__TUNIT____: [[META15:![0-9]+]] = distinct !{!15, !16}
-; IS__TUNIT____: [[META16:![0-9]+]] = !{!"llvm.loop.mustprogress"}
-; IS__TUNIT____: [[META17:![0-9]+]] = distinct !{!17, !16}
-; IS__TUNIT____: [[META18:![0-9]+]] = distinct !{!18, !16}
-; IS__TUNIT____: [[META19:![0-9]+]] = !{!5, !5, i64 0}
-; IS__TUNIT____: [[META20:![0-9]+]] = distinct !{!20, !16}
-; IS__TUNIT____: [[META21:![0-9]+]] = distinct !{!21, !16}
-; IS__TUNIT____: [[META22:![0-9]+]] = !{!9, !9, i64 0}
-; IS__TUNIT____: [[META23:![0-9]+]] = distinct !{!23, !16}
-; IS__TUNIT____: [[META24:![0-9]+]] = distinct !{!24, !16}
-; IS__TUNIT____: [[META25:![0-9]+]] = distinct !{!25, !16}
-; IS__TUNIT____: [[META26:![0-9]+]] = distinct !{!26, !16}
-; IS__TUNIT____: [[META27:![0-9]+]] = distinct !{!27, !16}
-; IS__TUNIT____: [[META28:![0-9]+]] = !{!29, !29, i64 0}
-; IS__TUNIT____: [[META29:![0-9]+]] = !{!"long long", !5, i64 0}
-; IS__TUNIT____: [[META30:![0-9]+]] = distinct !{!30, !16}
-; IS__TUNIT____: [[META31:![0-9]+]] = distinct !{!31, !16}
+; IS__CGSCC_NPM: attributes #[[ATTR10]] = { argmemonly nofree norecurse nosync nounwind willreturn }
+; IS__CGSCC_NPM: attributes #[[ATTR11]] = { argmemonly nofree nosync nounwind }
+; IS__CGSCC_NPM: attributes #[[ATTR12]] = { nofree nosync nounwind readnone }
+; IS__CGSCC_NPM: attributes #[[ATTR13:[0-9]+]] = { argmemonly nofree nounwind willreturn writeonly }
+; IS__CGSCC_NPM: attributes #[[ATTR14]] = { willreturn }
+; IS__CGSCC_NPM: attributes #[[ATTR15]] = { nounwind willreturn writeonly }
+; IS__CGSCC_NPM: attributes #[[ATTR16]] = { nounwind }
+; IS__CGSCC_NPM: attributes #[[ATTR17]] = { norecurse }
+; IS__CGSCC_NPM: attributes #[[ATTR18]] = { nofree nosync nounwind }
 ;.
-; IS__CGSCC____: [[META0:![0-9]+]] = !{i32 1, !"wchar_size", i32 4}
-; IS__CGSCC____: [[META1:![0-9]+]] = !{i32 7, !"uwtable", i32 1}
-; IS__CGSCC____: [[META2:![0-9]+]] = !{!"clang version 13.0.0"}
-; IS__CGSCC____: [[TBAA3]] = !{!4, !4, i64 0}
-; IS__CGSCC____: [[META4:![0-9]+]] = !{!"int", !5, i64 0}
-; IS__CGSCC____: [[META5:![0-9]+]] = !{!"omnipotent char", !6, i64 0}
-; IS__CGSCC____: [[META6:![0-9]+]] = !{!"Simple C/C++ TBAA"}
-; IS__CGSCC____: [[TBAA7]] = !{!8, !9, i64 12}
-; IS__CGSCC____: [[META8:![0-9]+]] = !{!"S", !4, i64 0, !4, i64 4, !4, i64 8, !9, i64 12, !9, i64 16, !9, i64 20}
-; IS__CGSCC____: [[META9:![0-9]+]] = !{!"float", !5, i64 0}
-; IS__CGSCC____: [[TBAA10]] = !{!8, !9, i64 16}
-; IS__CGSCC____: [[TBAA11]] = !{!8, !9, i64 20}
-; IS__CGSCC____: [[TBAA12]] = !{!8, !4, i64 0}
-; IS__CGSCC____: [[TBAA13]] = !{!8, !4, i64 4}
-; IS__CGSCC____: [[TBAA14]] = !{!8, !4, i64 8}
-; IS__CGSCC____: [[TBAA15]] = !{!5, !5, i64 0}
-; IS__CGSCC____: [[META16:![0-9]+]] = distinct !{!16, !17}
-; IS__CGSCC____: [[META17:![0-9]+]] = !{!"llvm.loop.mustprogress"}
-; IS__CGSCC____: [[TBAA18]] = !{!9, !9, i64 0}
-; IS__CGSCC____: [[META19:![0-9]+]] = distinct !{!19, !17}
-; IS__CGSCC____: [[TBAA20]] = !{!21, !21, i64 0}
-; IS__CGSCC____: [[META21:![0-9]+]] = !{!"long long", !5, i64 0}
-; IS__CGSCC____: [[META22:![0-9]+]] = distinct !{!22, !17}
-; IS__CGSCC____: [[META23:![0-9]+]] = distinct !{!23, !17}
-; IS__CGSCC____: [[LOOP24]] = distinct !{!24, !17}
-; IS__CGSCC____: [[LOOP25]] = distinct !{!25, !17}
-; IS__CGSCC____: [[LOOP26]] = distinct !{!26, !17}
-; IS__CGSCC____: [[LOOP27]] = distinct !{!27, !17}
-; IS__CGSCC____: [[LOOP28]] = distinct !{!28, !17}
-; IS__CGSCC____: [[LOOP29]] = distinct !{!29, !17}
-; IS__CGSCC____: [[LOOP30]] = distinct !{!30, !17}
-; IS__CGSCC____: [[LOOP31]] = distinct !{!31, !17}
+; CHECK: [[META0:![0-9]+]] = !{i32 1, !"wchar_size", i32 4}
+; CHECK: [[META1:![0-9]+]] = !{i32 7, !"uwtable", i32 1}
+; CHECK: [[META2:![0-9]+]] = !{!"clang version 13.0.0"}
+; CHECK: [[TBAA3]] = !{!4, !4, i64 0}
+; CHECK: [[META4:![0-9]+]] = !{!"int", !5, i64 0}
+; CHECK: [[META5:![0-9]+]] = !{!"omnipotent char", !6, i64 0}
+; CHECK: [[META6:![0-9]+]] = !{!"Simple C/C++ TBAA"}
+; CHECK: [[META7:![0-9]+]] = !{!8, !9, i64 12}
+; CHECK: [[META8:![0-9]+]] = !{!"S", !4, i64 0, !4, i64 4, !4, i64 8, !9, i64 12, !9, i64 16, !9, i64 20}
+; CHECK: [[META9:![0-9]+]] = !{!"float", !5, i64 0}
+; CHECK: [[META10:![0-9]+]] = !{!8, !9, i64 16}
+; CHECK: [[META11:![0-9]+]] = !{!8, !9, i64 20}
+; CHECK: [[META12:![0-9]+]] = !{!8, !4, i64 0}
+; CHECK: [[META13:![0-9]+]] = !{!8, !4, i64 4}
+; CHECK: [[META14:![0-9]+]] = !{!8, !4, i64 8}
+; CHECK: [[META15:![0-9]+]] = !{!5, !5, i64 0}
+; CHECK: [[META16:![0-9]+]] = distinct !{!16, !17}
+; CHECK: [[META17:![0-9]+]] = !{!"llvm.loop.mustprogress"}
+; CHECK: [[META18:![0-9]+]] = !{!9, !9, i64 0}
+; CHECK: [[META19:![0-9]+]] = distinct !{!19, !17}
+; CHECK: [[META20:![0-9]+]] = !{!21, !21, i64 0}
+; CHECK: [[META21:![0-9]+]] = !{!"long long", !5, i64 0}
+; CHECK: [[META22:![0-9]+]] = distinct !{!22, !17}
+; CHECK: [[META23:![0-9]+]] = distinct !{!23, !17}
+; CHECK: [[META24:![0-9]+]] = distinct !{!24, !17}
+; CHECK: [[META25:![0-9]+]] = distinct !{!25, !17}
+; CHECK: [[META26:![0-9]+]] = distinct !{!26, !17}
+; CHECK: [[META27:![0-9]+]] = distinct !{!27, !17}
+; CHECK: [[META28:![0-9]+]] = distinct !{!28, !17}
+; CHECK: [[META29:![0-9]+]] = distinct !{!29, !17}
+; CHECK: [[META30:![0-9]+]] = distinct !{!30, !17}
+; CHECK: [[META31:![0-9]+]] = distinct !{!31, !17}
 ;.

diff  --git a/llvm/test/Transforms/Attributor/value-simplify.ll b/llvm/test/Transforms/Attributor/value-simplify.ll
index 48b1ab776651f..747030ca9a08a 100644
--- a/llvm/test/Transforms/Attributor/value-simplify.ll
+++ b/llvm/test/Transforms/Attributor/value-simplify.ll
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=22 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=22 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
+; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=16 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=16 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
 ; RUN: opt -attributor-cgscc -enable-new-pm=0 -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_NPM,IS__CGSCC____,IS________OPM,IS__CGSCC_OPM
 ; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM
 
@@ -404,23 +404,14 @@ define i32 @ipccp3() {
 }
 
 define internal i32 @ipccp4ia(i1 %c) {
-; IS__CGSCC_OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@ipccp4ia
-; IS__CGSCC_OPM-SAME: (i1 [[C:%.*]]) #[[ATTR1]] {
-; IS__CGSCC_OPM-NEXT:    br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
-; IS__CGSCC_OPM:       t:
-; IS__CGSCC_OPM-NEXT:    ret i32 0
-; IS__CGSCC_OPM:       f:
-; IS__CGSCC_OPM-NEXT:    ret i32 1
-;
-; IS__CGSCC_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@ipccp4ia
-; IS__CGSCC_NPM-SAME: () #[[ATTR1]] {
-; IS__CGSCC_NPM-NEXT:    br label [[T:%.*]]
-; IS__CGSCC_NPM:       t:
-; IS__CGSCC_NPM-NEXT:    ret i32 0
-; IS__CGSCC_NPM:       f:
-; IS__CGSCC_NPM-NEXT:    unreachable
+; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; IS__CGSCC____-LABEL: define {{[^@]+}}@ipccp4ia
+; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR1]] {
+; IS__CGSCC____-NEXT:    br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; IS__CGSCC____:       t:
+; IS__CGSCC____-NEXT:    ret i32 0
+; IS__CGSCC____:       f:
+; IS__CGSCC____-NEXT:    ret i32 1
 ;
   br i1 %c, label %t, label %f
 t:
@@ -444,7 +435,7 @@ define internal i32 @ipccp4ib(i32 %a) {
 ; IS__CGSCC_NPM-SAME: () #[[ATTR2]] {
 ; IS__CGSCC_NPM-NEXT:    br label [[T:%.*]]
 ; IS__CGSCC_NPM:       t:
-; IS__CGSCC_NPM-NEXT:    [[R:%.*]] = call noundef i32 @ipccp4ia() #[[ATTR11]]
+; IS__CGSCC_NPM-NEXT:    [[R:%.*]] = call noundef i32 @ipccp4ia(i1 noundef true) #[[ATTR11]]
 ; IS__CGSCC_NPM-NEXT:    ret i32 [[R]]
 ; IS__CGSCC_NPM:       f:
 ; IS__CGSCC_NPM-NEXT:    unreachable
@@ -520,17 +511,10 @@ define i32* @complicated_args_inalloca(i32* %arg) {
 ; IS__TUNIT_NPM-NEXT:    [[CALL:%.*]] = call nonnull dereferenceable(4) i32* @test_inalloca(i32* noalias nofree writeonly inalloca(i32) "no-capture-maybe-returned" [[ARG]]) #[[ATTR10:[0-9]+]]
 ; IS__TUNIT_NPM-NEXT:    ret i32* [[CALL]]
 ;
-; IS__CGSCC_OPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@complicated_args_inalloca
-; IS__CGSCC_OPM-SAME: (i32* nofree noundef nonnull readnone dereferenceable(4) [[ARG:%.*]]) #[[ATTR2]] {
-; IS__CGSCC_OPM-NEXT:    [[CALL:%.*]] = call noalias nonnull dereferenceable(4) i32* @test_inalloca(i32* noalias nofree noundef nonnull writeonly inalloca(i32) dereferenceable(4) [[ARG]]) #[[ATTR12]]
-; IS__CGSCC_OPM-NEXT:    ret i32* [[CALL]]
-;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@complicated_args_inalloca
-; IS__CGSCC_NPM-SAME: (i32* nofree noundef nonnull readnone dereferenceable(4) [[ARG:%.*]]) #[[ATTR2]] {
-; IS__CGSCC_NPM-NEXT:    [[CALL:%.*]] = call noalias nonnull dereferenceable(4) i32* @test_inalloca(i32* noalias nofree noundef nonnull writeonly inalloca(i32) dereferenceable(4) [[ARG]]) #[[ATTR11]]
-; IS__CGSCC_NPM-NEXT:    ret i32* [[CALL]]
+; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
+; IS__CGSCC____-LABEL: define {{[^@]+}}@complicated_args_inalloca
+; IS__CGSCC____-SAME: (i32* nofree noundef nonnull readnone returned dereferenceable(4) [[ARG:%.*]]) #[[ATTR2:[0-9]+]] {
+; IS__CGSCC____-NEXT:    ret i32* [[ARG]]
 ;
   %call = call i32* @test_inalloca(i32* inalloca(i32) %arg)
   ret i32* %call
@@ -621,8 +605,8 @@ define void @complicated_args_sret(%struct.X** %b) {
 define internal %struct.X* @test_nest(%struct.X* nest %a) {
 ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@test_nest
-; IS__CGSCC____-SAME: (%struct.X* nest noalias nocapture nofree readnone align 4294967296 [[A:%.*]]) #[[ATTR1]] {
-; IS__CGSCC____-NEXT:    ret %struct.X* null
+; IS__CGSCC____-SAME: (%struct.X* nest noalias nofree noundef readnone returned align 4294967296 "no-capture-maybe-returned" [[A:%.*]]) #[[ATTR1]] {
+; IS__CGSCC____-NEXT:    ret %struct.X* [[A]]
 ;
   ret %struct.X* %a
 }
@@ -632,17 +616,10 @@ define %struct.X* @complicated_args_nest() {
 ; IS__TUNIT____-SAME: () #[[ATTR1]] {
 ; IS__TUNIT____-NEXT:    ret %struct.X* null
 ;
-; IS__CGSCC_OPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@complicated_args_nest
-; IS__CGSCC_OPM-SAME: () #[[ATTR2]] {
-; IS__CGSCC_OPM-NEXT:    [[CALL:%.*]] = call noalias noundef align 4294967296 %struct.X* @test_nest(%struct.X* noalias nocapture nofree noundef readnone align 4294967296 null) #[[ATTR12]]
-; IS__CGSCC_OPM-NEXT:    ret %struct.X* [[CALL]]
-;
-; IS__CGSCC_NPM: Function Attrs: nofree nosync nounwind readnone willreturn
-; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@complicated_args_nest
-; IS__CGSCC_NPM-SAME: () #[[ATTR2]] {
-; IS__CGSCC_NPM-NEXT:    [[CALL:%.*]] = call noalias noundef align 4294967296 %struct.X* @test_nest(%struct.X* noalias nocapture nofree noundef readnone align 4294967296 null) #[[ATTR11]]
-; IS__CGSCC_NPM-NEXT:    ret %struct.X* [[CALL]]
+; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
+; IS__CGSCC____-LABEL: define {{[^@]+}}@complicated_args_nest
+; IS__CGSCC____-SAME: () #[[ATTR2]] {
+; IS__CGSCC____-NEXT:    ret %struct.X* null
 ;
   %call = call %struct.X* @test_nest(%struct.X* null)
   ret %struct.X* %call
@@ -1102,7 +1079,7 @@ define i1 @test_merge_with_undef_values_ptr(i1 %c) {
 define internal i1 @undef_then_null(i1 %c, i32* %i32Aptr, i32* %i32Bptr) {
 ; IS__CGSCC____: Function Attrs: nofree nosync nounwind readnone willreturn
 ; IS__CGSCC____-LABEL: define {{[^@]+}}@undef_then_null
-; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR2:[0-9]+]] {
+; IS__CGSCC____-SAME: (i1 [[C:%.*]]) #[[ATTR2]] {
 ; IS__CGSCC____-NEXT:    br i1 [[C]], label [[A:%.*]], label [[B:%.*]]
 ; IS__CGSCC____:       a:
 ; IS__CGSCC____-NEXT:    ret i1 false
@@ -1442,7 +1419,7 @@ define i1 @test_liveness(i1 %c) {
 ; IS__TUNIT_OPM-NEXT:    br label [[F]]
 ; IS__TUNIT_OPM:       f:
 ; IS__TUNIT_OPM-NEXT:    [[P:%.*]] = phi i1 [ true, [[ENTRY:%.*]] ], [ false, [[T]] ]
-; IS__TUNIT_OPM-NEXT:    [[RC1:%.*]] = call i1 @ret(i1 noundef [[P]]) #[[ATTR11]]
+; IS__TUNIT_OPM-NEXT:    [[RC1:%.*]] = call noundef i1 @ret(i1 noundef [[P]]) #[[ATTR11]]
 ; IS__TUNIT_OPM-NEXT:    ret i1 [[RC1]]
 ;
 ; IS__TUNIT_NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
@@ -1454,7 +1431,7 @@ define i1 @test_liveness(i1 %c) {
 ; IS__TUNIT_NPM-NEXT:    br label [[F]]
 ; IS__TUNIT_NPM:       f:
 ; IS__TUNIT_NPM-NEXT:    [[P:%.*]] = phi i1 [ true, [[ENTRY:%.*]] ], [ false, [[T]] ]
-; IS__TUNIT_NPM-NEXT:    [[RC1:%.*]] = call i1 @ret(i1 noundef [[P]]) #[[ATTR10]]
+; IS__TUNIT_NPM-NEXT:    [[RC1:%.*]] = call noundef i1 @ret(i1 noundef [[P]]) #[[ATTR10]]
 ; IS__TUNIT_NPM-NEXT:    ret i1 [[RC1]]
 ;
 ; IS__CGSCC_OPM: Function Attrs: nofree nosync nounwind readnone willreturn
@@ -1492,16 +1469,27 @@ f:
 }
 
 define internal i1 @ret(i1 %c) {
-; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; CHECK-LABEL: define {{[^@]+}}@ret
-; CHECK-SAME: (i1 noundef [[C:%.*]]) #[[ATTR1]] {
-; CHECK-NEXT:  entry:
-; CHECK-NEXT:    br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
-; CHECK:       t:
-; CHECK-NEXT:    br label [[F]]
-; CHECK:       f:
-; CHECK-NEXT:    [[P:%.*]] = phi i1 [ [[C]], [[ENTRY:%.*]] ], [ false, [[T]] ]
-; CHECK-NEXT:    ret i1 [[P]]
+; IS________OPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; IS________OPM-LABEL: define {{[^@]+}}@ret
+; IS________OPM-SAME: (i1 noundef [[C:%.*]]) #[[ATTR1]] {
+; IS________OPM-NEXT:  entry:
+; IS________OPM-NEXT:    br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; IS________OPM:       t:
+; IS________OPM-NEXT:    br label [[F]]
+; IS________OPM:       f:
+; IS________OPM-NEXT:    [[P:%.*]] = phi i1 [ [[C]], [[ENTRY:%.*]] ], [ false, [[T]] ]
+; IS________OPM-NEXT:    ret i1 [[P]]
+;
+; IS________NPM: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
+; IS________NPM-LABEL: define {{[^@]+}}@ret
+; IS________NPM-SAME: (i1 noundef [[C:%.*]]) #[[ATTR1]] {
+; IS________NPM-NEXT:  entry:
+; IS________NPM-NEXT:    br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; IS________NPM:       t:
+; IS________NPM-NEXT:    br label [[F]]
+; IS________NPM:       f:
+; IS________NPM-NEXT:    [[P:%.*]] = phi i1 [ [[C]], [[ENTRY:%.*]] ], [ false, [[T]] ]
+; IS________NPM-NEXT:    ret i1 false
 ;
 entry:
   br i1 %c, label %t, label %f
@@ -1653,7 +1641,7 @@ define i32 @test_speculatable_expr() norecurse {
 ; IS__CGSCC_NPM-NEXT:    [[SPEC_RESULT:%.*]] = call i32 @speculatable()
 ; IS__CGSCC_NPM-NEXT:    [[PLUS1:%.*]] = add i32 [[SPEC_RESULT]], 1
 ; IS__CGSCC_NPM-NEXT:    store i32 [[PLUS1]], i32* [[STACK]], align 4
-; IS__CGSCC_NPM-NEXT:    [[RSPEC:%.*]] = call i32 @ret_speculatable_expr(i32 [[PLUS1]])
+; IS__CGSCC_NPM-NEXT:    [[RSPEC:%.*]] = call i32 @ret_speculatable_expr(i32 [[PLUS1]]) #[[ATTR15:[0-9]+]]
 ; IS__CGSCC_NPM-NEXT:    ret i32 [[RSPEC]]
 ;
   %stack = alloca i32
@@ -1668,8 +1656,9 @@ define internal i32 @ret_speculatable_expr(i32* %mem, i32 %a2) {
 ; IS__TUNIT_OPM: Function Attrs: argmemonly nofree norecurse nosync nounwind readonly willreturn
 ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@ret_speculatable_expr
 ; IS__TUNIT_OPM-SAME: (i32* noalias nocapture nofree noundef nonnull readonly align 4 dereferenceable(4) [[MEM:%.*]]) #[[ATTR9:[0-9]+]] {
-; IS__TUNIT_OPM-NEXT:    [[L:%.*]] = load i32, i32* [[MEM]], align 4
-; IS__TUNIT_OPM-NEXT:    [[MUL:%.*]] = mul i32 [[L]], 13
+; IS__TUNIT_OPM-NEXT:    [[TMP1:%.*]] = call i32 @speculatable()
+; IS__TUNIT_OPM-NEXT:    [[TMP2:%.*]] = add i32 [[TMP1]], 1
+; IS__TUNIT_OPM-NEXT:    [[MUL:%.*]] = mul i32 [[TMP2]], 13
 ; IS__TUNIT_OPM-NEXT:    [[ADD:%.*]] = add i32 [[MUL]], 7
 ; IS__TUNIT_OPM-NEXT:    ret i32 [[ADD]]
 ;
@@ -1678,8 +1667,9 @@ define internal i32 @ret_speculatable_expr(i32* %mem, i32 %a2) {
 ; IS__TUNIT_NPM-SAME: (i32 [[TMP0:%.*]]) #[[ATTR8:[0-9]+]] {
 ; IS__TUNIT_NPM-NEXT:    [[MEM_PRIV:%.*]] = alloca i32, align 4
 ; IS__TUNIT_NPM-NEXT:    store i32 [[TMP0]], i32* [[MEM_PRIV]], align 4
-; IS__TUNIT_NPM-NEXT:    [[L:%.*]] = load i32, i32* [[MEM_PRIV]], align 4
-; IS__TUNIT_NPM-NEXT:    [[MUL:%.*]] = mul i32 [[L]], 13
+; IS__TUNIT_NPM-NEXT:    [[TMP2:%.*]] = call i32 @speculatable()
+; IS__TUNIT_NPM-NEXT:    [[TMP3:%.*]] = add i32 [[TMP2]], 1
+; IS__TUNIT_NPM-NEXT:    [[MUL:%.*]] = mul i32 [[TMP3]], 13
 ; IS__TUNIT_NPM-NEXT:    [[ADD:%.*]] = add i32 [[MUL]], 7
 ; IS__TUNIT_NPM-NEXT:    ret i32 [[ADD]]
 ;
@@ -1773,6 +1763,7 @@ define internal i32 @ret_speculatable_expr(i32* %mem, i32 %a2) {
 ; IS__CGSCC_NPM: attributes #[[ATTR12]] = { willreturn }
 ; IS__CGSCC_NPM: attributes #[[ATTR13]] = { nounwind willreturn writeonly }
 ; IS__CGSCC_NPM: attributes #[[ATTR14]] = { nounwind willreturn }
+; IS__CGSCC_NPM: attributes #[[ATTR15]] = { readonly }
 ;.
 ; IS__TUNIT____: [[RNG0]] = !{i32 0, i32 -2147483648}
 ;.

diff  --git a/llvm/test/Transforms/Attributor/willreturn.ll b/llvm/test/Transforms/Attributor/willreturn.ll
index 6857909b67e71..00caa5f77151b 100644
--- a/llvm/test/Transforms/Attributor/willreturn.ll
+++ b/llvm/test/Transforms/Attributor/willreturn.ll
@@ -1,6 +1,6 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=22 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
-; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=22 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
+; RUN: opt -attributor -enable-new-pm=0 -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=16 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_NPM,NOT_CGSCC_OPM,NOT_TUNIT_NPM,IS__TUNIT____,IS________OPM,IS__TUNIT_OPM
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-max-iterations-verify -attributor-annotate-decl-cs -attributor-max-iterations=16 -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_CGSCC_OPM,NOT_CGSCC_NPM,NOT_TUNIT_OPM,IS__TUNIT____,IS________NPM,IS__TUNIT_NPM
 ; RUN: opt -attributor-cgscc -enable-new-pm=0 -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_NPM,IS__CGSCC____,IS________OPM,IS__CGSCC_OPM
 ; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,NOT_TUNIT_NPM,NOT_TUNIT_OPM,NOT_CGSCC_OPM,IS__CGSCC____,IS________NPM,IS__CGSCC_NPM
 

diff  --git a/llvm/test/Transforms/Attributor/wrapper.ll b/llvm/test/Transforms/Attributor/wrapper.ll
index 5a0f68f507537..85bf78a69d2ea 100644
--- a/llvm/test/Transforms/Attributor/wrapper.ll
+++ b/llvm/test/Transforms/Attributor/wrapper.ll
@@ -9,7 +9,7 @@
 ;
 ; Check the original function, which is wrapped and becomes anonymous
 ; CHECK: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
-; CHECK: define internal i32 @0()
+; CHECK: define internal noundef i32 @0()
 ; CHECK: ret i32 1
 define linkonce i32 @inner1() {
 entry:

diff  --git a/llvm/test/Transforms/OpenMP/icv_tracking.ll b/llvm/test/Transforms/OpenMP/icv_tracking.ll
index 0bb5493b3e96b..c51071742327e 100644
--- a/llvm/test/Transforms/OpenMP/icv_tracking.ll
+++ b/llvm/test/Transforms/OpenMP/icv_tracking.ll
@@ -448,7 +448,7 @@ declare void @__cxa_rethrow()
 define i32 @maybe_throw(i1 zeroext %0) {
 ; CHECK-LABEL: define {{[^@]+}}@maybe_throw
 ; CHECK-SAME: (i1 zeroext [[TMP0:%.*]]) {
-; CHECK-NEXT:    call void @omp_set_num_threads(i32 4) #[[ATTR0:[0-9]+]]
+; CHECK-NEXT:    call void @omp_set_num_threads(i32 4)
 ; CHECK-NEXT:    br i1 [[TMP0]], label [[TMP2:%.*]], label [[TMP3:%.*]]
 ; CHECK:       2:
 ; CHECK-NEXT:    tail call void @__cxa_rethrow()

diff  --git a/llvm/test/Transforms/OpenMP/is_spmd_exec_mode_fold.ll b/llvm/test/Transforms/OpenMP/is_spmd_exec_mode_fold.ll
index 6be9acea1780e..383cba27d446a 100644
--- a/llvm/test/Transforms/OpenMP/is_spmd_exec_mode_fold.ll
+++ b/llvm/test/Transforms/OpenMP/is_spmd_exec_mode_fold.ll
@@ -145,8 +145,7 @@ define internal void @is_generic_helper1() {
 
 define internal void @is_generic_helper2() {
 ; CHECK-LABEL: define {{[^@]+}}@is_generic_helper2() {
-; CHECK-NEXT:    [[C:%.*]] = icmp eq i8 0, 0
-; CHECK-NEXT:    br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
+; CHECK-NEXT:    br label [[T:%.*]]
 ; CHECK:       t:
 ; CHECK-NEXT:    call void @foo()
 ; CHECK-NEXT:    ret void

diff  --git a/llvm/test/Transforms/OpenMP/parallel_deletion.ll b/llvm/test/Transforms/OpenMP/parallel_deletion.ll
index ec2f3e219d21d..7082cc79dfd00 100644
--- a/llvm/test/Transforms/OpenMP/parallel_deletion.ll
+++ b/llvm/test/Transforms/OpenMP/parallel_deletion.ll
@@ -547,7 +547,7 @@ define internal void @.omp_outlined..6(i32* noalias %.global_tid., i32* noalias
 ; CHECK-NEXT:    store i32* [[A1]], i32** [[TMP1]], align 8
 ; CHECK-NEXT:    [[TMP2:%.*]] = load i32, i32* [[DOTGLOBAL_TID_]], align 4
 ; CHECK-NEXT:    [[TMP3:%.*]] = bitcast [1 x i8*]* [[DOTOMP_REDUCTION_RED_LIST]] to i8*
-; CHECK-NEXT:    [[TMP4:%.*]] = call i32 @__kmpc_reduce_nowait(%struct.ident_t* noundef nonnull @[[GLOB2:[0-9]+]], i32 [[TMP2]], i32 noundef 1, i64 noundef 8, i8* noundef nonnull [[TMP3]], void (i8*, i8*)* noundef nonnull @.omp.reduction.reduction_func, [8 x i32]* noundef nonnull @.gomp_critical_user_.reduction.var)
+; CHECK-NEXT:    [[TMP4:%.*]] = call i32 @__kmpc_reduce_nowait(%struct.ident_t* noundef nonnull @[[GLOB2:[0-9]+]], i32 [[TMP2]], i32 noundef 1, i64 noundef 8, i8* noundef nonnull align 8 [[TMP3]], void (i8*, i8*)* noundef nonnull @.omp.reduction.reduction_func, [8 x i32]* noundef nonnull @.gomp_critical_user_.reduction.var)
 ; CHECK-NEXT:    switch i32 [[TMP4]], label [[DOTOMP_REDUCTION_DEFAULT:%.*]] [
 ; CHECK-NEXT:    i32 1, label [[DOTOMP_REDUCTION_CASE1:%.*]]
 ; CHECK-NEXT:    i32 2, label [[DOTOMP_REDUCTION_CASE2:%.*]]

diff  --git a/llvm/test/Transforms/OpenMP/remove_globalization.ll b/llvm/test/Transforms/OpenMP/remove_globalization.ll
index 5d538a4241689..fdad618ea5cfe 100644
--- a/llvm/test/Transforms/OpenMP/remove_globalization.ll
+++ b/llvm/test/Transforms/OpenMP/remove_globalization.ll
@@ -183,7 +183,7 @@ declare void @unknown_no_openmp() "llvm.assume"="omp_no_openmp"
 ; CHECK: attributes #[[ATTR0]] = { nounwind }
 ; CHECK: attributes #[[ATTR1]] = { nosync nounwind }
 ; CHECK: attributes #[[ATTR2]] = { nounwind readnone }
-; CHECK: attributes #[[ATTR3]] = { nofree norecurse nosync nounwind writeonly }
+; CHECK: attributes #[[ATTR3]] = { nofree nosync nounwind writeonly }
 ; CHECK: attributes #[[ATTR4:[0-9]+]] = { nosync nounwind allocsize(0) }
 ; CHECK: attributes #[[ATTR5:[0-9]+]] = { "llvm.assume"="omp_no_openmp" }
 ; CHECK: attributes #[[ATTR6]] = { nosync nounwind writeonly }
@@ -191,7 +191,7 @@ declare void @unknown_no_openmp() "llvm.assume"="omp_no_openmp"
 ; CHECK-DISABLED: attributes #[[ATTR0]] = { nounwind }
 ; CHECK-DISABLED: attributes #[[ATTR1]] = { nosync nounwind }
 ; CHECK-DISABLED: attributes #[[ATTR2]] = { nounwind readnone }
-; CHECK-DISABLED: attributes #[[ATTR3]] = { nofree norecurse nosync nounwind writeonly }
+; CHECK-DISABLED: attributes #[[ATTR3]] = { nofree nosync nounwind writeonly }
 ; CHECK-DISABLED: attributes #[[ATTR4:[0-9]+]] = { nosync nounwind allocsize(0) }
 ; CHECK-DISABLED: attributes #[[ATTR5:[0-9]+]] = { "llvm.assume"="omp_no_openmp" }
 ; CHECK-DISABLED: attributes #[[ATTR6]] = { nosync nounwind writeonly }

diff  --git a/llvm/test/Transforms/OpenMP/replace_globalization.ll b/llvm/test/Transforms/OpenMP/replace_globalization.ll
index a29f9a69998ef..d9fb03b136309 100644
--- a/llvm/test/Transforms/OpenMP/replace_globalization.ll
+++ b/llvm/test/Transforms/OpenMP/replace_globalization.ll
@@ -147,7 +147,9 @@ declare void @unknown_no_openmp() "llvm.assume"="omp_no_openmp"
 ; CHECK-NEXT:    [[C:%.*]] = call i32 @__kmpc_target_init(%struct.ident_t* @[[GLOB1]], i8 1, i1 false, i1 true)
 ; CHECK-NEXT:    [[X:%.*]] = call align 4 i8* @__kmpc_alloc_shared(i64 4) #[[ATTR6:[0-9]+]]
 ; CHECK-NEXT:    call void @unknown_no_openmp()
-; CHECK-NEXT:    call void @use.internalized(i8* nofree [[X]]) #[[ATTR7:[0-9]+]]
+; CHECK-NEXT:    [[X_ON_STACK:%.*]] = bitcast i8* [[X]] to i32*
+; CHECK-NEXT:    [[TMP0:%.*]] = bitcast i32* [[X_ON_STACK]] to i8*
+; CHECK-NEXT:    call void @use.internalized(i8* nofree [[TMP0]]) #[[ATTR7:[0-9]+]]
 ; CHECK-NEXT:    call void @__kmpc_free_shared(i8* [[X]], i64 4) #[[ATTR8:[0-9]+]]
 ; CHECK-NEXT:    call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i8 1, i1 true)
 ; CHECK-NEXT:    ret void
@@ -160,13 +162,17 @@ declare void @unknown_no_openmp() "llvm.assume"="omp_no_openmp"
 ; CHECK-NEXT:    [[CMP:%.*]] = icmp eq i32 [[C]], -1
 ; CHECK-NEXT:    br i1 [[CMP]], label [[MASTER1:%.*]], label [[EXIT:%.*]]
 ; CHECK:       master1:
-; CHECK-NEXT:    call void @use.internalized(i8* nofree addrspacecast (i8 addrspace(3)* getelementptr inbounds ([16 x i8], [16 x i8] addrspace(3)* @x_shared, i32 0, i32 0) to i8*)) #[[ATTR7]]
+; CHECK-NEXT:    [[X_ON_STACK:%.*]] = bitcast i8* addrspacecast (i8 addrspace(3)* getelementptr inbounds ([16 x i8], [16 x i8] addrspace(3)* @x_shared, i32 0, i32 0) to i8*) to [4 x i32]*
+; CHECK-NEXT:    [[A0:%.*]] = bitcast [4 x i32]* [[X_ON_STACK]] to i8*
+; CHECK-NEXT:    call void @use.internalized(i8* nofree [[A0]]) #[[ATTR7]]
 ; CHECK-NEXT:    br label [[NEXT:%.*]]
 ; CHECK:       next:
 ; CHECK-NEXT:    call void @unknown_no_openmp()
 ; CHECK-NEXT:    br label [[MASTER2:%.*]]
 ; CHECK:       master2:
-; CHECK-NEXT:    call void @use.internalized(i8* nofree addrspacecast (i8 addrspace(3)* getelementptr inbounds ([4 x i8], [4 x i8] addrspace(3)* @y_shared, i32 0, i32 0) to i8*)) #[[ATTR7]]
+; CHECK-NEXT:    [[Y_ON_STACK:%.*]] = bitcast i8* addrspacecast (i8 addrspace(3)* getelementptr inbounds ([4 x i8], [4 x i8] addrspace(3)* @y_shared, i32 0, i32 0) to i8*) to [4 x i32]*
+; CHECK-NEXT:    [[B1:%.*]] = bitcast [4 x i32]* [[Y_ON_STACK]] to i8*
+; CHECK-NEXT:    call void @use.internalized(i8* nofree [[B1]]) #[[ATTR7]]
 ; CHECK-NEXT:    br label [[EXIT]]
 ; CHECK:       exit:
 ; CHECK-NEXT:    call void @__kmpc_target_deinit(%struct.ident_t* @[[GLOB1]], i8 1, i1 true)
@@ -181,7 +187,9 @@ declare void @unknown_no_openmp() "llvm.assume"="omp_no_openmp"
 ; CHECK-NEXT:    br i1 [[C0]], label [[MASTER3:%.*]], label [[EXIT:%.*]]
 ; CHECK:       master3:
 ; CHECK-NEXT:    [[Z:%.*]] = call align 4 i8* @__kmpc_alloc_shared(i64 24) #[[ATTR6]], !dbg [[DBG10:![0-9]+]]
-; CHECK-NEXT:    call void @use.internalized(i8* nofree [[Z]]) #[[ATTR7]]
+; CHECK-NEXT:    [[Z_ON_STACK:%.*]] = bitcast i8* [[Z]] to [6 x i32]*
+; CHECK-NEXT:    [[C1:%.*]] = bitcast [6 x i32]* [[Z_ON_STACK]] to i8*
+; CHECK-NEXT:    call void @use.internalized(i8* nofree [[C1]]) #[[ATTR7]]
 ; CHECK-NEXT:    call void @__kmpc_free_shared(i8* [[Z]], i64 24) #[[ATTR8]]
 ; CHECK-NEXT:    br label [[EXIT]]
 ; CHECK:       exit:
@@ -189,7 +197,7 @@ declare void @unknown_no_openmp() "llvm.assume"="omp_no_openmp"
 ; CHECK-NEXT:    ret void
 ;
 ;
-; CHECK: Function Attrs: nofree norecurse nounwind writeonly
+; CHECK: Function Attrs: nofree nounwind writeonly
 ; CHECK-LABEL: define {{[^@]+}}@use.internalized
 ; CHECK-SAME: (i8* nofree [[X:%.*]]) #[[ATTR1:[0-9]+]] {
 ; CHECK-NEXT:  entry:
@@ -212,7 +220,7 @@ declare void @unknown_no_openmp() "llvm.assume"="omp_no_openmp"
 ;
 ;.
 ; CHECK: attributes #[[ATTR0]] = { "kernel" }
-; CHECK: attributes #[[ATTR1]] = { nofree norecurse nounwind writeonly }
+; CHECK: attributes #[[ATTR1]] = { nofree nounwind writeonly }
 ; CHECK: attributes #[[ATTR2]] = { nosync nounwind readonly allocsize(0) }
 ; CHECK: attributes #[[ATTR3:[0-9]+]] = { nosync nounwind }
 ; CHECK: attributes #[[ATTR4:[0-9]+]] = { nocallback nofree nosync nounwind readnone speculatable willreturn }

diff  --git a/llvm/test/Transforms/OpenMP/spmdization.ll b/llvm/test/Transforms/OpenMP/spmdization.ll
index 003311212a5d7..0feabb7a7e143 100644
--- a/llvm/test/Transforms/OpenMP/spmdization.ll
+++ b/llvm/test/Transforms/OpenMP/spmdization.ll
@@ -1603,7 +1603,7 @@ define internal void @__omp_outlined__7(i32* noalias %.global_tid., i32* noalias
 ; AMDGPU-NEXT:    [[TMP0:%.*]] = load i32, i32* [[X]], align 4, !tbaa [[TBAA18]]
 ; AMDGPU-NEXT:    [[INC:%.*]] = add nsw i32 [[TMP0]], 1
 ; AMDGPU-NEXT:    store i32 [[INC]], i32* [[X]], align 4, !tbaa [[TBAA18]]
-; AMDGPU-NEXT:    call void @unknowni32p(i32* [[X]]) #[[ATTR8]]
+; AMDGPU-NEXT:    call void @unknown() #[[ATTR8]]
 ; AMDGPU-NEXT:    ret void
 ;
 ; NVPTX-LABEL: define {{[^@]+}}@__omp_outlined__7
@@ -1612,7 +1612,7 @@ define internal void @__omp_outlined__7(i32* noalias %.global_tid., i32* noalias
 ; NVPTX-NEXT:    [[TMP0:%.*]] = load i32, i32* [[X]], align 4, !tbaa [[TBAA18]]
 ; NVPTX-NEXT:    [[INC:%.*]] = add nsw i32 [[TMP0]], 1
 ; NVPTX-NEXT:    store i32 [[INC]], i32* [[X]], align 4, !tbaa [[TBAA18]]
-; NVPTX-NEXT:    call void @unknowni32p(i32* [[X]]) #[[ATTR8]]
+; NVPTX-NEXT:    call void @unknown() #[[ATTR8]]
 ; NVPTX-NEXT:    ret void
 ;
 ; AMDGPU-DISABLED-LABEL: define {{[^@]+}}@__omp_outlined__7
@@ -1621,7 +1621,7 @@ define internal void @__omp_outlined__7(i32* noalias %.global_tid., i32* noalias
 ; AMDGPU-DISABLED-NEXT:    [[TMP0:%.*]] = load i32, i32* [[X]], align 4, !tbaa [[TBAA18]]
 ; AMDGPU-DISABLED-NEXT:    [[INC:%.*]] = add nsw i32 [[TMP0]], 1
 ; AMDGPU-DISABLED-NEXT:    store i32 [[INC]], i32* [[X]], align 4, !tbaa [[TBAA18]]
-; AMDGPU-DISABLED-NEXT:    call void @unknowni32p(i32* [[X]]) #[[ATTR8]]
+; AMDGPU-DISABLED-NEXT:    call void @unknown() #[[ATTR8]]
 ; AMDGPU-DISABLED-NEXT:    ret void
 ;
 ; NVPTX-DISABLED-LABEL: define {{[^@]+}}@__omp_outlined__7
@@ -1630,14 +1630,14 @@ define internal void @__omp_outlined__7(i32* noalias %.global_tid., i32* noalias
 ; NVPTX-DISABLED-NEXT:    [[TMP0:%.*]] = load i32, i32* [[X]], align 4, !tbaa [[TBAA18]]
 ; NVPTX-DISABLED-NEXT:    [[INC:%.*]] = add nsw i32 [[TMP0]], 1
 ; NVPTX-DISABLED-NEXT:    store i32 [[INC]], i32* [[X]], align 4, !tbaa [[TBAA18]]
-; NVPTX-DISABLED-NEXT:    call void @unknowni32p(i32* [[X]]) #[[ATTR8]]
+; NVPTX-DISABLED-NEXT:    call void @unknown() #[[ATTR8]]
 ; NVPTX-DISABLED-NEXT:    ret void
 ;
 entry:
   %0 = load i32, i32* %x, align 4, !tbaa !18
   %inc = add nsw i32 %0, 1
   store i32 %inc, i32* %x, align 4, !tbaa !18
-  call void @unknowni32p(i32* %x) #11
+  call void @unknown() #11
   ret void
 }
 
@@ -2252,7 +2252,6 @@ declare void @use(i32* nocapture) #5
 
 ; Function Attrs: convergent
 declare void @unknown() #2
-declare void @unknowni32p(i32*) #2
 
 ; Function Attrs: argmemonly mustprogress nofree nosync nounwind willreturn
 declare void @llvm.lifetime.start.p0i8(i64 immarg, i8* nocapture) #1


        


More information about the llvm-commits mailing list