[polly] [llvm] [AST] Don't merge memory locations in AliasSetTracker (PR #65731)

Bruno De Fraine via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 12 05:55:14 PST 2023


https://github.com/brunodf-snps updated https://github.com/llvm/llvm-project/pull/65731

>From 951157ac98611668f169abeb781d3d19a71a129a Mon Sep 17 00:00:00 2001
From: Bruno De Fraine <brunodf at synopsys.com>
Date: Tue, 12 Dec 2023 12:04:50 +0100
Subject: [PATCH 1/3] [NFC] LoopVersioningLICM: add comment regarding dubious
 check

---
 llvm/lib/Transforms/Scalar/LoopVersioningLICM.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/llvm/lib/Transforms/Scalar/LoopVersioningLICM.cpp b/llvm/lib/Transforms/Scalar/LoopVersioningLICM.cpp
index 13e06c79d0d7eb..9d5e6693c0e53a 100644
--- a/llvm/lib/Transforms/Scalar/LoopVersioningLICM.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopVersioningLICM.cpp
@@ -266,6 +266,11 @@ bool LoopVersioningLICM::legalLoopMemoryAccesses() {
     for (const auto &A : AS) {
       Value *Ptr = A.getValue();
       // Alias tracker should have pointers of same data type.
+      //
+      // FIXME: check no longer effective since opaque pointers?
+      // If the intent is to check that the memory accesses use the
+      // same data type (such that LICM can promote them), then we
+      // can no longer see this from the pointer value types.
       TypeCheck = (TypeCheck && (SomePtr->getType() == Ptr->getType()));
     }
     // At least one alias tracker should have pointers of same data type.

>From 0bab78b35175ef633f1a8559022fb800e6ad4064 Mon Sep 17 00:00:00 2001
From: Bruno De Fraine <brunodf at synopsys.com>
Date: Tue, 12 Sep 2023 12:46:31 +0200
Subject: [PATCH 2/3] [LICM] Add test demonstrating missed optimization due to
 aainfo merging (NFC)

---
 llvm/test/Transforms/LICM/variant-aainfo.ll | 67 +++++++++++++++++++++
 1 file changed, 67 insertions(+)
 create mode 100644 llvm/test/Transforms/LICM/variant-aainfo.ll

diff --git a/llvm/test/Transforms/LICM/variant-aainfo.ll b/llvm/test/Transforms/LICM/variant-aainfo.ll
new file mode 100644
index 00000000000000..4c4766bddf65e5
--- /dev/null
+++ b/llvm/test/Transforms/LICM/variant-aainfo.ll
@@ -0,0 +1,67 @@
+; RUN: opt < %s -passes=aa-eval -evaluate-aa-metadata -aa-pipeline=basic-aa,tbaa -print-all-alias-modref-info -disable-output 2>&1 | FileCheck --check-prefix=CHECKAA %s
+; RUN: opt < %s -S -passes=licm | FileCheck --check-prefix=CHECKLICM %s
+
+; See https://discourse.llvm.org/t/rfc-dont-merge-memory-locations-in-aliassettracker/73336
+; pairwise TBAA indicates NoAlias of load/store ptr at %s with store i32 at %0
+; yet LICM fails to promote load/store ptr %s out of the loop
+
+target datalayout = "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-f64:32:64-f80:32-n8:16:32-S128"
+
+; CHECKAA-LABEL: Function: _Z4testP1S: 2 pointers, 0 call sites
+; CHECKAA-DAG:  NoAlias:   %0 = load ptr, ptr %s, align 4, !tbaa !7 <->   store i32 %i.05, ptr %0, align 4, !tbaa !12
+; CHECKAA-DAG:  MustAlias:   %0 = load ptr, ptr %s, align 4, !tbaa !7 <->   store ptr %add.ptr.i, ptr %s, align 4, !tbaa !14
+; CHECKAA-DAG:  NoAlias:   store ptr %add.ptr.i, ptr %s, align 4, !tbaa !14 <->   store i32 %i.05, ptr %0, align 4, !tbaa !12
+
+; FIXME: missed optimization:
+;   load ptr, ptr %s should be promoted to entry
+;   store ptr ..., ptr %s should be promoted to for.cond.cleanup
+; CHECKLICM-LABEL: define void @_Z4testP1S(ptr noundef %s)
+; CHECKLICM: entry:
+; CHECKLICM: for.cond.cleanup:
+; CHECKLICM: for.body:
+; CHECKLICM: [[P:%[^ ]+]] = load ptr, ptr %s
+; CHECKLICM: store i32 {{%[^ ]+}}, ptr [[P]]
+; CHECKLICM: [[P_NEXT:%[^ ]+]] = getelementptr inbounds i32, ptr [[P]], i32 1
+; CHECKLICM: store ptr [[P_NEXT]], ptr %s
+
+define void @_Z4testP1S(ptr noundef %s) #0 {
+entry:
+  br label %for.body
+
+for.cond.cleanup:                                 ; preds = %for.body
+  ret void
+
+for.body:                                         ; preds = %entry, %for.body
+  %i.05 = phi i32 [ 0, %entry ], [ %inc, %for.body ]
+  %0 = load ptr, ptr %s, align 4, !tbaa !7
+  store i32 %i.05, ptr %0, align 4, !tbaa !12
+  %add.ptr.i = getelementptr inbounds i32, ptr %0, i32 1
+  store ptr %add.ptr.i, ptr %s, align 4, !tbaa !14
+  %inc = add nuw nsw i32 %i.05, 1
+  %exitcond.not = icmp eq i32 %inc, 100
+  br i1 %exitcond.not, label %for.cond.cleanup, label %for.body, !llvm.loop !15
+}
+
+attributes #0 = { mustprogress }
+
+!llvm.module.flags = !{!0, !1, !2, !3, !4, !5}
+!llvm.ident = !{!6}
+
+!0 = !{i32 1, !"NumRegisterParameters", i32 0}
+!1 = !{i32 7, !"Dwarf Version", i32 4}
+!2 = !{i32 1, !"wchar_size", i32 4}
+!3 = !{i32 8, !"PIC Level", i32 2}
+!4 = !{i32 7, !"PIE Level", i32 2}
+!5 = !{i32 7, !"uwtable", i32 2}
+!6 = !{!"clang version 18.0.0 (https://github.com/llvm/llvm-project.git 2cab996192cf143d10e3381fcefa75e270cc7ddb)"}
+!7 = !{!8, !9, i64 0}
+!8 = !{!"_ZTS1S", !9, i64 0}
+!9 = !{!"any pointer", !10, i64 0}
+!10 = !{!"omnipotent char", !11, i64 0}
+!11 = !{!"Simple C++ TBAA"}
+!12 = !{!13, !13, i64 0}
+!13 = !{!"int", !10, i64 0}
+!14 = !{!9, !9, i64 0}
+!15 = distinct !{!15, !16, !17}
+!16 = !{!"llvm.loop.mustprogress"}
+!17 = !{!"llvm.loop.unroll.disable"}

>From 7caf0bcc1cbe58590c72f00e62c077244dc8e1a4 Mon Sep 17 00:00:00 2001
From: Bruno De Fraine <brunodf at synopsys.com>
Date: Tue, 5 Sep 2023 15:35:11 +0200
Subject: [PATCH 3/3] AliasSetTracker: don't merge memory locations

---
 llvm/include/llvm/Analysis/AliasSetTracker.h  | 178 ++-----------
 llvm/include/llvm/LinkAllPasses.h             |   3 +-
 llvm/lib/Analysis/AliasSetTracker.cpp         | 248 ++++++------------
 llvm/lib/Analysis/LoopAccessAnalysis.cpp      |  11 +-
 llvm/lib/Transforms/Scalar/LICM.cpp           |   2 +-
 .../Transforms/Scalar/LoopVersioningLICM.cpp  |   4 +-
 llvm/test/Analysis/AliasSet/argmemonly.ll     |  32 +--
 llvm/test/Analysis/AliasSet/guards.ll         | 216 +++++++--------
 llvm/test/Analysis/AliasSet/intrinsics.ll     |  10 +-
 llvm/test/Analysis/AliasSet/memloc-vscale.ll  |   6 +-
 llvm/test/Analysis/AliasSet/memset.ll         |   8 +-
 llvm/test/Analysis/AliasSet/memtransfer.ll    |  28 +-
 llvm/test/Analysis/AliasSet/saturation.ll     |  32 ++-
 llvm/test/Transforms/LICM/variant-aainfo.ll   |  11 +-
 polly/lib/Analysis/ScopBuilder.cpp            |   6 +-
 polly/lib/Analysis/ScopDetection.cpp          |   5 +-
 .../lib/Analysis/ScopDetectionDiagnostic.cpp  |   3 +-
 17 files changed, 287 insertions(+), 516 deletions(-)

diff --git a/llvm/include/llvm/Analysis/AliasSetTracker.h b/llvm/include/llvm/Analysis/AliasSetTracker.h
index e485e1ff2f4c98..e8c05d2bb78fb8 100644
--- a/llvm/include/llvm/Analysis/AliasSetTracker.h
+++ b/llvm/include/llvm/Analysis/AliasSetTracker.h
@@ -49,99 +49,12 @@ class Value;
 class AliasSet : public ilist_node<AliasSet> {
   friend class AliasSetTracker;
 
-  class PointerRec {
-    Value *Val;  // The pointer this record corresponds to.
-    PointerRec **PrevInList = nullptr;
-    PointerRec *NextInList = nullptr;
-    AliasSet *AS = nullptr;
-    LocationSize Size = LocationSize::mapEmpty();
-    AAMDNodes AAInfo;
-
-    // Whether the size for this record has been set at all. This makes no
-    // guarantees about the size being known.
-    bool isSizeSet() const { return Size != LocationSize::mapEmpty(); }
-
-  public:
-    PointerRec(Value *V)
-      : Val(V), AAInfo(DenseMapInfo<AAMDNodes>::getEmptyKey()) {}
-
-    Value *getValue() const { return Val; }
-
-    PointerRec *getNext() const { return NextInList; }
-    bool hasAliasSet() const { return AS != nullptr; }
-
-    PointerRec** setPrevInList(PointerRec **PIL) {
-      PrevInList = PIL;
-      return &NextInList;
-    }
-
-    bool updateSizeAndAAInfo(LocationSize NewSize, const AAMDNodes &NewAAInfo) {
-      bool SizeChanged = false;
-      if (NewSize != Size) {
-        LocationSize OldSize = Size;
-        Size = isSizeSet() ? Size.unionWith(NewSize) : NewSize;
-        SizeChanged = OldSize != Size;
-      }
-
-      if (AAInfo == DenseMapInfo<AAMDNodes>::getEmptyKey())
-        // We don't have a AAInfo yet. Set it to NewAAInfo.
-        AAInfo = NewAAInfo;
-      else {
-        AAMDNodes Intersection(AAInfo.intersect(NewAAInfo));
-        SizeChanged |= Intersection != AAInfo;
-        AAInfo = Intersection;
-      }
-      return SizeChanged;
-    }
-
-    LocationSize getSize() const {
-      assert(isSizeSet() && "Getting an unset size!");
-      return Size;
-    }
-
-    /// Return the AAInfo, or null if there is no information or conflicting
-    /// information.
-    AAMDNodes getAAInfo() const {
-      // If we have missing or conflicting AAInfo, return null.
-      if (AAInfo == DenseMapInfo<AAMDNodes>::getEmptyKey() ||
-          AAInfo == DenseMapInfo<AAMDNodes>::getTombstoneKey())
-        return AAMDNodes();
-      return AAInfo;
-    }
-
-    AliasSet *getAliasSet(AliasSetTracker &AST) {
-      assert(AS && "No AliasSet yet!");
-      if (AS->Forward) {
-        AliasSet *OldAS = AS;
-        AS = OldAS->getForwardedTarget(AST);
-        AS->addRef();
-        OldAS->dropRef(AST);
-      }
-      return AS;
-    }
-
-    void setAliasSet(AliasSet *as) {
-      assert(!AS && "Already have an alias set!");
-      AS = as;
-    }
-
-    void eraseFromList() {
-      if (NextInList) NextInList->PrevInList = PrevInList;
-      *PrevInList = NextInList;
-      if (AS->PtrListEnd == &NextInList) {
-        AS->PtrListEnd = PrevInList;
-        assert(*AS->PtrListEnd == nullptr && "List not terminated right!");
-      }
-      delete this;
-    }
-  };
-
-  // Doubly linked list of nodes.
-  PointerRec *PtrList = nullptr;
-  PointerRec **PtrListEnd;
   // Forwarding pointer.
   AliasSet *Forward = nullptr;
 
+  /// Memory locations in this alias set.
+  std::vector<MemoryLocation> MemoryLocs;
+
   /// All instructions without a specific address in this alias set.
   std::vector<AssertingVH<Instruction>> UnknownInsts;
 
@@ -178,8 +91,6 @@ class AliasSet : public ilist_node<AliasSet> {
   };
   unsigned Alias : 1;
 
-  unsigned SetSize = 0;
-
   void addRef() { ++RefCount; }
 
   void dropRef(AliasSetTracker &AST) {
@@ -207,66 +118,21 @@ class AliasSet : public ilist_node<AliasSet> {
 
   // Alias Set iteration - Allow access to all of the pointers which are part of
   // this alias set.
-  class iterator;
-  iterator begin() const { return iterator(PtrList); }
-  iterator end()   const { return iterator(); }
-  bool empty() const { return PtrList == nullptr; }
+  using iterator = std::vector<MemoryLocation>::const_iterator;
+  iterator begin() const { return MemoryLocs.begin(); }
+  iterator end()   const { return MemoryLocs.end(); }
 
-  // Unfortunately, ilist::size() is linear, so we have to add code to keep
-  // track of the list's exact size.
-  unsigned size() { return SetSize; }
+  unsigned size() { return MemoryLocs.size(); }
 
   void print(raw_ostream &OS) const;
   void dump() const;
 
-  /// Define an iterator for alias sets... this is just a forward iterator.
-  class iterator {
-    PointerRec *CurNode;
-
-  public:
-    using iterator_category = std::forward_iterator_tag;
-    using value_type = PointerRec;
-    using difference_type = std::ptrdiff_t;
-    using pointer = value_type *;
-    using reference = value_type &;
-
-    explicit iterator(PointerRec *CN = nullptr) : CurNode(CN) {}
-
-    bool operator==(const iterator& x) const {
-      return CurNode == x.CurNode;
-    }
-    bool operator!=(const iterator& x) const { return !operator==(x); }
-
-    value_type &operator*() const {
-      assert(CurNode && "Dereferencing AliasSet.end()!");
-      return *CurNode;
-    }
-    value_type *operator->() const { return &operator*(); }
-
-    Value *getPointer() const { return CurNode->getValue(); }
-    LocationSize getSize() const { return CurNode->getSize(); }
-    AAMDNodes getAAInfo() const { return CurNode->getAAInfo(); }
-
-    iterator& operator++() {                // Preincrement
-      assert(CurNode && "Advancing past AliasSet.end()!");
-      CurNode = CurNode->getNext();
-      return *this;
-    }
-    iterator operator++(int) { // Postincrement
-      iterator tmp = *this; ++*this; return tmp;
-    }
-  };
-
 private:
   // Can only be created by AliasSetTracker.
   AliasSet()
-      : PtrListEnd(&PtrList), RefCount(0),  AliasAny(false), Access(NoAccess),
+      : RefCount(0), AliasAny(false), Access(NoAccess),
         Alias(SetMustAlias) {}
 
-  PointerRec *getSomePointer() const {
-    return PtrList;
-  }
-
   /// Return the real alias set this represents. If this has been merged with
   /// another set and is forwarding, return the ultimate destination set. This
   /// also implements the union-find collapsing as well.
@@ -284,16 +150,16 @@ class AliasSet : public ilist_node<AliasSet> {
 
   void removeFromTracker(AliasSetTracker &AST);
 
-  void addPointer(AliasSetTracker &AST, PointerRec &Entry, LocationSize Size,
-                  const AAMDNodes &AAInfo, bool KnownMustAlias = false,
-                  bool SkipSizeUpdate = false);
+  bool isMustAliasMergeWith(AliasSet &AS, BatchAAResults &BatchAA) const;
+  void addPointer(AliasSetTracker &AST, const MemoryLocation &MemLoc,
+                  bool KnownMustAlias = false);
   void addUnknownInst(Instruction *I, BatchAAResults &AA);
 
 public:
   /// If the specified pointer "may" (or must) alias one of the members in the
   /// set return the appropriate AliasResult. Otherwise return NoAlias.
-  AliasResult aliasesPointer(const Value *Ptr, LocationSize Size,
-                             const AAMDNodes &AAInfo, BatchAAResults &AA) const;
+  AliasResult aliasesPointer(const MemoryLocation &MemLoc, BatchAAResults &AA) const;
+
   ModRefInfo aliasesUnknownInst(const Instruction *Inst,
                                 BatchAAResults &AA) const;
 };
@@ -307,7 +173,7 @@ class AliasSetTracker {
   BatchAAResults &AA;
   ilist<AliasSet> AliasSets;
 
-  using PointerMapType = DenseMap<AssertingVH<Value>, AliasSet::PointerRec *>;
+  using PointerMapType = DenseMap<MemoryLocation, AliasSet *>;
 
   // Map from pointers to their node
   PointerMapType PointerMap;
@@ -330,7 +196,7 @@ class AliasSetTracker {
   /// These methods return true if inserting the instruction resulted in the
   /// addition of a new alias set (i.e., the pointer did not alias anything).
   ///
-  void add(Value *Ptr, LocationSize Size, const AAMDNodes &AAInfo); // Add a loc
+  void add(const MemoryLocation &Loc); // Add a loc
   void add(LoadInst *LI);
   void add(StoreInst *SI);
   void add(VAArgInst *VAAI);
@@ -371,7 +237,7 @@ class AliasSetTracker {
   friend class AliasSet;
 
   // The total number of pointers contained in all "may" alias sets.
-  unsigned TotalMayAliasSetSize = 0;
+  unsigned TotalAliasSetSize = 0;
 
   // A non-null value signifies this AST is saturated. A saturated AST lumps
   // all pointers into a single "May" set.
@@ -379,18 +245,8 @@ class AliasSetTracker {
 
   void removeAliasSet(AliasSet *AS);
 
-  /// Just like operator[] on the map, except that it creates an entry for the
-  /// pointer if it doesn't already exist.
-  AliasSet::PointerRec &getEntryFor(Value *V) {
-    AliasSet::PointerRec *&Entry = PointerMap[V];
-    if (!Entry)
-      Entry = new AliasSet::PointerRec(V);
-    return *Entry;
-  }
-
   AliasSet &addPointer(MemoryLocation Loc, AliasSet::AccessLattice E);
-  AliasSet *mergeAliasSetsForPointer(const Value *Ptr, LocationSize Size,
-                                     const AAMDNodes &AAInfo,
+  AliasSet *mergeAliasSetsForPointer(const MemoryLocation &MemLoc,
                                      bool &MustAliasAll);
 
   /// Merge all alias sets into a single set that is considered to alias any
diff --git a/llvm/include/llvm/LinkAllPasses.h b/llvm/include/llvm/LinkAllPasses.h
index bf990a1408faba..3ca4cd58da2371 100644
--- a/llvm/include/llvm/LinkAllPasses.h
+++ b/llvm/include/llvm/LinkAllPasses.h
@@ -148,8 +148,7 @@ namespace {
       llvm::AliasAnalysis AA(TLI);
       llvm::BatchAAResults BAA(AA);
       llvm::AliasSetTracker X(BAA);
-      X.add(nullptr, llvm::LocationSize::beforeOrAfterPointer(),
-            llvm::AAMDNodes()); // for -print-alias-sets
+      X.add(llvm::MemoryLocation()); // for -print-alias-sets
       (void) llvm::AreStatisticsEnabled();
       (void) llvm::sys::RunningOnValgrind();
     }
diff --git a/llvm/lib/Analysis/AliasSetTracker.cpp b/llvm/lib/Analysis/AliasSetTracker.cpp
index debdd328ce53fd..579070b2554981 100644
--- a/llvm/lib/Analysis/AliasSetTracker.cpp
+++ b/llvm/lib/Analysis/AliasSetTracker.cpp
@@ -40,36 +40,37 @@ static cl::opt<unsigned>
                         cl::desc("The maximum number of pointers may-alias "
                                  "sets may contain before degradation"));
 
+bool AliasSet::isMustAliasMergeWith(AliasSet &AS, BatchAAResults &BatchAA) const {
+  for (const MemoryLocation &MemLoc : MemoryLocs)
+    for (const MemoryLocation &ASMemLoc : AS.MemoryLocs)
+      if (!BatchAA.isMustAlias(MemLoc, ASMemLoc))
+        return false;
+  return true;
+}
+
 /// mergeSetIn - Merge the specified alias set into this alias set.
 void AliasSet::mergeSetIn(AliasSet &AS, AliasSetTracker &AST,
                           BatchAAResults &BatchAA) {
   assert(!AS.Forward && "Alias set is already forwarding!");
   assert(!Forward && "This set is a forwarding set!!");
 
-  bool WasMustAlias = (Alias == SetMustAlias);
   // Update the alias and access types of this set...
   Access |= AS.Access;
   Alias  |= AS.Alias;
 
   if (Alias == SetMustAlias) {
-    // Check that these two merged sets really are must aliases.  Since both
-    // used to be must-alias sets, we can just check any pointer from each set
-    // for aliasing.
-    PointerRec *L = getSomePointer();
-    PointerRec *R = AS.getSomePointer();
-
+    // Check that these two merged sets really are must aliases.
     // If the pointers are not a must-alias pair, this set becomes a may alias.
-    if (!BatchAA.isMustAlias(
-            MemoryLocation(L->getValue(), L->getSize(), L->getAAInfo()),
-            MemoryLocation(R->getValue(), R->getSize(), R->getAAInfo())))
+    if (!isMustAliasMergeWith(AS, BatchAA))
       Alias = SetMayAlias;
   }
 
-  if (Alias == SetMayAlias) {
-    if (WasMustAlias)
-      AST.TotalMayAliasSetSize += size();
-    if (AS.Alias == SetMustAlias)
-      AST.TotalMayAliasSetSize += AS.size();
+  // Merge the list of constituent pointers...
+  if (MemoryLocs.empty()) {
+    std::swap(MemoryLocs, AS.MemoryLocs);
+  } else {
+    llvm::append_range(MemoryLocs, AS.MemoryLocs);
+    AS.MemoryLocs.clear();
   }
 
   bool ASHadUnknownInsts = !AS.UnknownInsts.empty();
@@ -86,18 +87,6 @@ void AliasSet::mergeSetIn(AliasSet &AS, AliasSetTracker &AST,
   AS.Forward = this; // Forward across AS now...
   addRef();          // AS is now pointing to us...
 
-  // Merge the list of constituent pointers...
-  if (AS.PtrList) {
-    SetSize += AS.size();
-    AS.SetSize = 0;
-    *PtrListEnd = AS.PtrList;
-    AS.PtrList->setPrevInList(PtrListEnd);
-    PtrListEnd = AS.PtrListEnd;
-
-    AS.PtrList = nullptr;
-    AS.PtrListEnd = &AS.PtrList;
-    assert(*AS.PtrListEnd == nullptr && "End of list is not null?");
-  }
   if (ASHadUnknownInsts)
     AS.dropRef(AST);
 }
@@ -106,9 +95,8 @@ void AliasSetTracker::removeAliasSet(AliasSet *AS) {
   if (AliasSet *Fwd = AS->Forward) {
     Fwd->dropRef(*this);
     AS->Forward = nullptr;
-  } else // Update TotalMayAliasSetSize only if not forwarding.
-      if (AS->Alias == AliasSet::SetMayAlias)
-        TotalMayAliasSetSize -= AS->size();
+  } else // Update TotalAliasSetSize only if not forwarding.
+    TotalAliasSetSize -= AS->size();
 
   AliasSets.erase(AS);
   // If we've removed the saturated alias set, set saturated marker back to
@@ -124,42 +112,20 @@ void AliasSet::removeFromTracker(AliasSetTracker &AST) {
   AST.removeAliasSet(this);
 }
 
-void AliasSet::addPointer(AliasSetTracker &AST, PointerRec &Entry,
-                          LocationSize Size, const AAMDNodes &AAInfo,
-                          bool KnownMustAlias, bool SkipSizeUpdate) {
-  assert(!Entry.hasAliasSet() && "Entry already in set!");
-
+void AliasSet::addPointer(AliasSetTracker &AST, const MemoryLocation &MemLoc,
+                          bool KnownMustAlias) {
   // Check to see if we have to downgrade to _may_ alias.
-  if (isMustAlias())
-    if (PointerRec *P = getSomePointer()) {
-      if (!KnownMustAlias) {
-        BatchAAResults &AA = AST.getAliasAnalysis();
-        AliasResult Result = AA.alias(
-            MemoryLocation(P->getValue(), P->getSize(), P->getAAInfo()),
-            MemoryLocation(Entry.getValue(), Size, AAInfo));
-        if (Result != AliasResult::MustAlias) {
-          Alias = SetMayAlias;
-          AST.TotalMayAliasSetSize += size();
-        }
-        assert(Result != AliasResult::NoAlias && "Cannot be part of must set!");
-      } else if (!SkipSizeUpdate)
-        P->updateSizeAndAAInfo(Size, AAInfo);
-    }
-
-  Entry.setAliasSet(this);
-  Entry.updateSizeAndAAInfo(Size, AAInfo);
+  if (isMustAlias() && !KnownMustAlias)
+    for (const MemoryLocation &ASMemLoc : MemoryLocs)
+      if (!AST.getAliasAnalysis().isMustAlias(ASMemLoc, MemLoc)) {
+        Alias = SetMayAlias;
+        break;
+      }
 
   // Add it to the end of the list...
-  ++SetSize;
-  assert(*PtrListEnd == nullptr && "End of list is not null?");
-  *PtrListEnd = &Entry;
-  PtrListEnd = Entry.setPrevInList(PtrListEnd);
-  assert(*PtrListEnd == nullptr && "End of list is not null?");
-  // Entry points to alias set.
-  addRef();
-
-  if (Alias == SetMayAlias)
-    AST.TotalMayAliasSetSize++;
+  MemoryLocs.push_back(MemLoc);
+
+  AST.TotalAliasSetSize++;
 }
 
 void AliasSet::addUnknownInst(Instruction *I, BatchAAResults &AA) {
@@ -187,41 +153,21 @@ void AliasSet::addUnknownInst(Instruction *I, BatchAAResults &AA) {
 /// members in the set return the appropriate AliasResult. Otherwise return
 /// NoAlias.
 ///
-AliasResult AliasSet::aliasesPointer(const Value *Ptr, LocationSize Size,
-                                     const AAMDNodes &AAInfo,
-                                     BatchAAResults &AA) const {
+AliasResult AliasSet::aliasesPointer(const MemoryLocation &MemLoc, BatchAAResults &AA) const {
   if (AliasAny)
     return AliasResult::MayAlias;
 
-  if (Alias == SetMustAlias) {
-    assert(UnknownInsts.empty() && "Illegal must alias set!");
-
-    // If this is a set of MustAliases, only check to see if the pointer aliases
-    // SOME value in the set.
-    PointerRec *SomePtr = getSomePointer();
-    assert(SomePtr && "Empty must-alias set??");
-    return AA.alias(MemoryLocation(SomePtr->getValue(), SomePtr->getSize(),
-                                   SomePtr->getAAInfo()),
-                    MemoryLocation(Ptr, Size, AAInfo));
-  }
-
-  // If this is a may-alias set, we have to check all of the pointers in the set
-  // to be sure it doesn't alias the set...
-  for (iterator I = begin(), E = end(); I != E; ++I) {
-    AliasResult AR =
-        AA.alias(MemoryLocation(Ptr, Size, AAInfo),
-                 MemoryLocation(I.getPointer(), I.getSize(), I.getAAInfo()));
+  // Check all of the pointers in the set...
+  for (const auto &ASMemLoc : MemoryLocs) {
+    AliasResult AR = AA.alias(MemLoc, ASMemLoc);
     if (AR != AliasResult::NoAlias)
       return AR;
   }
 
   // Check the unknown instructions...
-  if (!UnknownInsts.empty()) {
-    for (Instruction *Inst : UnknownInsts)
-      if (isModOrRefSet(
-              AA.getModRefInfo(Inst, MemoryLocation(Ptr, Size, AAInfo))))
-        return AliasResult::MayAlias;
-  }
+  for (Instruction *Inst : UnknownInsts)
+    if (isModOrRefSet(AA.getModRefInfo(Inst, MemLoc)))
+      return AliasResult::MayAlias;
 
   return AliasResult::NoAlias;
 }
@@ -246,9 +192,8 @@ ModRefInfo AliasSet::aliasesUnknownInst(const Instruction *Inst,
   }
 
   ModRefInfo MR = ModRefInfo::NoModRef;
-  for (iterator I = begin(), E = end(); I != E; ++I) {
-    MR |= AA.getModRefInfo(
-        Inst, MemoryLocation(I.getPointer(), I.getSize(), I.getAAInfo()));
+  for (const auto &ASMemLoc : MemoryLocs) {
+    MR |= AA.getModRefInfo(Inst, ASMemLoc);
     if (isModAndRefSet(MR))
       return MR;
   }
@@ -257,13 +202,7 @@ ModRefInfo AliasSet::aliasesUnknownInst(const Instruction *Inst,
 }
 
 void AliasSetTracker::clear() {
-  // Delete all the PointerRec entries.
-  for (auto &I : PointerMap)
-    I.second->eraseFromList();
-
   PointerMap.clear();
-
-  // The alias sets should all be clear now.
   AliasSets.clear();
 }
 
@@ -271,9 +210,7 @@ void AliasSetTracker::clear() {
 /// alias the pointer. Return the unified set, or nullptr if no set that aliases
 /// the pointer was found. MustAliasAll is updated to true/false if the pointer
 /// is found to MustAlias all the sets it merged.
-AliasSet *AliasSetTracker::mergeAliasSetsForPointer(const Value *Ptr,
-                                                    LocationSize Size,
-                                                    const AAMDNodes &AAInfo,
+AliasSet *AliasSetTracker::mergeAliasSetsForPointer(const MemoryLocation &MemLoc,
                                                     bool &MustAliasAll) {
   AliasSet *FoundSet = nullptr;
   MustAliasAll = true;
@@ -281,7 +218,7 @@ AliasSet *AliasSetTracker::mergeAliasSetsForPointer(const Value *Ptr,
     if (AS.Forward)
       continue;
 
-    AliasResult AR = AS.aliasesPointer(Ptr, Size, AAInfo, AA);
+    AliasResult AR = AS.aliasesPointer(MemLoc, AA);
     if (AR == AliasResult::NoAlias)
       continue;
 
@@ -317,67 +254,45 @@ AliasSet *AliasSetTracker::findAliasSetForUnknownInst(Instruction *Inst) {
 }
 
 AliasSet &AliasSetTracker::getAliasSetFor(const MemoryLocation &MemLoc) {
+  // Check if this MemLoc is already registered
+  AliasSet *&AS = PointerMap[MemLoc];
+  if (AS) {
+    if (AS->Forward) {
+      // Update PointerMap entry to point to new target
+      AliasSet *OldAS = AS;
+      AS = OldAS->getForwardedTarget(*this);
+      AS->addRef();
+      OldAS->dropRef(*this);
+    }
+    return *AS;
+  }
 
-  Value * const Pointer = const_cast<Value*>(MemLoc.Ptr);
-  const LocationSize Size = MemLoc.Size;
-  const AAMDNodes &AAInfo = MemLoc.AATags;
-
-  AliasSet::PointerRec &Entry = getEntryFor(Pointer);
-
+  bool MustAliasAll = false;
   if (AliasAnyAS) {
     // At this point, the AST is saturated, so we only have one active alias
     // set. That means we already know which alias set we want to return, and
     // just need to add the pointer to that set to keep the data structure
     // consistent.
     // This, of course, means that we will never need a merge here.
-    if (Entry.hasAliasSet()) {
-      Entry.updateSizeAndAAInfo(Size, AAInfo);
-      assert(Entry.getAliasSet(*this) == AliasAnyAS &&
-             "Entry in saturated AST must belong to only alias set");
-    } else {
-      AliasAnyAS->addPointer(*this, Entry, Size, AAInfo);
-    }
-    return *AliasAnyAS;
-  }
-
-  bool MustAliasAll = false;
-  // Check to see if the pointer is already known.
-  if (Entry.hasAliasSet()) {
-    // If the size changed, we may need to merge several alias sets.
-    // Note that we can *not* return the result of mergeAliasSetsForPointer
-    // due to a quirk of alias analysis behavior. Since alias(undef, undef)
-    // is NoAlias, mergeAliasSetsForPointer(undef, ...) will not find the
-    // the right set for undef, even if it exists.
-    if (Entry.updateSizeAndAAInfo(Size, AAInfo)) {
-      mergeAliasSetsForPointer(Pointer, Size, AAInfo, MustAliasAll);
-
-      // For MustAlias sets, also update Size/AAInfo of the representative
-      // pointer.
-      AliasSet &AS = *Entry.getAliasSet(*this);
-      if (AS.isMustAlias())
-        if (AliasSet::PointerRec *P = AS.getSomePointer())
-          P->updateSizeAndAAInfo(Size, AAInfo);
-    }
-    // Return the set!
-    return *Entry.getAliasSet(*this)->getForwardedTarget(*this);
-  }
-
-  if (AliasSet *AS =
-          mergeAliasSetsForPointer(Pointer, Size, AAInfo, MustAliasAll)) {
+    AS = AliasAnyAS;
+  } else if (AliasSet *AliasAS = mergeAliasSetsForPointer(MemLoc, MustAliasAll)) {
     // Add it to the alias set it aliases.
-    AS->addPointer(*this, Entry, Size, AAInfo, MustAliasAll);
-    return *AS;
+    AS = AliasAS;
+  } else {
+    // Otherwise create a new alias set to hold the loaded pointer.
+    AS = new AliasSet();
+    AliasSets.push_back(AS);
+    MustAliasAll = true;
   }
-
-  // Otherwise create a new alias set to hold the loaded pointer.
-  AliasSets.push_back(new AliasSet());
-  AliasSets.back().addPointer(*this, Entry, Size, AAInfo, true);
-  return AliasSets.back();
+  // Register MemLoc in selected alias set
+  AS->addPointer(*this, MemLoc, MustAliasAll);
+  // PointerMap entry now points to the alias set
+  AS->addRef();
+  return *AS;
 }
 
-void AliasSetTracker::add(Value *Ptr, LocationSize Size,
-                          const AAMDNodes &AAInfo) {
-  addPointer(MemoryLocation(Ptr, Size, AAInfo), AliasSet::NoAccess);
+void AliasSetTracker::add(const MemoryLocation &Loc) {
+  addPointer(Loc, AliasSet::NoAccess);
 }
 
 void AliasSetTracker::add(LoadInst *LI) {
@@ -510,15 +425,13 @@ void AliasSetTracker::add(const AliasSetTracker &AST) {
       add(Inst);
 
     // Loop over all of the pointers in this alias set.
-    for (AliasSet::iterator ASI = AS.begin(), E = AS.end(); ASI != E; ++ASI)
-      addPointer(
-          MemoryLocation(ASI.getPointer(), ASI.getSize(), ASI.getAAInfo()),
-          (AliasSet::AccessLattice)AS.Access);
+    for (const MemoryLocation &ASMemLoc : AS.MemoryLocs)
+      addPointer(ASMemLoc, (AliasSet::AccessLattice)AS.Access);
   }
 }
 
 AliasSet &AliasSetTracker::mergeAllAliasSets() {
-  assert(!AliasAnyAS && (TotalMayAliasSetSize > SaturationThreshold) &&
+  assert(!AliasAnyAS && (TotalAliasSetSize > SaturationThreshold) &&
          "Full merge should happen once, when the saturation threshold is "
          "reached");
 
@@ -559,7 +472,7 @@ AliasSet &AliasSetTracker::addPointer(MemoryLocation Loc,
   AliasSet &AS = getAliasSetFor(Loc);
   AS.Access |= E;
 
-  if (!AliasAnyAS && (TotalMayAliasSetSize > SaturationThreshold)) {
+  if (!AliasAnyAS && (TotalAliasSetSize > SaturationThreshold)) {
     // The AST is now saturated. From here on, we conservatively consider all
     // pointers to alias each-other.
     return mergeAllAliasSets();
@@ -585,17 +498,18 @@ void AliasSet::print(raw_ostream &OS) const {
   if (Forward)
     OS << " forwarding to " << (void*)Forward;
 
-  if (!empty()) {
+  if (!MemoryLocs.empty()) {
+    ListSeparator LS;
     OS << "Pointers: ";
-    for (iterator I = begin(), E = end(); I != E; ++I) {
-      if (I != begin()) OS << ", ";
-      I.getPointer()->printAsOperand(OS << "(");
-      if (I.getSize() == LocationSize::afterPointer())
+    for (const MemoryLocation &MemLoc : MemoryLocs) {
+      OS << LS;
+      MemLoc.Ptr->printAsOperand(OS << "(");
+      if (MemLoc.Size == LocationSize::afterPointer())
         OS << ", unknown after)";
-      else if (I.getSize() == LocationSize::beforeOrAfterPointer())
+      else if (MemLoc.Size == LocationSize::beforeOrAfterPointer())
         OS << ", unknown before-or-after)";
       else
-        OS << ", " << I.getSize() << ")";
+        OS << ", " << MemLoc.Size << ")";
     }
   }
   if (!UnknownInsts.empty()) {
@@ -616,7 +530,7 @@ void AliasSetTracker::print(raw_ostream &OS) const {
   OS << "Alias Set Tracker: " << AliasSets.size();
   if (AliasAnyAS)
     OS << " (Saturated)";
-  OS << " alias sets for " << PointerMap.size() << " pointer values.\n";
+  OS << " alias sets for " << PointerMap.size() << " memory locations.\n";
   for (const AliasSet &AS : *this)
     AS.print(OS);
   OS << "\n";
diff --git a/llvm/lib/Analysis/LoopAccessAnalysis.cpp b/llvm/lib/Analysis/LoopAccessAnalysis.cpp
index 9a9d06a81f4918..b64d6bea941121 100644
--- a/llvm/lib/Analysis/LoopAccessAnalysis.cpp
+++ b/llvm/lib/Analysis/LoopAccessAnalysis.cpp
@@ -666,7 +666,7 @@ class AccessAnalysis {
   /// Register a load  and whether it is only read from.
   void addLoad(MemoryLocation &Loc, Type *AccessTy, bool IsReadOnly) {
     Value *Ptr = const_cast<Value*>(Loc.Ptr);
-    AST.add(Ptr, LocationSize::beforeOrAfterPointer(), Loc.AATags);
+    AST.add(Loc.getWithNewSize(LocationSize::beforeOrAfterPointer()));
     Accesses[MemAccessInfo(Ptr, false)].insert(AccessTy);
     if (IsReadOnly)
       ReadOnlyPtr.insert(Ptr);
@@ -675,7 +675,7 @@ class AccessAnalysis {
   /// Register a store.
   void addStore(MemoryLocation &Loc, Type *AccessTy) {
     Value *Ptr = const_cast<Value*>(Loc.Ptr);
-    AST.add(Ptr, LocationSize::beforeOrAfterPointer(), Loc.AATags);
+    AST.add(Loc.getWithNewSize(LocationSize::beforeOrAfterPointer()));
     Accesses[MemAccessInfo(Ptr, true)].insert(AccessTy);
   }
 
@@ -1127,7 +1127,7 @@ bool AccessAnalysis::canCheckPtrAtRT(RuntimePointerChecking &RtCheck,
     // collect MemAccessInfos for later.
     SmallVector<MemAccessInfo, 4> AccessInfos;
     for (const auto &A : AS) {
-      Value *Ptr = A.getValue();
+      Value *Ptr = const_cast<Value *>(A.Ptr);
       bool IsWrite = Accesses.count(MemAccessInfo(Ptr, true));
       if (IsWrite)
         ++NumWritePtrChecks;
@@ -1143,7 +1143,8 @@ bool AccessAnalysis::canCheckPtrAtRT(RuntimePointerChecking &RtCheck,
       assert((AS.size() <= 1 ||
               all_of(AS,
                      [this](auto AC) {
-                       MemAccessInfo AccessWrite(AC.getValue(), true);
+                       MemAccessInfo AccessWrite(const_cast<Value *>(AC.Ptr),
+                                                 true);
                        return DepCands.findValue(AccessWrite) == DepCands.end();
                      })) &&
              "Can only skip updating CanDoRT below, if all entries in AS "
@@ -1290,7 +1291,7 @@ void AccessAnalysis::processMemAccesses() {
       PtrAccessMap &S = UseDeferred ? DeferredAccesses : Accesses;
 
       for (const auto &AV : AS) {
-        Value *Ptr = AV.getValue();
+        Value *Ptr = const_cast<Value *>(AV.Ptr);
 
         // For a single memory access in AliasSetTracker, Accesses may contain
         // both read and write, and they both need to be handled for CheckDeps.
diff --git a/llvm/lib/Transforms/Scalar/LICM.cpp b/llvm/lib/Transforms/Scalar/LICM.cpp
index d0afe09ce41dfb..b7981422bf1643 100644
--- a/llvm/lib/Transforms/Scalar/LICM.cpp
+++ b/llvm/lib/Transforms/Scalar/LICM.cpp
@@ -2321,7 +2321,7 @@ collectPromotionCandidates(MemorySSA *MSSA, AliasAnalysis *AA, Loop *L) {
   for (auto [Set, HasReadsOutsideSet] : Sets) {
     SmallSetVector<Value *, 8> PointerMustAliases;
     for (const auto &ASI : *Set)
-      PointerMustAliases.insert(ASI.getValue());
+      PointerMustAliases.insert(const_cast<Value *>(ASI.Ptr));
     Result.emplace_back(std::move(PointerMustAliases), HasReadsOutsideSet);
   }
 
diff --git a/llvm/lib/Transforms/Scalar/LoopVersioningLICM.cpp b/llvm/lib/Transforms/Scalar/LoopVersioningLICM.cpp
index 9d5e6693c0e53a..7d252f67083498 100644
--- a/llvm/lib/Transforms/Scalar/LoopVersioningLICM.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopVersioningLICM.cpp
@@ -258,13 +258,13 @@ bool LoopVersioningLICM::legalLoopMemoryAccesses() {
     // With MustAlias its not worth adding runtime bound check.
     if (AS.isMustAlias())
       return false;
-    Value *SomePtr = AS.begin()->getValue();
+    const Value *SomePtr = AS.begin()->Ptr;
     bool TypeCheck = true;
     // Check for Mod & MayAlias
     HasMayAlias |= AS.isMayAlias();
     HasMod |= AS.isMod();
     for (const auto &A : AS) {
-      Value *Ptr = A.getValue();
+      const Value *Ptr = A.Ptr;
       // Alias tracker should have pointers of same data type.
       //
       // FIXME: check no longer effective since opaque pointers?
diff --git a/llvm/test/Analysis/AliasSet/argmemonly.ll b/llvm/test/Analysis/AliasSet/argmemonly.ll
index c2cc8d853d15e4..c4183dde685960 100644
--- a/llvm/test/Analysis/AliasSet/argmemonly.ll
+++ b/llvm/test/Analysis/AliasSet/argmemonly.ll
@@ -4,7 +4,7 @@
 @d = global i8 2, align 1
 
 ; CHECK: Alias sets for function 'test_alloca_argmemonly':
-; CHECK-NEXT: Alias Set Tracker: 2 alias sets for 3 pointer values.
+; CHECK-NEXT: Alias Set Tracker: 2 alias sets for 3 memory locations.
 ; CHECK-NEXT: AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %a, LocationSize::precise(1))
 ; CHECK-NEXT: AliasSet[0x{{[0-9a-f]+}}, 2] may alias, Mod/Ref    Pointers: (ptr %d, unknown before-or-after), (ptr %s, unknown before-or-after)
 define void @test_alloca_argmemonly(ptr %s, ptr %d) {
@@ -16,9 +16,9 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test_readonly_arg'
-; CHECK-NEXT: Alias Set Tracker: 2 alias sets for 2 pointer values.
+; CHECK-NEXT: Alias Set Tracker: 2 alias sets for 3 memory locations.
 ; CHECK-NEXT: AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %d, unknown before-or-after)
-; CHECK-NEXT: AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Ref       Pointers: (ptr %s, unknown before-or-after)
+; CHECK-NEXT: AliasSet[0x{{[0-9a-f]+}}, 2] must alias, Ref       Pointers: (ptr %s, unknown before-or-after), (ptr %s, LocationSize::precise(1))
 define i8 @test_readonly_arg(ptr noalias %s, ptr noalias %d) {
 entry:
   call void @my_memcpy(ptr %d, ptr %s, i64 1)
@@ -27,7 +27,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test_noalias_argmemonly':
-; CHECK-NEXT: Alias Set Tracker: 2 alias sets for 3 pointer values.
+; CHECK-NEXT: Alias Set Tracker: 2 alias sets for 3 memory locations.
 ; CHECK-NEXT: AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %a, LocationSize::precise(1))
 ; CHECK-NEXT: AliasSet[0x{{[0-9a-f]+}}, 2] may alias, Mod/Ref    Pointers: (ptr %d, unknown before-or-after), (ptr %s, unknown before-or-after)
 define void @test_noalias_argmemonly(ptr noalias %a, ptr %s, ptr %d) {
@@ -38,9 +38,9 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test5':
-; CHECK-NEXT: Alias Set Tracker: 2 alias sets for 2 pointer values.
-; CHECK-NEXT: AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod/Ref Pointers: (ptr %a, unknown before-or-after)
-; CHECK-NEXT: AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod Pointers: (ptr %b, unknown before-or-after)
+; CHECK-NEXT: Alias Set Tracker: 2 alias sets for 4 memory locations.
+; CHECK-NEXT: AliasSet[0x{{[0-9a-f]+}}, 2] must alias, Mod/Ref Pointers: (ptr %a, LocationSize::precise(1)), (ptr %a, unknown before-or-after)
+; CHECK-NEXT: AliasSet[0x{{[0-9a-f]+}}, 2] must alias, Mod Pointers: (ptr %b, unknown before-or-after), (ptr %b, LocationSize::precise(1))
 define void @test5(ptr noalias %a, ptr noalias %b) {
 entry:
   store i8 1, ptr %a, align 1
@@ -50,9 +50,9 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test_argcollapse':
-; CHECK-NEXT: Alias Set Tracker: 2 alias sets for 2 pointer values.
-; CHECK-NEXT: AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod/Ref Pointers: (ptr %a, unknown before-or-after)
-; CHECK-NEXT: AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod/Ref Pointers: (ptr %b, unknown before-or-after)
+; CHECK-NEXT: Alias Set Tracker: 2 alias sets for 4 memory locations.
+; CHECK-NEXT: AliasSet[0x{{[0-9a-f]+}}, 2] must alias, Mod/Ref Pointers: (ptr %a, LocationSize::precise(1)), (ptr %a, unknown before-or-after)
+; CHECK-NEXT: AliasSet[0x{{[0-9a-f]+}}, 2] must alias, Mod/Ref Pointers: (ptr %b, unknown before-or-after), (ptr %b, LocationSize::precise(1))
 define void @test_argcollapse(ptr noalias %a, ptr noalias %b) {
 entry:
   store i8 1, ptr %a, align 1
@@ -62,7 +62,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test_memcpy1':
-; CHECK-NEXT: Alias Set Tracker: 2 alias sets for 2 pointer values.
+; CHECK-NEXT: Alias Set Tracker: 2 alias sets for 2 memory locations.
 ; CHECK-NEXT: AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod/Ref Pointers: (ptr %b, unknown before-or-after)
 ; CHECK-NEXT: AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod/Ref Pointers: (ptr %a, unknown before-or-after)
 define void @test_memcpy1(ptr noalias %a, ptr noalias %b) {
@@ -73,7 +73,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test_memset1':
-; CHECK-NEXT: Alias Set Tracker: 1 alias sets for 1 pointer values.
+; CHECK-NEXT: Alias Set Tracker: 1 alias sets for 1 memory locations.
 ; CHECK-NEXT: AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod Pointers: (ptr %a, unknown before-or-after)
 define void @test_memset1() {
 entry:
@@ -83,7 +83,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test_memset2':
-; CHECK-NEXT: Alias Set Tracker: 1 alias sets for 1 pointer values.
+; CHECK-NEXT: Alias Set Tracker: 1 alias sets for 1 memory locations.
 ; CHECK-NEXT: AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod Pointers: (ptr %a, unknown before-or-after)
 define void @test_memset2(ptr %a) {
 entry:
@@ -92,7 +92,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test_memset3':
-; CHECK-NEXT: Alias Set Tracker: 1 alias sets for 2 pointer values.
+; CHECK-NEXT: Alias Set Tracker: 1 alias sets for 2 memory locations.
 ; CHECK-NEXT: AliasSet[0x{{[0-9a-f]+}}, 2] may alias, Mod Pointers: (ptr %a, unknown before-or-after), (ptr %b, unknown before-or-after)
 define void @test_memset3(ptr %a, ptr %b) {
 entry:
@@ -104,7 +104,7 @@ entry:
 ;; PICKUP HERE
 
 ; CHECK: Alias sets for function 'test_memset4':
-; CHECK-NEXT: Alias Set Tracker: 2 alias sets for 2 pointer values.
+; CHECK-NEXT: Alias Set Tracker: 2 alias sets for 2 memory locations.
 ; CHECK-NEXT: AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod Pointers: (ptr %a, unknown before-or-after)
 ; CHECK-NEXT: AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod Pointers: (ptr %b, unknown before-or-after)
 define void @test_memset4(ptr noalias %a, ptr noalias %b) {
@@ -120,7 +120,7 @@ declare void @my_memmove(ptr nocapture, ptr nocapture readonly, i64) argmemonly
 
 
 ; CHECK: Alias sets for function 'test_attribute_intersect':
-; CHECK-NEXT: Alias Set Tracker: 1 alias sets for 1 pointer values.
+; CHECK-NEXT: Alias Set Tracker: 1 alias sets for 1 memory locations.
 ; CHECK-NEXT: AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Ref       Pointers: (ptr %a, LocationSize::precise(1))
 define i8 @test_attribute_intersect(ptr noalias %a) {
 entry:
diff --git a/llvm/test/Analysis/AliasSet/guards.ll b/llvm/test/Analysis/AliasSet/guards.ll
index 00be475f51b9d7..df13d87374f359 100644
--- a/llvm/test/Analysis/AliasSet/guards.ll
+++ b/llvm/test/Analysis/AliasSet/guards.ll
@@ -2,7 +2,7 @@
 declare void @llvm.experimental.guard(i1, ...)
 
 ; CHECK: Alias sets for function 'test0':
-; CHECK: Alias Set Tracker: 3 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 3 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Ref       Pointers: (ptr %a, LocationSize::precise(1))
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] may alias, Ref
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
@@ -18,7 +18,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test1':
-; CHECK: Alias Set Tracker: 3 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 3 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Ref       Pointers: (ptr %a, LocationSize::precise(1))
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] may alias, Ref
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
@@ -34,7 +34,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test2':
-; CHECK: Alias Set Tracker: 3 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 3 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %a, LocationSize::precise(1))
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] may alias, Ref
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
@@ -50,7 +50,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test3':
-; CHECK: Alias Set Tracker: 3 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 3 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %a, LocationSize::precise(1))
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] may alias, Ref
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
@@ -66,7 +66,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test4':
-; CHECK: Alias Set Tracker: 3 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 3 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] may alias, Ref
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Ref       Pointers: (ptr %a, LocationSize::precise(1))
@@ -82,7 +82,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test5':
-; CHECK: Alias Set Tracker: 3 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 3 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] may alias, Ref
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Ref       Pointers: (ptr %a, LocationSize::precise(1))
@@ -98,7 +98,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test6':
-; CHECK: Alias Set Tracker: 3 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 3 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] may alias, Ref
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %a, LocationSize::precise(1))
@@ -114,7 +114,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test7':
-; CHECK: Alias Set Tracker: 3 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 3 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] may alias, Ref
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %a, LocationSize::precise(1))
@@ -130,7 +130,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test8':
-; CHECK: Alias Set Tracker: 3 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 3 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] may alias, Ref
 ; CHECK:     2 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ],   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Ref       Pointers: (ptr %a, LocationSize::precise(1))
@@ -147,7 +147,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test9':
-; CHECK: Alias Set Tracker: 3 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 3 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] may alias, Ref
 ; CHECK:     2 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ],   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Ref       Pointers: (ptr %a, LocationSize::precise(1))
@@ -164,7 +164,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test10':
-; CHECK: Alias Set Tracker: 3 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 3 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] may alias, Ref
 ; CHECK:     2 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ],   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %a, LocationSize::precise(1))
@@ -181,7 +181,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test11':
-; CHECK: Alias Set Tracker: 3 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 3 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] may alias, Ref
 ; CHECK:     2 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ],   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %a, LocationSize::precise(1))
@@ -198,7 +198,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test12':
-; CHECK: Alias Set Tracker: 2 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Ref       Pointers: (ptr %a, LocationSize::precise(1))
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 2] may alias, Ref       Pointers: (ptr %b, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
@@ -212,7 +212,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test13':
-; CHECK: Alias Set Tracker: 2 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Ref       Pointers: (ptr %a, LocationSize::precise(1))
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 2] may alias, Mod/Ref   Pointers: (ptr %b, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
@@ -226,7 +226,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test14':
-; CHECK: Alias Set Tracker: 2 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %a, LocationSize::precise(1))
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 2] may alias, Ref       Pointers: (ptr %b, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
@@ -240,7 +240,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test15':
-; CHECK: Alias Set Tracker: 2 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %a, LocationSize::precise(1))
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 2] may alias, Mod/Ref   Pointers: (ptr %b, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
@@ -254,7 +254,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test16':
-; CHECK: Alias Set Tracker: 2 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 2] may alias, Ref       Pointers: (ptr %b, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Ref       Pointers: (ptr %a, LocationSize::precise(1))
@@ -268,7 +268,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test17':
-; CHECK: Alias Set Tracker: 2 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 2] may alias, Mod/Ref   Pointers: (ptr %b, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Ref       Pointers: (ptr %a, LocationSize::precise(1))
@@ -282,7 +282,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test18':
-; CHECK: Alias Set Tracker: 2 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 2] may alias, Ref       Pointers: (ptr %b, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %a, LocationSize::precise(1))
@@ -296,7 +296,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test19':
-; CHECK: Alias Set Tracker: 2 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 2] may alias, Mod/Ref   Pointers: (ptr %b, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %a, LocationSize::precise(1))
@@ -310,7 +310,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test20':
-; CHECK: Alias Set Tracker: 2 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 2] may alias, Ref       Pointers: (ptr %b, LocationSize::precise(1))
 ; CHECK:     2 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ],   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Ref       Pointers: (ptr %a, LocationSize::precise(1))
@@ -325,7 +325,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test21':
-; CHECK: Alias Set Tracker: 2 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 2] may alias, Mod/Ref   Pointers: (ptr %b, LocationSize::precise(1))
 ; CHECK:     2 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ],   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Ref       Pointers: (ptr %a, LocationSize::precise(1))
@@ -340,7 +340,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test22':
-; CHECK: Alias Set Tracker: 2 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 2] may alias, Ref       Pointers: (ptr %b, LocationSize::precise(1))
 ; CHECK:     2 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ],   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %a, LocationSize::precise(1))
@@ -355,7 +355,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test23':
-; CHECK: Alias Set Tracker: 2 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 2] may alias, Mod/Ref   Pointers: (ptr %b, LocationSize::precise(1))
 ; CHECK:     2 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ],   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %a, LocationSize::precise(1))
@@ -370,7 +370,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test24':
-; CHECK: Alias Set Tracker: 2 alias sets for 3 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 3 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 3] may alias, Ref       Pointers: (ptr %ptr_b, LocationSize::precise(8)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Ref       Pointers: (ptr %a, LocationSize::precise(1))
@@ -385,7 +385,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test25':
-; CHECK: Alias Set Tracker: 2 alias sets for 3 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 3 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 3] may alias, Mod/Ref   Pointers: (ptr %ptr_b, LocationSize::precise(8)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Ref       Pointers: (ptr %a, LocationSize::precise(1))
@@ -400,7 +400,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test26':
-; CHECK: Alias Set Tracker: 2 alias sets for 3 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 3 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 3] may alias, Ref       Pointers: (ptr %ptr_b, LocationSize::precise(8)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %a, LocationSize::precise(1))
@@ -415,7 +415,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test27':
-; CHECK: Alias Set Tracker: 2 alias sets for 3 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 3 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 3] may alias, Mod/Ref   Pointers: (ptr %ptr_b, LocationSize::precise(8)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %a, LocationSize::precise(1))
@@ -430,7 +430,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test28':
-; CHECK: Alias Set Tracker: 2 alias sets for 3 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 3 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 3] may alias, Ref       Pointers: (ptr %ptr_b, LocationSize::precise(8)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Ref       Pointers: (ptr %a, LocationSize::precise(1))
@@ -445,7 +445,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test29':
-; CHECK: Alias Set Tracker: 2 alias sets for 3 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 3 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 3] may alias, Mod/Ref   Pointers: (ptr %ptr_b, LocationSize::precise(8)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Ref       Pointers: (ptr %a, LocationSize::precise(1))
@@ -460,7 +460,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test30':
-; CHECK: Alias Set Tracker: 2 alias sets for 3 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 3 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 3] may alias, Ref       Pointers: (ptr %ptr_b, LocationSize::precise(8)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %a, LocationSize::precise(1))
@@ -475,7 +475,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test31':
-; CHECK: Alias Set Tracker: 2 alias sets for 3 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 3 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 3] may alias, Mod/Ref   Pointers: (ptr %ptr_b, LocationSize::precise(8)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %a, LocationSize::precise(1))
@@ -490,7 +490,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test32':
-; CHECK: Alias Set Tracker: 2 alias sets for 3 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 3 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 3] may alias, Ref       Pointers: (ptr %ptr_b, LocationSize::precise(8)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     2 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ],   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Ref       Pointers: (ptr %a, LocationSize::precise(1))
@@ -506,7 +506,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test33':
-; CHECK: Alias Set Tracker: 2 alias sets for 3 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 3 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 3] may alias, Mod/Ref   Pointers: (ptr %ptr_b, LocationSize::precise(8)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     2 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ],   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Ref       Pointers: (ptr %a, LocationSize::precise(1))
@@ -522,7 +522,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test34':
-; CHECK: Alias Set Tracker: 2 alias sets for 3 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 3 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 3] may alias, Ref       Pointers: (ptr %ptr_b, LocationSize::precise(8)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     2 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ],   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %a, LocationSize::precise(1))
@@ -538,7 +538,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test35':
-; CHECK: Alias Set Tracker: 2 alias sets for 3 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 3 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 3] may alias, Mod/Ref   Pointers: (ptr %ptr_b, LocationSize::precise(8)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     2 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ],   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %a, LocationSize::precise(1))
@@ -554,7 +554,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test36':
-; CHECK: Alias Set Tracker: 2 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 2] may alias, Ref       Pointers: (ptr %a, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Ref       Pointers: (ptr %b, LocationSize::precise(1))
@@ -568,7 +568,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test37':
-; CHECK: Alias Set Tracker: 2 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 2] may alias, Ref       Pointers: (ptr %a, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %b, LocationSize::precise(1))
@@ -582,7 +582,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test38':
-; CHECK: Alias Set Tracker: 2 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 2] may alias, Mod/Ref   Pointers: (ptr %a, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Ref       Pointers: (ptr %b, LocationSize::precise(1))
@@ -596,7 +596,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test39':
-; CHECK: Alias Set Tracker: 2 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 2] may alias, Mod/Ref   Pointers: (ptr %a, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %b, LocationSize::precise(1))
@@ -610,7 +610,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test40':
-; CHECK: Alias Set Tracker: 2 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 2] may alias, Ref       Pointers: (ptr %a, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Ref       Pointers: (ptr %b, LocationSize::precise(1))
@@ -624,7 +624,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test41':
-; CHECK: Alias Set Tracker: 2 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 2] may alias, Ref       Pointers: (ptr %a, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %b, LocationSize::precise(1))
@@ -638,7 +638,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test42':
-; CHECK: Alias Set Tracker: 2 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 2] may alias, Mod/Ref   Pointers: (ptr %a, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Ref       Pointers: (ptr %b, LocationSize::precise(1))
@@ -652,7 +652,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test43':
-; CHECK: Alias Set Tracker: 2 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 2] may alias, Mod/Ref   Pointers: (ptr %a, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %b, LocationSize::precise(1))
@@ -666,7 +666,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test44':
-; CHECK: Alias Set Tracker: 2 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 2] may alias, Ref       Pointers: (ptr %a, LocationSize::precise(1))
 ; CHECK:     2 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ],   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Ref       Pointers: (ptr %b, LocationSize::precise(1))
@@ -681,7 +681,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test45':
-; CHECK: Alias Set Tracker: 2 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 2] may alias, Ref       Pointers: (ptr %a, LocationSize::precise(1))
 ; CHECK:     2 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ],   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %b, LocationSize::precise(1))
@@ -696,7 +696,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test46':
-; CHECK: Alias Set Tracker: 2 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 2] may alias, Mod/Ref   Pointers: (ptr %a, LocationSize::precise(1))
 ; CHECK:     2 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ],   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Ref       Pointers: (ptr %b, LocationSize::precise(1))
@@ -711,7 +711,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test47':
-; CHECK: Alias Set Tracker: 2 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 2] may alias, Mod/Ref   Pointers: (ptr %a, LocationSize::precise(1))
 ; CHECK:     2 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ],   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %b, LocationSize::precise(1))
@@ -726,7 +726,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test48':
-; CHECK: Alias Set Tracker: 1 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 3] may alias, Ref       Pointers: (ptr %a, LocationSize::precise(1)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 define void @test48(ptr %a, ptr %b, i1 %cond_b) {
@@ -738,7 +738,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test49':
-; CHECK: Alias Set Tracker: 1 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 3] may alias, Mod/Ref   Pointers: (ptr %a, LocationSize::precise(1)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 define void @test49(ptr %a, ptr %b, i1 %cond_b) {
@@ -750,7 +750,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test50':
-; CHECK: Alias Set Tracker: 1 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 3] may alias, Mod/Ref   Pointers: (ptr %a, LocationSize::precise(1)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 define void @test50(ptr %a, ptr %b, i1 %cond_b) {
@@ -762,7 +762,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test51':
-; CHECK: Alias Set Tracker: 1 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 3] may alias, Mod/Ref   Pointers: (ptr %a, LocationSize::precise(1)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 define void @test51(ptr %a, ptr %b, i1 %cond_b) {
@@ -774,7 +774,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test52':
-; CHECK: Alias Set Tracker: 1 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 3] may alias, Ref       Pointers: (ptr %a, LocationSize::precise(1)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ]
 define void @test52(ptr %a, i1 %cond_a, ptr %b) {
@@ -786,7 +786,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test53':
-; CHECK: Alias Set Tracker: 1 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 3] may alias, Mod/Ref   Pointers: (ptr %a, LocationSize::precise(1)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ]
 define void @test53(ptr %a, i1 %cond_a, ptr %b) {
@@ -798,7 +798,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test54':
-; CHECK: Alias Set Tracker: 1 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 3] may alias, Mod/Ref   Pointers: (ptr %a, LocationSize::precise(1)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ]
 define void @test54(ptr %a, i1 %cond_a, ptr %b) {
@@ -810,7 +810,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test55':
-; CHECK: Alias Set Tracker: 1 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 3] may alias, Mod/Ref   Pointers: (ptr %a, LocationSize::precise(1)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ]
 define void @test55(ptr %a, i1 %cond_a, ptr %b) {
@@ -822,7 +822,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test56':
-; CHECK: Alias Set Tracker: 1 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 3] may alias, Ref       Pointers: (ptr %a, LocationSize::precise(1)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     2 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ],   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 define void @test56(ptr %a, i1 %cond_a, ptr %b, i1 %cond_b) {
@@ -835,7 +835,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test57':
-; CHECK: Alias Set Tracker: 1 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 3] may alias, Mod/Ref   Pointers: (ptr %a, LocationSize::precise(1)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     2 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ],   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 define void @test57(ptr %a, i1 %cond_a, ptr %b, i1 %cond_b) {
@@ -848,7 +848,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test58':
-; CHECK: Alias Set Tracker: 1 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 3] may alias, Mod/Ref   Pointers: (ptr %a, LocationSize::precise(1)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     2 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ],   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 define void @test58(ptr %a, i1 %cond_a, ptr %b, i1 %cond_b) {
@@ -861,7 +861,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test59':
-; CHECK: Alias Set Tracker: 1 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 3] may alias, Mod/Ref   Pointers: (ptr %a, LocationSize::precise(1)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     2 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ],   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 define void @test59(ptr %a, i1 %cond_a, ptr %b, i1 %cond_b) {
@@ -874,7 +874,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test60':
-; CHECK: Alias Set Tracker: 1 alias sets for 3 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 3 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 4] may alias, Ref       Pointers: (ptr %ptr_b, LocationSize::precise(8)), (ptr %a, LocationSize::precise(1)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 define void @test60(ptr %a, ptr %ptr_b, i1 %cond_b) {
@@ -887,7 +887,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test61':
-; CHECK: Alias Set Tracker: 1 alias sets for 3 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 3 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 4] may alias, Mod/Ref   Pointers: (ptr %ptr_b, LocationSize::precise(8)), (ptr %a, LocationSize::precise(1)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 define void @test61(ptr %a, ptr %ptr_b, i1 %cond_b) {
@@ -900,7 +900,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test62':
-; CHECK: Alias Set Tracker: 1 alias sets for 3 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 3 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 4] may alias, Mod/Ref   Pointers: (ptr %ptr_b, LocationSize::precise(8)), (ptr %a, LocationSize::precise(1)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 define void @test62(ptr %a, ptr %ptr_b, i1 %cond_b) {
@@ -913,7 +913,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test63':
-; CHECK: Alias Set Tracker: 1 alias sets for 3 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 3 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 4] may alias, Mod/Ref   Pointers: (ptr %ptr_b, LocationSize::precise(8)), (ptr %a, LocationSize::precise(1)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 define void @test63(ptr %a, ptr %ptr_b, i1 %cond_b) {
@@ -926,7 +926,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test64':
-; CHECK: Alias Set Tracker: 1 alias sets for 3 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 3 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 4] may alias, Ref       Pointers: (ptr %ptr_b, LocationSize::precise(8)), (ptr %a, LocationSize::precise(1)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ]
 define void @test64(ptr %a, i1 %cond_a, ptr %ptr_b) {
@@ -939,7 +939,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test65':
-; CHECK: Alias Set Tracker: 1 alias sets for 3 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 3 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 4] may alias, Mod/Ref   Pointers: (ptr %ptr_b, LocationSize::precise(8)), (ptr %a, LocationSize::precise(1)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ]
 define void @test65(ptr %a, i1 %cond_a, ptr %ptr_b) {
@@ -952,7 +952,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test66':
-; CHECK: Alias Set Tracker: 1 alias sets for 3 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 3 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 4] may alias, Mod/Ref   Pointers: (ptr %ptr_b, LocationSize::precise(8)), (ptr %a, LocationSize::precise(1)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ]
 define void @test66(ptr %a, i1 %cond_a, ptr %ptr_b) {
@@ -965,7 +965,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test67':
-; CHECK: Alias Set Tracker: 1 alias sets for 3 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 3 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 4] may alias, Mod/Ref   Pointers: (ptr %ptr_b, LocationSize::precise(8)), (ptr %a, LocationSize::precise(1)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ]
 define void @test67(ptr %a, i1 %cond_a, ptr %ptr_b) {
@@ -978,7 +978,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test68':
-; CHECK: Alias Set Tracker: 1 alias sets for 3 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 3 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 4] may alias, Ref       Pointers: (ptr %ptr_b, LocationSize::precise(8)), (ptr %a, LocationSize::precise(1)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     2 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ],   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 define void @test68(ptr %a, i1 %cond_a, ptr %ptr_b, i1 %cond_b) {
@@ -992,7 +992,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test69':
-; CHECK: Alias Set Tracker: 1 alias sets for 3 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 3 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 4] may alias, Mod/Ref   Pointers: (ptr %ptr_b, LocationSize::precise(8)), (ptr %a, LocationSize::precise(1)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     2 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ],   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 define void @test69(ptr %a, i1 %cond_a, ptr %ptr_b, i1 %cond_b) {
@@ -1006,7 +1006,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test70':
-; CHECK: Alias Set Tracker: 1 alias sets for 3 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 3 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 4] may alias, Mod/Ref   Pointers: (ptr %ptr_b, LocationSize::precise(8)), (ptr %a, LocationSize::precise(1)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     2 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ],   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 define void @test70(ptr %a, i1 %cond_a, ptr %ptr_b, i1 %cond_b) {
@@ -1020,7 +1020,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test71':
-; CHECK: Alias Set Tracker: 1 alias sets for 3 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 3 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 4] may alias, Mod/Ref   Pointers: (ptr %ptr_b, LocationSize::precise(8)), (ptr %a, LocationSize::precise(1)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     2 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ],   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 define void @test71(ptr %a, i1 %cond_a, ptr %ptr_b, i1 %cond_b) {
@@ -1034,7 +1034,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test72':
-; CHECK: Alias Set Tracker: 2 alias sets for 3 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 3 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 3] may alias, Ref       Pointers: (ptr %ptr_a, LocationSize::precise(8)), (ptr %a, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Ref       Pointers: (ptr %b, LocationSize::precise(1))
@@ -1049,7 +1049,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test73':
-; CHECK: Alias Set Tracker: 2 alias sets for 3 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 3 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 3] may alias, Ref       Pointers: (ptr %ptr_a, LocationSize::precise(8)), (ptr %a, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %b, LocationSize::precise(1))
@@ -1064,7 +1064,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test74':
-; CHECK: Alias Set Tracker: 2 alias sets for 3 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 3 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 3] may alias, Mod/Ref   Pointers: (ptr %ptr_a, LocationSize::precise(8)), (ptr %a, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Ref       Pointers: (ptr %b, LocationSize::precise(1))
@@ -1079,7 +1079,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test75':
-; CHECK: Alias Set Tracker: 2 alias sets for 3 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 3 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 3] may alias, Mod/Ref   Pointers: (ptr %ptr_a, LocationSize::precise(8)), (ptr %a, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %b, LocationSize::precise(1))
@@ -1094,7 +1094,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test76':
-; CHECK: Alias Set Tracker: 2 alias sets for 3 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 3 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 3] may alias, Ref       Pointers: (ptr %ptr_a, LocationSize::precise(8)), (ptr %a, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Ref       Pointers: (ptr %b, LocationSize::precise(1))
@@ -1109,7 +1109,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test77':
-; CHECK: Alias Set Tracker: 2 alias sets for 3 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 3 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 3] may alias, Ref       Pointers: (ptr %ptr_a, LocationSize::precise(8)), (ptr %a, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %b, LocationSize::precise(1))
@@ -1124,7 +1124,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test78':
-; CHECK: Alias Set Tracker: 2 alias sets for 3 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 3 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 3] may alias, Mod/Ref   Pointers: (ptr %ptr_a, LocationSize::precise(8)), (ptr %a, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Ref       Pointers: (ptr %b, LocationSize::precise(1))
@@ -1139,7 +1139,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test79':
-; CHECK: Alias Set Tracker: 2 alias sets for 3 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 3 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 3] may alias, Mod/Ref   Pointers: (ptr %ptr_a, LocationSize::precise(8)), (ptr %a, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %b, LocationSize::precise(1))
@@ -1154,7 +1154,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test80':
-; CHECK: Alias Set Tracker: 2 alias sets for 3 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 3 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 3] may alias, Ref       Pointers: (ptr %ptr_a, LocationSize::precise(8)), (ptr %a, LocationSize::precise(1))
 ; CHECK:     2 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ],   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Ref       Pointers: (ptr %b, LocationSize::precise(1))
@@ -1170,7 +1170,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test81':
-; CHECK: Alias Set Tracker: 2 alias sets for 3 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 3 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 3] may alias, Ref       Pointers: (ptr %ptr_a, LocationSize::precise(8)), (ptr %a, LocationSize::precise(1))
 ; CHECK:     2 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ],   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %b, LocationSize::precise(1))
@@ -1186,7 +1186,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test82':
-; CHECK: Alias Set Tracker: 2 alias sets for 3 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 3 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 3] may alias, Mod/Ref   Pointers: (ptr %ptr_a, LocationSize::precise(8)), (ptr %a, LocationSize::precise(1))
 ; CHECK:     2 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ],   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Ref       Pointers: (ptr %b, LocationSize::precise(1))
@@ -1202,7 +1202,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test83':
-; CHECK: Alias Set Tracker: 2 alias sets for 3 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 3 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 3] may alias, Mod/Ref   Pointers: (ptr %ptr_a, LocationSize::precise(8)), (ptr %a, LocationSize::precise(1))
 ; CHECK:     2 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ],   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %b, LocationSize::precise(1))
@@ -1218,7 +1218,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test84':
-; CHECK: Alias Set Tracker: 1 alias sets for 3 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 3 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 4] may alias, Ref       Pointers: (ptr %ptr_a, LocationSize::precise(8)), (ptr %a, LocationSize::precise(1)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 define void @test84(ptr %ptr_a, ptr %b, i1 %cond_b) {
@@ -1231,7 +1231,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test85':
-; CHECK: Alias Set Tracker: 1 alias sets for 3 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 3 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 4] may alias, Mod/Ref   Pointers: (ptr %ptr_a, LocationSize::precise(8)), (ptr %a, LocationSize::precise(1)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 define void @test85(ptr %ptr_a, ptr %b, i1 %cond_b) {
@@ -1244,7 +1244,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test86':
-; CHECK: Alias Set Tracker: 1 alias sets for 3 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 3 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 4] may alias, Mod/Ref   Pointers: (ptr %ptr_a, LocationSize::precise(8)), (ptr %a, LocationSize::precise(1)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 define void @test86(ptr %ptr_a, ptr %b, i1 %cond_b) {
@@ -1257,7 +1257,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test87':
-; CHECK: Alias Set Tracker: 1 alias sets for 3 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 3 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 4] may alias, Mod/Ref   Pointers: (ptr %ptr_a, LocationSize::precise(8)), (ptr %a, LocationSize::precise(1)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 define void @test87(ptr %ptr_a, ptr %b, i1 %cond_b) {
@@ -1270,7 +1270,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test88':
-; CHECK: Alias Set Tracker: 1 alias sets for 3 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 3 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 4] may alias, Ref       Pointers: (ptr %ptr_a, LocationSize::precise(8)), (ptr %a, LocationSize::precise(1)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ]
 define void @test88(ptr %ptr_a, i1 %cond_a, ptr %b) {
@@ -1283,7 +1283,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test89':
-; CHECK: Alias Set Tracker: 1 alias sets for 3 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 3 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 4] may alias, Mod/Ref   Pointers: (ptr %ptr_a, LocationSize::precise(8)), (ptr %a, LocationSize::precise(1)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ]
 define void @test89(ptr %ptr_a, i1 %cond_a, ptr %b) {
@@ -1296,7 +1296,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test90':
-; CHECK: Alias Set Tracker: 1 alias sets for 3 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 3 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 4] may alias, Mod/Ref   Pointers: (ptr %ptr_a, LocationSize::precise(8)), (ptr %a, LocationSize::precise(1)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ]
 define void @test90(ptr %ptr_a, i1 %cond_a, ptr %b) {
@@ -1309,7 +1309,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test91':
-; CHECK: Alias Set Tracker: 1 alias sets for 3 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 3 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 4] may alias, Mod/Ref   Pointers: (ptr %ptr_a, LocationSize::precise(8)), (ptr %a, LocationSize::precise(1)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ]
 define void @test91(ptr %ptr_a, i1 %cond_a, ptr %b) {
@@ -1322,7 +1322,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test92':
-; CHECK: Alias Set Tracker: 1 alias sets for 3 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 3 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 4] may alias, Ref       Pointers: (ptr %ptr_a, LocationSize::precise(8)), (ptr %a, LocationSize::precise(1)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     2 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ],   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 define void @test92(ptr %ptr_a, i1 %cond_a, ptr %b, i1 %cond_b) {
@@ -1336,7 +1336,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test93':
-; CHECK: Alias Set Tracker: 1 alias sets for 3 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 3 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 4] may alias, Mod/Ref   Pointers: (ptr %ptr_a, LocationSize::precise(8)), (ptr %a, LocationSize::precise(1)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     2 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ],   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 define void @test93(ptr %ptr_a, i1 %cond_a, ptr %b, i1 %cond_b) {
@@ -1350,7 +1350,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test94':
-; CHECK: Alias Set Tracker: 1 alias sets for 3 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 3 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 4] may alias, Mod/Ref   Pointers: (ptr %ptr_a, LocationSize::precise(8)), (ptr %a, LocationSize::precise(1)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     2 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ],   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 define void @test94(ptr %ptr_a, i1 %cond_a, ptr %b, i1 %cond_b) {
@@ -1364,7 +1364,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test95':
-; CHECK: Alias Set Tracker: 1 alias sets for 3 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 3 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 4] may alias, Mod/Ref   Pointers: (ptr %ptr_a, LocationSize::precise(8)), (ptr %a, LocationSize::precise(1)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     2 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ],   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 define void @test95(ptr %ptr_a, i1 %cond_a, ptr %b, i1 %cond_b) {
@@ -1378,7 +1378,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test96':
-; CHECK: Alias Set Tracker: 1 alias sets for 4 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 4 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 5] may alias, Ref       Pointers: (ptr %ptr_a, LocationSize::precise(8)), (ptr %ptr_b, LocationSize::precise(8)), (ptr %a, LocationSize::precise(1)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 define void @test96(ptr %ptr_a, ptr %ptr_b, i1 %cond_b) {
@@ -1392,7 +1392,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test97':
-; CHECK: Alias Set Tracker: 1 alias sets for 4 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 4 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 5] may alias, Mod/Ref   Pointers: (ptr %ptr_a, LocationSize::precise(8)), (ptr %ptr_b, LocationSize::precise(8)), (ptr %a, LocationSize::precise(1)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 define void @test97(ptr %ptr_a, ptr %ptr_b, i1 %cond_b) {
@@ -1406,7 +1406,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test98':
-; CHECK: Alias Set Tracker: 1 alias sets for 4 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 4 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 5] may alias, Mod/Ref   Pointers: (ptr %ptr_a, LocationSize::precise(8)), (ptr %ptr_b, LocationSize::precise(8)), (ptr %a, LocationSize::precise(1)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 define void @test98(ptr %ptr_a, ptr %ptr_b, i1 %cond_b) {
@@ -1420,7 +1420,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test99':
-; CHECK: Alias Set Tracker: 1 alias sets for 4 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 4 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 5] may alias, Mod/Ref   Pointers: (ptr %ptr_a, LocationSize::precise(8)), (ptr %ptr_b, LocationSize::precise(8)), (ptr %a, LocationSize::precise(1)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 define void @test99(ptr %ptr_a, ptr %ptr_b, i1 %cond_b) {
@@ -1434,7 +1434,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test100':
-; CHECK: Alias Set Tracker: 1 alias sets for 4 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 4 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 5] may alias, Ref       Pointers: (ptr %ptr_a, LocationSize::precise(8)), (ptr %ptr_b, LocationSize::precise(8)), (ptr %a, LocationSize::precise(1)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ]
 define void @test100(ptr %ptr_a, i1 %cond_a, ptr %ptr_b) {
@@ -1448,7 +1448,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test101':
-; CHECK: Alias Set Tracker: 1 alias sets for 4 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 4 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 5] may alias, Mod/Ref   Pointers: (ptr %ptr_a, LocationSize::precise(8)), (ptr %ptr_b, LocationSize::precise(8)), (ptr %a, LocationSize::precise(1)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ]
 define void @test101(ptr %ptr_a, i1 %cond_a, ptr %ptr_b) {
@@ -1462,7 +1462,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test102':
-; CHECK: Alias Set Tracker: 1 alias sets for 4 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 4 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 5] may alias, Mod/Ref   Pointers: (ptr %ptr_a, LocationSize::precise(8)), (ptr %ptr_b, LocationSize::precise(8)), (ptr %a, LocationSize::precise(1)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ]
 define void @test102(ptr %ptr_a, i1 %cond_a, ptr %ptr_b) {
@@ -1476,7 +1476,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test103':
-; CHECK: Alias Set Tracker: 1 alias sets for 4 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 4 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 5] may alias, Mod/Ref   Pointers: (ptr %ptr_a, LocationSize::precise(8)), (ptr %ptr_b, LocationSize::precise(8)), (ptr %a, LocationSize::precise(1)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ]
 define void @test103(ptr %ptr_a, i1 %cond_a, ptr %ptr_b) {
@@ -1490,7 +1490,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test104':
-; CHECK: Alias Set Tracker: 1 alias sets for 4 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 4 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 5] may alias, Ref       Pointers: (ptr %ptr_a, LocationSize::precise(8)), (ptr %ptr_b, LocationSize::precise(8)), (ptr %a, LocationSize::precise(1)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     2 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ],   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 define void @test104(ptr %ptr_a, i1 %cond_a, ptr %ptr_b, i1 %cond_b) {
@@ -1505,7 +1505,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test105':
-; CHECK: Alias Set Tracker: 1 alias sets for 4 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 4 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 5] may alias, Mod/Ref   Pointers: (ptr %ptr_a, LocationSize::precise(8)), (ptr %ptr_b, LocationSize::precise(8)), (ptr %a, LocationSize::precise(1)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     2 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ],   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 define void @test105(ptr %ptr_a, i1 %cond_a, ptr %ptr_b, i1 %cond_b) {
@@ -1520,7 +1520,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test106':
-; CHECK: Alias Set Tracker: 1 alias sets for 4 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 4 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 5] may alias, Mod/Ref   Pointers: (ptr %ptr_a, LocationSize::precise(8)), (ptr %ptr_b, LocationSize::precise(8)), (ptr %a, LocationSize::precise(1)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     2 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ],   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 define void @test106(ptr %ptr_a, i1 %cond_a, ptr %ptr_b, i1 %cond_b) {
@@ -1535,7 +1535,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test107':
-; CHECK: Alias Set Tracker: 1 alias sets for 4 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 4 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 5] may alias, Mod/Ref   Pointers: (ptr %ptr_a, LocationSize::precise(8)), (ptr %ptr_b, LocationSize::precise(8)), (ptr %a, LocationSize::precise(1)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     2 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond_a) [ "deopt"() ],   call void (i1, ...) @llvm.experimental.guard(i1 %cond_b) [ "deopt"() ]
 define void @test107(ptr %ptr_a, i1 %cond_a, ptr %ptr_b, i1 %cond_b) {
diff --git a/llvm/test/Analysis/AliasSet/intrinsics.ll b/llvm/test/Analysis/AliasSet/intrinsics.ll
index a48371b5c9211d..9a9987bdc64252 100644
--- a/llvm/test/Analysis/AliasSet/intrinsics.ll
+++ b/llvm/test/Analysis/AliasSet/intrinsics.ll
@@ -1,7 +1,7 @@
 ; RUN: opt -passes=print-alias-sets -S -o - < %s 2>&1 | FileCheck %s
 
 ; CHECK: Alias sets for function 'test1':
-; CHECK: Alias Set Tracker: 2 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %a, LocationSize::precise(1))
 ; CHECK-NOT: 1 Unknown instruction
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %b, LocationSize::precise(1))
@@ -17,7 +17,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test2':
-; CHECK: Alias Set Tracker: 3 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 3 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %a, LocationSize::precise(1))
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] may alias, Ref
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond1) [ "deopt"() ]
@@ -34,7 +34,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test3':
-; CHECK: Alias Set Tracker: 1 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 3] may alias, Mod/Ref   Pointers: (ptr %a, LocationSize::precise(1)), (ptr %b, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond1) [ "deopt"() ]
 define void @test3(i32 %c, ptr %a, ptr %b) {
@@ -47,7 +47,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test4':
-; CHECK: Alias Set Tracker: 2 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 2] may alias, Mod/Ref   Pointers: (ptr %a, LocationSize::precise(1))
 ; CHECK:     1 Unknown instructions:   call void (i1, ...) @llvm.experimental.guard(i1 %cond1) [ "deopt"() ]
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %b, LocationSize::precise(1))
@@ -62,7 +62,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test5':
-; CHECK: Alias Set Tracker: 2 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %a, LocationSize::precise(1))
 ; CHECK-NOT: 1 Unknown instruction
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %b, LocationSize::precise(1))
diff --git a/llvm/test/Analysis/AliasSet/memloc-vscale.ll b/llvm/test/Analysis/AliasSet/memloc-vscale.ll
index 8a83645ddaf9a8..73028b5ea9b8b1 100644
--- a/llvm/test/Analysis/AliasSet/memloc-vscale.ll
+++ b/llvm/test/Analysis/AliasSet/memloc-vscale.ll
@@ -2,7 +2,7 @@
 ; RUN: opt -S < %s -passes=print-alias-sets 2>&1 | FileCheck %s
 
 ; CHECK-LABEL: Alias sets for function 'sn'
-; CHECK: AliasSet[{{.*}}, 1] must alias, Mod Pointers: (ptr %p, unknown after)
+; CHECK: AliasSet[{{.*}}, 2] must alias, Mod       Pointers: (ptr %p, LocationSize::precise(vscale x 16)), (ptr %p, LocationSize::precise(8))
 define void @sn(ptr %p) {;
   store <vscale x 2 x i64> zeroinitializer, ptr %p, align 2
   store i64 0, ptr %p, align 2
@@ -10,7 +10,7 @@ define void @sn(ptr %p) {;
 }
 
 ; CHECK-LABEL: Alias sets for function 'ns'
-; CHECK: AliasSet[{{.*}}, 1] must alias, Mod Pointers: (ptr %p, unknown after)
+; CHECK: AliasSet[{{.*}}, 2] must alias, Mod       Pointers: (ptr %p, LocationSize::precise(8)), (ptr %p, LocationSize::precise(vscale x 16))
 define void @ns(ptr %p) {
   store i64 0, ptr %p, align 2
   store <vscale x 2 x i64> zeroinitializer, ptr %p, align 2
@@ -26,7 +26,7 @@ define void @ss(ptr %p) {
 }
 
 ; CHECK-LABEL: Alias sets for function 'ss2':
-; CHECK: AliasSet[{{.*}}, 1] must alias, Mod       Pointers: (ptr %p, unknown after)
+; CHECK: AliasSet[{{.*}}, 2] must alias, Mod       Pointers: (ptr %p, LocationSize::precise(vscale x 16)), (ptr %p, LocationSize::precise(vscale x 32))
 define void @ss2(ptr %p) {
   store <vscale x 2 x i64> zeroinitializer, ptr %p, align 2
   store <vscale x 2 x i64> zeroinitializer, ptr %p, align 2
diff --git a/llvm/test/Analysis/AliasSet/memset.ll b/llvm/test/Analysis/AliasSet/memset.ll
index 7bf8c7a104abf1..26151beb856a65 100644
--- a/llvm/test/Analysis/AliasSet/memset.ll
+++ b/llvm/test/Analysis/AliasSet/memset.ll
@@ -4,7 +4,7 @@
 @d = global i8 2, align 1
 
 ; CHECK: Alias sets for function 'test_known_size':
-; CHECK: Alias Set Tracker: 1 alias sets for 1 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 1 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %d, LocationSize::precise(1))
 define void @test_known_size(ptr noalias %d) {
 entry:
@@ -13,7 +13,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test_unknown_size':
-; CHECK: Alias Set Tracker: 1 alias sets for 1 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 1 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %d, unknown after)
 define void @test_unknown_size(ptr noalias %d, i64 %len) {
 entry:
@@ -23,7 +23,7 @@ entry:
 
 
 ; CHECK: Alias sets for function 'test_atomic_known_size':
-; CHECK: Alias Set Tracker: 1 alias sets for 1 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 1 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %d, LocationSize::precise(1))
 define void @test_atomic_known_size(ptr noalias %d) {
 entry:
@@ -32,7 +32,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test_atomic_unknown_size':
-; CHECK: Alias Set Tracker: 1 alias sets for 1 pointer values.
+; CHECK: Alias Set Tracker: 1 alias sets for 1 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %d, unknown after)
 define void @test_atomic_unknown_size(ptr noalias %d, i64 %len) {
 entry:
diff --git a/llvm/test/Analysis/AliasSet/memtransfer.ll b/llvm/test/Analysis/AliasSet/memtransfer.ll
index 27df01a4940506..288fe3d264ed24 100644
--- a/llvm/test/Analysis/AliasSet/memtransfer.ll
+++ b/llvm/test/Analysis/AliasSet/memtransfer.ll
@@ -5,7 +5,7 @@
 
 
 ; CHECK: Alias sets for function 'test_known_size':
-; CHECK: Alias Set Tracker: 2 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %d, LocationSize::precise(1))
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Ref       Pointers: (ptr %s, LocationSize::precise(1))
 define void @test_known_size(ptr noalias %s, ptr noalias %d) {
@@ -15,7 +15,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test_unknown_size':
-; CHECK: Alias Set Tracker: 2 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %d, unknown after)
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Ref       Pointers: (ptr %s, unknown after)
 define void @test_unknown_size(ptr noalias %s, ptr noalias %d, i64 %len) {
@@ -26,7 +26,7 @@ entry:
 
 
 ; CHECK: Alias sets for function 'test1':
-; CHECK: Alias Set Tracker: 3 alias sets for 4 pointer values.
+; CHECK: Alias Set Tracker: 3 alias sets for 4 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %a, LocationSize::precise(1))
 ; CHECK-NOT:    1 Unknown instructions
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 2] may alias, Mod/Ref   Pointers: (ptr %d, LocationSize::precise(1)), (ptr %s, LocationSize::precise(1))
@@ -42,7 +42,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test1_atomic':
-; CHECK: Alias Set Tracker: 3 alias sets for 4 pointer values.
+; CHECK: Alias Set Tracker: 3 alias sets for 4 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %a, LocationSize::precise(1))
 ; CHECK-NOT:    1 Unknown instructions
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 2] may alias, Mod/Ref   Pointers: (ptr %d, LocationSize::precise(1)), (ptr %s, LocationSize::precise(1))
@@ -58,7 +58,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test2':
-; CHECK: Alias Set Tracker: 3 alias sets for 4 pointer values.
+; CHECK: Alias Set Tracker: 3 alias sets for 4 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %a, LocationSize::precise(1))
 ; CHECK-NOT:    1 Unknown instructions
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 2] may alias, Mod/Ref    Pointers: (ptr %d, LocationSize::precise(1)), (ptr %s, LocationSize::precise(1))
@@ -74,7 +74,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test3':
-; CHECK: Alias Set Tracker: 3 alias sets for 4 pointer values.
+; CHECK: Alias Set Tracker: 3 alias sets for 4 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %a, LocationSize::precise(1))
 ; CHECK-NOT:    1 Unknown instructions
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 2] may alias, Mod/Ref   Pointers: (ptr %d, LocationSize::precise(1)), (ptr %s, LocationSize::precise(1))
@@ -90,7 +90,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test3_atomic':
-; CHECK: Alias Set Tracker: 3 alias sets for 4 pointer values.
+; CHECK: Alias Set Tracker: 3 alias sets for 4 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %a, LocationSize::precise(1))
 ; CHECK-NOT:    1 Unknown instructions
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 2] may alias, Mod/Ref   Pointers: (ptr %d, LocationSize::precise(1)), (ptr %s, LocationSize::precise(1))
@@ -106,7 +106,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test4':
-; CHECK: Alias Set Tracker: 3 alias sets for 4 pointer values.
+; CHECK: Alias Set Tracker: 3 alias sets for 4 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %a, LocationSize::precise(1))
 ; CHECK-NOT:    1 Unknown instructions
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 2] may alias, Mod/Ref    Pointers: (ptr %d, LocationSize::precise(1)), (ptr %s, LocationSize::precise(1))
@@ -122,7 +122,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test5':
-; CHECK: Alias Set Tracker: 2 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod/Ref   Pointers: (ptr %a, LocationSize::precise(1))
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %b, LocationSize::precise(1))
 define void @test5() {
@@ -136,7 +136,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test5_atomic':
-; CHECK: Alias Set Tracker: 2 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod/Ref   Pointers: (ptr %a, LocationSize::precise(1))
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %b, LocationSize::precise(1))
 define void @test5_atomic() {
@@ -150,7 +150,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test6':
-; CHECK: Alias Set Tracker: 2 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod/Ref   Pointers: (ptr %a, LocationSize::precise(1))
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %b, LocationSize::precise(1))
 define void @test6() {
@@ -164,7 +164,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test6_atomic':
-; CHECK: Alias Set Tracker: 2 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod/Ref   Pointers: (ptr %a, LocationSize::precise(1))
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod       Pointers: (ptr %b, LocationSize::precise(1))
 define void @test6_atomic() {
@@ -178,7 +178,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test7':
-; CHECK: Alias Set Tracker: 2 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod/Ref   Pointers: (ptr %a, LocationSize::precise(1))
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod/Ref   Pointers: (ptr %b, LocationSize::precise(1))
 define void @test7() {
@@ -193,7 +193,7 @@ entry:
 }
 
 ; CHECK: Alias sets for function 'test7_atomic':
-; CHECK: Alias Set Tracker: 2 alias sets for 2 pointer values.
+; CHECK: Alias Set Tracker: 2 alias sets for 2 memory locations.
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod/Ref   Pointers: (ptr %a, LocationSize::precise(1))
 ; CHECK:   AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod/Ref   Pointers: (ptr %b, LocationSize::precise(1))
 define void @test7_atomic() {
diff --git a/llvm/test/Analysis/AliasSet/saturation.ll b/llvm/test/Analysis/AliasSet/saturation.ll
index 423534722bc4ce..6304a8efa06b71 100644
--- a/llvm/test/Analysis/AliasSet/saturation.ll
+++ b/llvm/test/Analysis/AliasSet/saturation.ll
@@ -1,36 +1,34 @@
-; RUN: opt -passes=print-alias-sets -alias-set-saturation-threshold=2 -S -o - < %s 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=NOSAT
-; RUN: opt -passes=print-alias-sets -alias-set-saturation-threshold=1 -S -o - < %s 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=SAT
+; RUN: opt -passes=print-alias-sets -alias-set-saturation-threshold=4 -S -o - < %s 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=NOSAT
+; RUN: opt -passes=print-alias-sets -alias-set-saturation-threshold=3 -S -o - < %s 2>&1 | FileCheck %s --check-prefix=CHECK --check-prefix=SAT
 
-; CHECK-LABEL: 'allmust'
+; CHECK-LABEL: 'nomerge'
 ; CHECK: AliasSet[{{.*}}, 1] must alias, Mod Pointers: (ptr %a, LocationSize::precise(4))
-; CHECK: AliasSet[{{.*}}, 1] must alias, Mod Pointers: (ptr %b, LocationSize::precise(4))
-; CHECK: AliasSet[{{.*}}, 1] must alias, Mod Pointers: (ptr %c, LocationSize::precise(4))
-; CHECK: AliasSet[{{.*}}, 1] must alias, Mod Pointers: (ptr %d, LocationSize::precise(4))
-define void @allmust() {
+; CHECK: AliasSet[{{.*}}, 2] may alias, Mod Pointers: (ptr %b, LocationSize::precise(4)), (ptr %b1, LocationSize::precise(4))
+define void @nomerge(i32 %k) {
   %a = alloca i32
-  %b = alloca i32
-  %c = alloca i32
-  %d = alloca i32
+  %b = alloca [10 x i32]
   store i32 1, ptr %a
   store i32 2, ptr %b
-  store i32 3, ptr %c
-  store i32 4, ptr %d
+  %b1 = getelementptr i32, ptr %b, i32 %k
+  store i32 3, ptr %b1
   ret void
 }
 
 ; CHECK-LABEL: 'mergemay'
-; NOSAT: AliasSet[{{.*}}, 2] may alias, Mod Pointers: (ptr %a, LocationSize::precise(4)), (ptr %a1, LocationSize::precise(4))
+; NOSAT: AliasSet[{{.*}}, 3] may alias, Mod Pointers: (ptr %a, LocationSize::precise(4)), (ptr %a1, LocationSize::precise(4)), (ptr %a2, LocationSize::precise(4))
 ; NOSAT: AliasSet[{{.*}}, 1] must alias, Mod Pointers: (ptr %b, LocationSize::precise(4))
-; SAT: AliasSet[{{.*}}, 2] may alias, Mod forwarding to 0x[[FWD:[0-9a-f]*]]
+; SAT: AliasSet[{{.*}}, 3] may alias, Mod forwarding to 0x[[FWD:[0-9a-f]*]]
 ; SAT: AliasSet[{{.*}}, 1] must alias, Mod forwarding to 0x[[FWD]]
-; SAT: AliasSet[0x[[FWD]], 2] may alias, Mod/Ref Pointers: (ptr %a, LocationSize::precise(4)), (ptr %a1, LocationSize::precise(4)), (ptr %b, LocationSize::precise(4))
-define void @mergemay(i32 %k) {
+; SAT: AliasSet[0x[[FWD]], 2] may alias, Mod/Ref Pointers: (ptr %a, LocationSize::precise(4)), (ptr %a1, LocationSize::precise(4)), (ptr %a2, LocationSize::precise(4)), (ptr %b, LocationSize::precise(4))
+define void @mergemay(i32 %k, i32 %l) {
   %a = alloca i32
   %b = alloca i32
   store i32 1, ptr %a
   store i32 2, ptr %b
   %a1 = getelementptr i32, ptr %a, i32 %k
-  store i32 2, ptr %a1  
+  store i32 2, ptr %a1
+  %a2 = getelementptr i32, ptr %a, i32 %l
+  store i32 2, ptr %a2
   ret void
 }
 
diff --git a/llvm/test/Transforms/LICM/variant-aainfo.ll b/llvm/test/Transforms/LICM/variant-aainfo.ll
index 4c4766bddf65e5..65524be12fae11 100644
--- a/llvm/test/Transforms/LICM/variant-aainfo.ll
+++ b/llvm/test/Transforms/LICM/variant-aainfo.ll
@@ -12,17 +12,16 @@ target datalayout = "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-f64:32:64-f8
 ; CHECKAA-DAG:  MustAlias:   %0 = load ptr, ptr %s, align 4, !tbaa !7 <->   store ptr %add.ptr.i, ptr %s, align 4, !tbaa !14
 ; CHECKAA-DAG:  NoAlias:   store ptr %add.ptr.i, ptr %s, align 4, !tbaa !14 <->   store i32 %i.05, ptr %0, align 4, !tbaa !12
 
-; FIXME: missed optimization:
-;   load ptr, ptr %s should be promoted to entry
-;   store ptr ..., ptr %s should be promoted to for.cond.cleanup
 ; CHECKLICM-LABEL: define void @_Z4testP1S(ptr noundef %s)
 ; CHECKLICM: entry:
+; CHECKLICM: [[P_ENTRY:%[^ ]+]] = load ptr, ptr %s
 ; CHECKLICM: for.cond.cleanup:
+; CHECKLICM: [[P_DONE:%[^ ]+]] = phi ptr [ [[P_NEXT:%[^ ]+]], %for.body ]
+; CHECKLICM: store ptr [[P_DONE]], ptr %s
 ; CHECKLICM: for.body:
-; CHECKLICM: [[P:%[^ ]+]] = load ptr, ptr %s
+; CHECKLICM: [[P:%[^ ]+]] = phi ptr [ [[P_ENTRY]], %entry ], [ [[P_NEXT]], %for.body ]
 ; CHECKLICM: store i32 {{%[^ ]+}}, ptr [[P]]
-; CHECKLICM: [[P_NEXT:%[^ ]+]] = getelementptr inbounds i32, ptr [[P]], i32 1
-; CHECKLICM: store ptr [[P_NEXT]], ptr %s
+; CHECKLICM: [[P_NEXT]] = getelementptr inbounds i32, ptr [[P]], i32 1
 
 define void @_Z4testP1S(ptr noundef %s) #0 {
 entry:
diff --git a/polly/lib/Analysis/ScopBuilder.cpp b/polly/lib/Analysis/ScopBuilder.cpp
index 0af0f6915b1458..0d1d2ed2433907 100644
--- a/polly/lib/Analysis/ScopBuilder.cpp
+++ b/polly/lib/Analysis/ScopBuilder.cpp
@@ -3255,8 +3255,10 @@ ScopBuilder::buildAliasGroupsForAccesses() {
     if (AS.isMustAlias() || AS.isForwardingAliasSet())
       continue;
     AliasGroupTy AG;
-    for (auto &PR : AS)
-      AG.push_back(PtrToAcc[PR.getValue()]);
+    llvm::SmallPtrSet<const Value *, 8> Seen;
+    for (auto &MemLoc : AS)
+      if (Seen.insert(MemLoc.Ptr).second)
+        AG.push_back(PtrToAcc[const_cast<Value *>(MemLoc.Ptr)]);
     if (AG.size() < 2)
       continue;
     AliasGroups.push_back(std::move(AG));
diff --git a/polly/lib/Analysis/ScopDetection.cpp b/polly/lib/Analysis/ScopDetection.cpp
index db1f844950063f..191862afb832ac 100644
--- a/polly/lib/Analysis/ScopDetection.cpp
+++ b/polly/lib/Analysis/ScopDetection.cpp
@@ -1158,8 +1158,9 @@ bool ScopDetection::isValidAccess(Instruction *Inst, const SCEV *AF,
         const unsigned int VariantSize = VariantLS.size(),
                            InvariantSize = InvariantLS.size();
 
-        for (const auto &Ptr : AS) {
-          Instruction *Inst = dyn_cast<Instruction>(Ptr.getValue());
+        for (const auto &MemLoc : AS) {
+          Instruction *Inst =
+              dyn_cast<Instruction>(const_cast<Value *>(MemLoc.Ptr));
           if (Inst && Context.CurRegion.contains(Inst)) {
             auto *Load = dyn_cast<LoadInst>(Inst);
             if (Load && InvariantLS.count(Load))
diff --git a/polly/lib/Analysis/ScopDetectionDiagnostic.cpp b/polly/lib/Analysis/ScopDetectionDiagnostic.cpp
index 0bac2cfd1555d5..b9baa433f6157e 100644
--- a/polly/lib/Analysis/ScopDetectionDiagnostic.cpp
+++ b/polly/lib/Analysis/ScopDetectionDiagnostic.cpp
@@ -639,7 +639,8 @@ bool ReportNonSimpleMemoryAccess::classof(const RejectReason *RR) {
 ReportAlias::ReportAlias(Instruction *Inst, AliasSet &AS)
     : RejectReason(RejectReasonKind::Alias), Inst(Inst) {
   for (const auto &I : AS)
-    Pointers.push_back(I.getValue());
+    if (!llvm::is_contained(Pointers, I.Ptr))
+      Pointers.push_back(I.Ptr);
 }
 
 std::string ReportAlias::formatInvalidAlias(std::string Prefix,



More information about the llvm-commits mailing list