[llvm] 303c308 - [BasicAA] Convert tests to opaque pointers (NFC)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 16 02:57:27 PST 2022


Author: Nikita Popov
Date: 2022-12-16T11:57:17+01:00
New Revision: 303c308e452c703c3d47940383ded3b2d3eefd56

URL: https://github.com/llvm/llvm-project/commit/303c308e452c703c3d47940383ded3b2d3eefd56
DIFF: https://github.com/llvm/llvm-project/commit/303c308e452c703c3d47940383ded3b2d3eefd56.diff

LOG: [BasicAA] Convert tests to opaque pointers (NFC)

Added: 
    

Modified: 
    llvm/test/Analysis/BasicAA/128-bit-ptr.ll
    llvm/test/Analysis/BasicAA/args-rets-allocas-loads.ll
    llvm/test/Analysis/BasicAA/assume.ll
    llvm/test/Analysis/BasicAA/atomic-memory-intrinsics.ll
    llvm/test/Analysis/BasicAA/call-attrs.ll
    llvm/test/Analysis/BasicAA/cs-cs-arm.ll
    llvm/test/Analysis/BasicAA/cs-cs.ll
    llvm/test/Analysis/BasicAA/dag.ll
    llvm/test/Analysis/BasicAA/deoptimize.ll
    llvm/test/Analysis/BasicAA/featuretest.ll
    llvm/test/Analysis/BasicAA/gep-implicit-trunc-32-bit-pointers.ll
    llvm/test/Analysis/BasicAA/gep-modulo.ll
    llvm/test/Analysis/BasicAA/guards.ll
    llvm/test/Analysis/BasicAA/index-size.ll
    llvm/test/Analysis/BasicAA/invariant_group.ll
    llvm/test/Analysis/BasicAA/libfuncs-darwin.ll
    llvm/test/Analysis/BasicAA/libfuncs.ll
    llvm/test/Analysis/BasicAA/must-and-partial.ll
    llvm/test/Analysis/BasicAA/negoffset.ll
    llvm/test/Analysis/BasicAA/noalias-geps.ll
    llvm/test/Analysis/BasicAA/noalias-scope-decl.ll
    llvm/test/Analysis/BasicAA/phi-aa.ll
    llvm/test/Analysis/BasicAA/phi-spec-order.ll
    llvm/test/Analysis/BasicAA/phi-speculation.ll
    llvm/test/Analysis/BasicAA/pr31761.ll
    llvm/test/Analysis/BasicAA/pr35821.ll
    llvm/test/Analysis/BasicAA/pr35843.ll
    llvm/test/Analysis/BasicAA/pr52735.ll
    llvm/test/Analysis/BasicAA/q.bad.ll
    llvm/test/Analysis/BasicAA/range.ll
    llvm/test/Analysis/BasicAA/returned.ll
    llvm/test/Analysis/BasicAA/sequential-gep.ll
    llvm/test/Analysis/BasicAA/struct-geps.ll
    llvm/test/Analysis/BasicAA/tail-byval.ll
    llvm/test/Analysis/BasicAA/vscale.ll
    llvm/test/Analysis/BasicAA/zext.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Analysis/BasicAA/128-bit-ptr.ll b/llvm/test/Analysis/BasicAA/128-bit-ptr.ll
index 6525410920c3..24b0e963d722 100644
--- a/llvm/test/Analysis/BasicAA/128-bit-ptr.ll
+++ b/llvm/test/Analysis/BasicAA/128-bit-ptr.ll
@@ -12,17 +12,15 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-i1
 
 ; CHECK:     Function: test0
 ; CHECK-NOT:   MayAlias:
-define void @test0(%T addrspace(100)* %P) {
-  %A = getelementptr %T, %T addrspace(100)* %P, i64 0
-  %B = getelementptr %T, %T addrspace(100)* %P, i64 0, i32 0
-  %C = getelementptr %T, %T addrspace(100)* %P, i64 0, i32 1
-  %D = getelementptr %T, %T addrspace(100)* %P, i64 0, i32 1, i64 0
-  %E = getelementptr %T, %T addrspace(100)* %P, i64 0, i32 1, i64 5
-  load %T, %T addrspace(100)* %A
-  load i32, i32 addrspace(100)* %B
-  load [10 x i8], [10 x i8] addrspace(100)* %C
-  load i8, i8 addrspace(100)* %D
-  load i8, i8 addrspace(100)* %E
+define void @test0(ptr addrspace(100) %P) {
+  %C = getelementptr %T, ptr addrspace(100) %P, i64 0, i32 1
+  %D = getelementptr %T, ptr addrspace(100) %P, i64 0, i32 1, i64 0
+  %E = getelementptr %T, ptr addrspace(100) %P, i64 0, i32 1, i64 5
+  load %T, ptr addrspace(100) %P
+  load i32, ptr addrspace(100) %P
+  load [10 x i8], ptr addrspace(100) %C
+  load i8, ptr addrspace(100) %D
+  load i8, ptr addrspace(100) %E
   ret void
 }
 
@@ -35,15 +33,15 @@ define void @test0(%T addrspace(100)* %P) {
 ; CHECK:       NoAlias:
 ; CHECK-SAME:  %A
 ; CHECK-SAME:  %B
-define void @test1(double addrspace(100)* %P, i128 %i) {
+define void @test1(ptr addrspace(100) %P, i128 %i) {
   ; 1180591620717411303424 is 2**70
   ;  590295810358705651712 is 2**69
   %i70 = add i128 %i, 1180591620717411303424 
   %i69 = add i128 %i, 590295810358705651712
-  %A = getelementptr double, double addrspace(100)* %P, i128 %i70
-  %B = getelementptr double, double addrspace(100)* %P, i128 %i69
-  load double, double addrspace(100)* %A
-  load double, double addrspace(100)* %B
+  %A = getelementptr double, ptr addrspace(100) %P, i128 %i70
+  %B = getelementptr double, ptr addrspace(100) %P, i128 %i69
+  load double, ptr addrspace(100) %A
+  load double, ptr addrspace(100) %B
   ret void
 }
 
@@ -55,15 +53,15 @@ define void @test1(double addrspace(100)* %P, i128 %i) {
 ; CHECK: MustAlias:
 ; CHECK-SAME: %A
 ; CHECK-SAME: %C
-define void @test2(double addrspace(100)* %P, i128 %i) {
+define void @test2(ptr addrspace(100) %P, i128 %i) {
   ; 1180591620717411303424 is 2**70
   ;  590295810358705651712 is 2**69
   %i70 = add i128 %i, 1180591620717411303424 
   %i69 = add i128 %i, 590295810358705651712
   %j70 = add i128 %i69, 590295810358705651712 
-  %A = getelementptr double, double addrspace(100)* %P, i128 %i70
-  %C = getelementptr double, double addrspace(100)* %P, i128 %j70
-  load double, double addrspace(100)* %A
-  load double, double addrspace(100)* %C
+  %A = getelementptr double, ptr addrspace(100) %P, i128 %i70
+  %C = getelementptr double, ptr addrspace(100) %P, i128 %j70
+  load double, ptr addrspace(100) %A
+  load double, ptr addrspace(100) %C
   ret void
 }

diff  --git a/llvm/test/Analysis/BasicAA/args-rets-allocas-loads.ll b/llvm/test/Analysis/BasicAA/args-rets-allocas-loads.ll
index bfc6fe4b2558..8eaf4858ed58 100644
--- a/llvm/test/Analysis/BasicAA/args-rets-allocas-loads.ll
+++ b/llvm/test/Analysis/BasicAA/args-rets-allocas-loads.ll
@@ -1,357 +1,357 @@
 ; RUN: opt -aa-pipeline=basic-aa -passes=aa-eval -print-all-alias-modref-info -disable-output < %s 2>&1 | FileCheck  %s
 
-declare void @callee(double* %callee_arg)
-declare void @nocap_callee(double* nocapture %nocap_callee_arg)
+declare void @callee(ptr %callee_arg)
+declare void @nocap_callee(ptr nocapture %nocap_callee_arg)
 
-declare double* @normal_returner()
-declare noalias double* @noalias_returner()
+declare ptr @normal_returner()
+declare noalias ptr @noalias_returner()
 
-define void @caller_a(double* %arg_a0,
-                      double* %arg_a1,
-                      double* noalias %noalias_arg_a0,
-                      double* noalias %noalias_arg_a1,
-                      double** %indirect_a0,
-                      double** %indirect_a1) {
+define void @caller_a(ptr %arg_a0,
+                      ptr %arg_a1,
+                      ptr noalias %noalias_arg_a0,
+                      ptr noalias %noalias_arg_a1,
+                      ptr %indirect_a0,
+                      ptr %indirect_a1) {
   %escape_alloca_a0 = alloca double
   %escape_alloca_a1 = alloca double
   %noescape_alloca_a0 = alloca double
   %noescape_alloca_a1 = alloca double
 
-  %normal_ret_a0 = call double* @normal_returner()
-  %normal_ret_a1 = call double* @normal_returner()
-  %noalias_ret_a0 = call double* @noalias_returner()
-  %noalias_ret_a1 = call double* @noalias_returner()
+  %normal_ret_a0 = call ptr @normal_returner()
+  %normal_ret_a1 = call ptr @normal_returner()
+  %noalias_ret_a0 = call ptr @noalias_returner()
+  %noalias_ret_a1 = call ptr @noalias_returner()
 
-  %loaded_a0 = load double*, double** %indirect_a0
-  %loaded_a1 = load double*, double** %indirect_a1
+  %loaded_a0 = load ptr, ptr %indirect_a0
+  %loaded_a1 = load ptr, ptr %indirect_a1
 
-  call void @callee(double* %escape_alloca_a0)
-  call void @callee(double* %escape_alloca_a1)
-  call void @nocap_callee(double* %noescape_alloca_a0)
-  call void @nocap_callee(double* %noescape_alloca_a1)
+  call void @callee(ptr %escape_alloca_a0)
+  call void @callee(ptr %escape_alloca_a1)
+  call void @nocap_callee(ptr %noescape_alloca_a0)
+  call void @nocap_callee(ptr %noescape_alloca_a1)
 
-  store double 0.0, double* %loaded_a0
-  store double 0.0, double* %loaded_a1
-  store double 0.0, double* %arg_a0
-  store double 0.0, double* %arg_a1
-  store double 0.0, double* %noalias_arg_a0
-  store double 0.0, double* %noalias_arg_a1
-  store double 0.0, double* %escape_alloca_a0
-  store double 0.0, double* %escape_alloca_a1
-  store double 0.0, double* %noescape_alloca_a0
-  store double 0.0, double* %noescape_alloca_a1
-  store double 0.0, double* %normal_ret_a0
-  store double 0.0, double* %normal_ret_a1
-  store double 0.0, double* %noalias_ret_a0
-  store double 0.0, double* %noalias_ret_a1
+  store double 0.0, ptr %loaded_a0
+  store double 0.0, ptr %loaded_a1
+  store double 0.0, ptr %arg_a0
+  store double 0.0, ptr %arg_a1
+  store double 0.0, ptr %noalias_arg_a0
+  store double 0.0, ptr %noalias_arg_a1
+  store double 0.0, ptr %escape_alloca_a0
+  store double 0.0, ptr %escape_alloca_a1
+  store double 0.0, ptr %noescape_alloca_a0
+  store double 0.0, ptr %noescape_alloca_a1
+  store double 0.0, ptr %normal_ret_a0
+  store double 0.0, ptr %normal_ret_a1
+  store double 0.0, ptr %noalias_ret_a0
+  store double 0.0, ptr %noalias_ret_a1
   ret void
 }
 
 ; CHECK: Function: caller_a: 16 pointers, 8 call sites
-; CHECK-NEXT: MayAlias:	double** %indirect_a0, double** %indirect_a1
-; CHECK-NEXT: MayAlias:	double** %indirect_a0, double* %loaded_a0
-; CHECK-NEXT: MayAlias:	double** %indirect_a1, double* %loaded_a0
-; CHECK-NEXT: MayAlias:	double** %indirect_a0, double* %loaded_a1
-; CHECK-NEXT: MayAlias:	double** %indirect_a1, double* %loaded_a1
-; CHECK-NEXT: MayAlias:	double* %loaded_a0, double* %loaded_a1
-; CHECK-NEXT: MayAlias:	double* %arg_a0, double** %indirect_a0
-; CHECK-NEXT: MayAlias:	double* %arg_a0, double** %indirect_a1
-; CHECK-NEXT: MayAlias:	double* %arg_a0, double* %loaded_a0
-; CHECK-NEXT: MayAlias:	double* %arg_a0, double* %loaded_a1
-; CHECK-NEXT: MayAlias:	double* %arg_a1, double** %indirect_a0
-; CHECK-NEXT: MayAlias:	double* %arg_a1, double** %indirect_a1
-; CHECK-NEXT: MayAlias:	double* %arg_a1, double* %loaded_a0
-; CHECK-NEXT: MayAlias:	double* %arg_a1, double* %loaded_a1
-; CHECK-NEXT: MayAlias:	double* %arg_a0, double* %arg_a1
-; CHECK-NEXT: NoAlias:	double** %indirect_a0, double* %noalias_arg_a0
-; CHECK-NEXT: NoAlias:	double** %indirect_a1, double* %noalias_arg_a0
-; CHECK-NEXT: NoAlias:	double* %loaded_a0, double* %noalias_arg_a0
-; CHECK-NEXT: NoAlias:	double* %loaded_a1, double* %noalias_arg_a0
-; CHECK-NEXT: NoAlias:	double* %arg_a0, double* %noalias_arg_a0
-; CHECK-NEXT: NoAlias:	double* %arg_a1, double* %noalias_arg_a0
-; CHECK-NEXT: NoAlias:	double** %indirect_a0, double* %noalias_arg_a1
-; CHECK-NEXT: NoAlias:	double** %indirect_a1, double* %noalias_arg_a1
-; CHECK-NEXT: NoAlias:	double* %loaded_a0, double* %noalias_arg_a1
-; CHECK-NEXT: NoAlias:	double* %loaded_a1, double* %noalias_arg_a1
-; CHECK-NEXT: NoAlias:	double* %arg_a0, double* %noalias_arg_a1
-; CHECK-NEXT: NoAlias:	double* %arg_a1, double* %noalias_arg_a1
-; CHECK-NEXT: NoAlias:	double* %noalias_arg_a0, double* %noalias_arg_a1
-; CHECK-NEXT: NoAlias:	double* %escape_alloca_a0, double** %indirect_a0
-; CHECK-NEXT: NoAlias:	double* %escape_alloca_a0, double** %indirect_a1
-; CHECK-NEXT: MayAlias:	double* %escape_alloca_a0, double* %loaded_a0
-; CHECK-NEXT: MayAlias:	double* %escape_alloca_a0, double* %loaded_a1
-; CHECK-NEXT: NoAlias:	double* %arg_a0, double* %escape_alloca_a0
-; CHECK-NEXT: NoAlias:	double* %arg_a1, double* %escape_alloca_a0
-; CHECK-NEXT: NoAlias:	double* %escape_alloca_a0, double* %noalias_arg_a0
-; CHECK-NEXT: NoAlias:	double* %escape_alloca_a0, double* %noalias_arg_a1
-; CHECK-NEXT: NoAlias:	double* %escape_alloca_a1, double** %indirect_a0
-; CHECK-NEXT: NoAlias:	double* %escape_alloca_a1, double** %indirect_a1
-; CHECK-NEXT: MayAlias:	double* %escape_alloca_a1, double* %loaded_a0
-; CHECK-NEXT: MayAlias:	double* %escape_alloca_a1, double* %loaded_a1
-; CHECK-NEXT: NoAlias:	double* %arg_a0, double* %escape_alloca_a1
-; CHECK-NEXT: NoAlias:	double* %arg_a1, double* %escape_alloca_a1
-; CHECK-NEXT: NoAlias:	double* %escape_alloca_a1, double* %noalias_arg_a0
-; CHECK-NEXT: NoAlias:	double* %escape_alloca_a1, double* %noalias_arg_a1
-; CHECK-NEXT: NoAlias:	double* %escape_alloca_a0, double* %escape_alloca_a1
-; CHECK-NEXT: NoAlias:	double** %indirect_a0, double* %noescape_alloca_a0
-; CHECK-NEXT: NoAlias:	double** %indirect_a1, double* %noescape_alloca_a0
-; CHECK-NEXT: NoAlias:	double* %loaded_a0, double* %noescape_alloca_a0
-; CHECK-NEXT: NoAlias:	double* %loaded_a1, double* %noescape_alloca_a0
-; CHECK-NEXT: NoAlias:	double* %arg_a0, double* %noescape_alloca_a0
-; CHECK-NEXT: NoAlias:	double* %arg_a1, double* %noescape_alloca_a0
-; CHECK-NEXT: NoAlias:	double* %noalias_arg_a0, double* %noescape_alloca_a0
-; CHECK-NEXT: NoAlias:	double* %noalias_arg_a1, double* %noescape_alloca_a0
-; CHECK-NEXT: NoAlias:	double* %escape_alloca_a0, double* %noescape_alloca_a0
-; CHECK-NEXT: NoAlias:	double* %escape_alloca_a1, double* %noescape_alloca_a0
-; CHECK-NEXT: NoAlias:	double** %indirect_a0, double* %noescape_alloca_a1
-; CHECK-NEXT: NoAlias:	double** %indirect_a1, double* %noescape_alloca_a1
-; CHECK-NEXT: NoAlias:	double* %loaded_a0, double* %noescape_alloca_a1
-; CHECK-NEXT: NoAlias:	double* %loaded_a1, double* %noescape_alloca_a1
-; CHECK-NEXT: NoAlias:	double* %arg_a0, double* %noescape_alloca_a1
-; CHECK-NEXT: NoAlias:	double* %arg_a1, double* %noescape_alloca_a1
-; CHECK-NEXT: NoAlias:	double* %noalias_arg_a0, double* %noescape_alloca_a1
-; CHECK-NEXT: NoAlias:	double* %noalias_arg_a1, double* %noescape_alloca_a1
-; CHECK-NEXT: NoAlias:	double* %escape_alloca_a0, double* %noescape_alloca_a1
-; CHECK-NEXT: NoAlias:	double* %escape_alloca_a1, double* %noescape_alloca_a1
-; CHECK-NEXT: NoAlias:	double* %noescape_alloca_a0, double* %noescape_alloca_a1
-; CHECK-NEXT: MayAlias:	double** %indirect_a0, double* %normal_ret_a0
-; CHECK-NEXT: MayAlias:	double** %indirect_a1, double* %normal_ret_a0
-; CHECK-NEXT: MayAlias:	double* %loaded_a0, double* %normal_ret_a0
-; CHECK-NEXT: MayAlias:	double* %loaded_a1, double* %normal_ret_a0
-; CHECK-NEXT: MayAlias:	double* %arg_a0, double* %normal_ret_a0
-; CHECK-NEXT: MayAlias:	double* %arg_a1, double* %normal_ret_a0
-; CHECK-NEXT: NoAlias:	double* %noalias_arg_a0, double* %normal_ret_a0
-; CHECK-NEXT: NoAlias:	double* %noalias_arg_a1, double* %normal_ret_a0
-; CHECK-NEXT: MayAlias:	double* %escape_alloca_a0, double* %normal_ret_a0
-; CHECK-NEXT: MayAlias:	double* %escape_alloca_a1, double* %normal_ret_a0
-; CHECK-NEXT: NoAlias:	double* %noescape_alloca_a0, double* %normal_ret_a0
-; CHECK-NEXT: NoAlias:	double* %noescape_alloca_a1, double* %normal_ret_a0
-; CHECK-NEXT: MayAlias:	double** %indirect_a0, double* %normal_ret_a1
-; CHECK-NEXT: MayAlias:	double** %indirect_a1, double* %normal_ret_a1
-; CHECK-NEXT: MayAlias:	double* %loaded_a0, double* %normal_ret_a1
-; CHECK-NEXT: MayAlias:	double* %loaded_a1, double* %normal_ret_a1
-; CHECK-NEXT: MayAlias:	double* %arg_a0, double* %normal_ret_a1
-; CHECK-NEXT: MayAlias:	double* %arg_a1, double* %normal_ret_a1
-; CHECK-NEXT: NoAlias:	double* %noalias_arg_a0, double* %normal_ret_a1
-; CHECK-NEXT: NoAlias:	double* %noalias_arg_a1, double* %normal_ret_a1
-; CHECK-NEXT: MayAlias:	double* %escape_alloca_a0, double* %normal_ret_a1
-; CHECK-NEXT: MayAlias:	double* %escape_alloca_a1, double* %normal_ret_a1
-; CHECK-NEXT: NoAlias:	double* %noescape_alloca_a0, double* %normal_ret_a1
-; CHECK-NEXT: NoAlias:	double* %noescape_alloca_a1, double* %normal_ret_a1
-; CHECK-NEXT: MayAlias:	double* %normal_ret_a0, double* %normal_ret_a1
-; CHECK-NEXT: NoAlias:	double** %indirect_a0, double* %noalias_ret_a0
-; CHECK-NEXT: NoAlias:	double** %indirect_a1, double* %noalias_ret_a0
-; CHECK-NEXT: NoAlias:	double* %loaded_a0, double* %noalias_ret_a0
-; CHECK-NEXT: NoAlias:	double* %loaded_a1, double* %noalias_ret_a0
-; CHECK-NEXT: NoAlias:	double* %arg_a0, double* %noalias_ret_a0
-; CHECK-NEXT: NoAlias:	double* %arg_a1, double* %noalias_ret_a0
-; CHECK-NEXT: NoAlias:	double* %noalias_arg_a0, double* %noalias_ret_a0
-; CHECK-NEXT: NoAlias:	double* %noalias_arg_a1, double* %noalias_ret_a0
-; CHECK-NEXT: NoAlias:	double* %escape_alloca_a0, double* %noalias_ret_a0
-; CHECK-NEXT: NoAlias:	double* %escape_alloca_a1, double* %noalias_ret_a0
-; CHECK-NEXT: NoAlias:	double* %noalias_ret_a0, double* %noescape_alloca_a0
-; CHECK-NEXT: NoAlias:	double* %noalias_ret_a0, double* %noescape_alloca_a1
-; CHECK-NEXT: NoAlias:	double* %noalias_ret_a0, double* %normal_ret_a0
-; CHECK-NEXT: NoAlias:	double* %noalias_ret_a0, double* %normal_ret_a1
-; CHECK-NEXT: NoAlias:	double** %indirect_a0, double* %noalias_ret_a1
-; CHECK-NEXT: NoAlias:	double** %indirect_a1, double* %noalias_ret_a1
-; CHECK-NEXT: NoAlias:	double* %loaded_a0, double* %noalias_ret_a1
-; CHECK-NEXT: NoAlias:	double* %loaded_a1, double* %noalias_ret_a1
-; CHECK-NEXT: NoAlias:	double* %arg_a0, double* %noalias_ret_a1
-; CHECK-NEXT: NoAlias:	double* %arg_a1, double* %noalias_ret_a1
-; CHECK-NEXT: NoAlias:	double* %noalias_arg_a0, double* %noalias_ret_a1
-; CHECK-NEXT: NoAlias:	double* %noalias_arg_a1, double* %noalias_ret_a1
-; CHECK-NEXT: NoAlias:	double* %escape_alloca_a0, double* %noalias_ret_a1
-; CHECK-NEXT: NoAlias:	double* %escape_alloca_a1, double* %noalias_ret_a1
-; CHECK-NEXT: NoAlias:	double* %noalias_ret_a1, double* %noescape_alloca_a0
-; CHECK-NEXT: NoAlias:	double* %noalias_ret_a1, double* %noescape_alloca_a1
-; CHECK-NEXT: NoAlias:	double* %noalias_ret_a1, double* %normal_ret_a0
-; CHECK-NEXT: NoAlias:	double* %noalias_ret_a1, double* %normal_ret_a1
-; CHECK-NEXT: NoAlias:	double* %noalias_ret_a0, double* %noalias_ret_a1
-; CHECK-NEXT: Both ModRef:  Ptr: double** %indirect_a0	<->  %normal_ret_a0 = call double* @normal_returner()
-; CHECK-NEXT: Both ModRef:  Ptr: double** %indirect_a1	<->  %normal_ret_a0 = call double* @normal_returner()
-; CHECK-NEXT: Both ModRef:  Ptr: double* %loaded_a0	<->  %normal_ret_a0 = call double* @normal_returner()
-; CHECK-NEXT: Both ModRef:  Ptr: double* %loaded_a1	<->  %normal_ret_a0 = call double* @normal_returner()
-; CHECK-NEXT: Both ModRef:  Ptr: double* %arg_a0	<->  %normal_ret_a0 = call double* @normal_returner()
-; CHECK-NEXT: Both ModRef:  Ptr: double* %arg_a1	<->  %normal_ret_a0 = call double* @normal_returner()
-; CHECK-NEXT: NoModRef:  Ptr: double* %noalias_arg_a0	<->  %normal_ret_a0 = call double* @normal_returner()
-; CHECK-NEXT: NoModRef:  Ptr: double* %noalias_arg_a1	<->  %normal_ret_a0 = call double* @normal_returner()
-; CHECK-NEXT: Both ModRef:  Ptr: double* %escape_alloca_a0	<->  %normal_ret_a0 = call double* @normal_returner()
-; CHECK-NEXT: Both ModRef:  Ptr: double* %escape_alloca_a1	<->  %normal_ret_a0 = call double* @normal_returner()
-; CHECK-NEXT: NoModRef:  Ptr: double* %noescape_alloca_a0	<->  %normal_ret_a0 = call double* @normal_returner()
-; CHECK-NEXT: NoModRef:  Ptr: double* %noescape_alloca_a1	<->  %normal_ret_a0 = call double* @normal_returner()
-; CHECK-NEXT: Both ModRef:  Ptr: double* %normal_ret_a0	<->  %normal_ret_a0 = call double* @normal_returner()
-; CHECK-NEXT: Both ModRef:  Ptr: double* %normal_ret_a1	<->  %normal_ret_a0 = call double* @normal_returner()
-; CHECK-NEXT: NoModRef:  Ptr: double* %noalias_ret_a0	<->  %normal_ret_a0 = call double* @normal_returner()
-; CHECK-NEXT: NoModRef:  Ptr: double* %noalias_ret_a1	<->  %normal_ret_a0 = call double* @normal_returner()
-; CHECK-NEXT: Both ModRef:  Ptr: double** %indirect_a0	<->  %normal_ret_a1 = call double* @normal_returner()
-; CHECK-NEXT: Both ModRef:  Ptr: double** %indirect_a1	<->  %normal_ret_a1 = call double* @normal_returner()
-; CHECK-NEXT: Both ModRef:  Ptr: double* %loaded_a0	<->  %normal_ret_a1 = call double* @normal_returner()
-; CHECK-NEXT: Both ModRef:  Ptr: double* %loaded_a1	<->  %normal_ret_a1 = call double* @normal_returner()
-; CHECK-NEXT: Both ModRef:  Ptr: double* %arg_a0	<->  %normal_ret_a1 = call double* @normal_returner()
-; CHECK-NEXT: Both ModRef:  Ptr: double* %arg_a1	<->  %normal_ret_a1 = call double* @normal_returner()
-; CHECK-NEXT: NoModRef:  Ptr: double* %noalias_arg_a0	<->  %normal_ret_a1 = call double* @normal_returner()
-; CHECK-NEXT: NoModRef:  Ptr: double* %noalias_arg_a1	<->  %normal_ret_a1 = call double* @normal_returner()
-; CHECK-NEXT: Both ModRef:  Ptr: double* %escape_alloca_a0	<->  %normal_ret_a1 = call double* @normal_returner()
-; CHECK-NEXT: Both ModRef:  Ptr: double* %escape_alloca_a1	<->  %normal_ret_a1 = call double* @normal_returner()
-; CHECK-NEXT: NoModRef:  Ptr: double* %noescape_alloca_a0	<->  %normal_ret_a1 = call double* @normal_returner()
-; CHECK-NEXT: NoModRef:  Ptr: double* %noescape_alloca_a1	<->  %normal_ret_a1 = call double* @normal_returner()
-; CHECK-NEXT: Both ModRef:  Ptr: double* %normal_ret_a0	<->  %normal_ret_a1 = call double* @normal_returner()
-; CHECK-NEXT: Both ModRef:  Ptr: double* %normal_ret_a1	<->  %normal_ret_a1 = call double* @normal_returner()
-; CHECK-NEXT: NoModRef:  Ptr: double* %noalias_ret_a0	<->  %normal_ret_a1 = call double* @normal_returner()
-; CHECK-NEXT: NoModRef:  Ptr: double* %noalias_ret_a1	<->  %normal_ret_a1 = call double* @normal_returner()
-; CHECK-NEXT: Both ModRef:  Ptr: double** %indirect_a0	<->  %noalias_ret_a0 = call double* @noalias_returner()
-; CHECK-NEXT: Both ModRef:  Ptr: double** %indirect_a1	<->  %noalias_ret_a0 = call double* @noalias_returner()
-; CHECK-NEXT: Both ModRef:  Ptr: double* %loaded_a0	<->  %noalias_ret_a0 = call double* @noalias_returner()
-; CHECK-NEXT: Both ModRef:  Ptr: double* %loaded_a1	<->  %noalias_ret_a0 = call double* @noalias_returner()
-; CHECK-NEXT: Both ModRef:  Ptr: double* %arg_a0	<->  %noalias_ret_a0 = call double* @noalias_returner()
-; CHECK-NEXT: Both ModRef:  Ptr: double* %arg_a1	<->  %noalias_ret_a0 = call double* @noalias_returner()
-; CHECK-NEXT: NoModRef:  Ptr: double* %noalias_arg_a0	<->  %noalias_ret_a0 = call double* @noalias_returner()
-; CHECK-NEXT: NoModRef:  Ptr: double* %noalias_arg_a1	<->  %noalias_ret_a0 = call double* @noalias_returner()
-; CHECK-NEXT: Both ModRef:  Ptr: double* %escape_alloca_a0	<->  %noalias_ret_a0 = call double* @noalias_returner()
-; CHECK-NEXT: Both ModRef:  Ptr: double* %escape_alloca_a1	<->  %noalias_ret_a0 = call double* @noalias_returner()
-; CHECK-NEXT: NoModRef:  Ptr: double* %noescape_alloca_a0	<->  %noalias_ret_a0 = call double* @noalias_returner()
-; CHECK-NEXT: NoModRef:  Ptr: double* %noescape_alloca_a1	<->  %noalias_ret_a0 = call double* @noalias_returner()
-; CHECK-NEXT: Both ModRef:  Ptr: double* %normal_ret_a0	<->  %noalias_ret_a0 = call double* @noalias_returner()
-; CHECK-NEXT: Both ModRef:  Ptr: double* %normal_ret_a1	<->  %noalias_ret_a0 = call double* @noalias_returner()
-; CHECK-NEXT: Both ModRef:  Ptr: double* %noalias_ret_a0	<->  %noalias_ret_a0 = call double* @noalias_returner()
-; CHECK-NEXT: NoModRef:  Ptr: double* %noalias_ret_a1	<->  %noalias_ret_a0 = call double* @noalias_returner()
-; CHECK-NEXT: Both ModRef:  Ptr: double** %indirect_a0	<->  %noalias_ret_a1 = call double* @noalias_returner()
-; CHECK-NEXT: Both ModRef:  Ptr: double** %indirect_a1	<->  %noalias_ret_a1 = call double* @noalias_returner()
-; CHECK-NEXT: Both ModRef:  Ptr: double* %loaded_a0	<->  %noalias_ret_a1 = call double* @noalias_returner()
-; CHECK-NEXT: Both ModRef:  Ptr: double* %loaded_a1	<->  %noalias_ret_a1 = call double* @noalias_returner()
-; CHECK-NEXT: Both ModRef:  Ptr: double* %arg_a0	<->  %noalias_ret_a1 = call double* @noalias_returner()
-; CHECK-NEXT: Both ModRef:  Ptr: double* %arg_a1	<->  %noalias_ret_a1 = call double* @noalias_returner()
-; CHECK-NEXT: NoModRef:  Ptr: double* %noalias_arg_a0	<->  %noalias_ret_a1 = call double* @noalias_returner()
-; CHECK-NEXT: NoModRef:  Ptr: double* %noalias_arg_a1	<->  %noalias_ret_a1 = call double* @noalias_returner()
-; CHECK-NEXT: Both ModRef:  Ptr: double* %escape_alloca_a0	<->  %noalias_ret_a1 = call double* @noalias_returner()
-; CHECK-NEXT: Both ModRef:  Ptr: double* %escape_alloca_a1	<->  %noalias_ret_a1 = call double* @noalias_returner()
-; CHECK-NEXT: NoModRef:  Ptr: double* %noescape_alloca_a0	<->  %noalias_ret_a1 = call double* @noalias_returner()
-; CHECK-NEXT: NoModRef:  Ptr: double* %noescape_alloca_a1	<->  %noalias_ret_a1 = call double* @noalias_returner()
-; CHECK-NEXT: Both ModRef:  Ptr: double* %normal_ret_a0	<->  %noalias_ret_a1 = call double* @noalias_returner()
-; CHECK-NEXT: Both ModRef:  Ptr: double* %normal_ret_a1	<->  %noalias_ret_a1 = call double* @noalias_returner()
-; CHECK-NEXT: NoModRef:  Ptr: double* %noalias_ret_a0	<->  %noalias_ret_a1 = call double* @noalias_returner()
-; CHECK-NEXT: Both ModRef:  Ptr: double* %noalias_ret_a1	<->  %noalias_ret_a1 = call double* @noalias_returner()
-; CHECK-NEXT: Both ModRef:  Ptr: double** %indirect_a0	<->  call void @callee(double* %escape_alloca_a0)
-; CHECK-NEXT: Both ModRef:  Ptr: double** %indirect_a1	<->  call void @callee(double* %escape_alloca_a0)
-; CHECK-NEXT: Both ModRef:  Ptr: double* %loaded_a0	<->  call void @callee(double* %escape_alloca_a0)
-; CHECK-NEXT: Both ModRef:  Ptr: double* %loaded_a1	<->  call void @callee(double* %escape_alloca_a0)
-; CHECK-NEXT: Both ModRef:  Ptr: double* %arg_a0	<->  call void @callee(double* %escape_alloca_a0)
-; CHECK-NEXT: Both ModRef:  Ptr: double* %arg_a1	<->  call void @callee(double* %escape_alloca_a0)
-; CHECK-NEXT: NoModRef:  Ptr: double* %noalias_arg_a0	<->  call void @callee(double* %escape_alloca_a0)
-; CHECK-NEXT: NoModRef:  Ptr: double* %noalias_arg_a1	<->  call void @callee(double* %escape_alloca_a0)
-; CHECK-NEXT: Both ModRef:  Ptr: double* %escape_alloca_a0	<->  call void @callee(double* %escape_alloca_a0)
-; CHECK-NEXT: Both ModRef:  Ptr: double* %escape_alloca_a1	<->  call void @callee(double* %escape_alloca_a0)
-; CHECK-NEXT: NoModRef:  Ptr: double* %noescape_alloca_a0	<->  call void @callee(double* %escape_alloca_a0)
-; CHECK-NEXT: NoModRef:  Ptr: double* %noescape_alloca_a1	<->  call void @callee(double* %escape_alloca_a0)
-; CHECK-NEXT: Both ModRef:  Ptr: double* %normal_ret_a0	<->  call void @callee(double* %escape_alloca_a0)
-; CHECK-NEXT: Both ModRef:  Ptr: double* %normal_ret_a1	<->  call void @callee(double* %escape_alloca_a0)
-; CHECK-NEXT: NoModRef:  Ptr: double* %noalias_ret_a0	<->  call void @callee(double* %escape_alloca_a0)
-; CHECK-NEXT: NoModRef:  Ptr: double* %noalias_ret_a1	<->  call void @callee(double* %escape_alloca_a0)
-; CHECK-NEXT: Both ModRef:  Ptr: double** %indirect_a0	<->  call void @callee(double* %escape_alloca_a1)
-; CHECK-NEXT: Both ModRef:  Ptr: double** %indirect_a1	<->  call void @callee(double* %escape_alloca_a1)
-; CHECK-NEXT: Both ModRef:  Ptr: double* %loaded_a0	<->  call void @callee(double* %escape_alloca_a1)
-; CHECK-NEXT: Both ModRef:  Ptr: double* %loaded_a1	<->  call void @callee(double* %escape_alloca_a1)
-; CHECK-NEXT: Both ModRef:  Ptr: double* %arg_a0	<->  call void @callee(double* %escape_alloca_a1)
-; CHECK-NEXT: Both ModRef:  Ptr: double* %arg_a1	<->  call void @callee(double* %escape_alloca_a1)
-; CHECK-NEXT: NoModRef:  Ptr: double* %noalias_arg_a0	<->  call void @callee(double* %escape_alloca_a1)
-; CHECK-NEXT: NoModRef:  Ptr: double* %noalias_arg_a1	<->  call void @callee(double* %escape_alloca_a1)
-; CHECK-NEXT: Both ModRef:  Ptr: double* %escape_alloca_a0	<->  call void @callee(double* %escape_alloca_a1)
-; CHECK-NEXT: Both ModRef:  Ptr: double* %escape_alloca_a1	<->  call void @callee(double* %escape_alloca_a1)
-; CHECK-NEXT: NoModRef:  Ptr: double* %noescape_alloca_a0	<->  call void @callee(double* %escape_alloca_a1)
-; CHECK-NEXT: NoModRef:  Ptr: double* %noescape_alloca_a1	<->  call void @callee(double* %escape_alloca_a1)
-; CHECK-NEXT: Both ModRef:  Ptr: double* %normal_ret_a0	<->  call void @callee(double* %escape_alloca_a1)
-; CHECK-NEXT: Both ModRef:  Ptr: double* %normal_ret_a1	<->  call void @callee(double* %escape_alloca_a1)
-; CHECK-NEXT: NoModRef:  Ptr: double* %noalias_ret_a0	<->  call void @callee(double* %escape_alloca_a1)
-; CHECK-NEXT: NoModRef:  Ptr: double* %noalias_ret_a1	<->  call void @callee(double* %escape_alloca_a1)
-; CHECK-NEXT: Both ModRef:  Ptr: double** %indirect_a0	<->  call void @nocap_callee(double* %noescape_alloca_a0)
-; CHECK-NEXT: Both ModRef:  Ptr: double** %indirect_a1	<->  call void @nocap_callee(double* %noescape_alloca_a0)
-; CHECK-NEXT: Both ModRef:  Ptr: double* %loaded_a0	<->  call void @nocap_callee(double* %noescape_alloca_a0)
-; CHECK-NEXT: Both ModRef:  Ptr: double* %loaded_a1	<->  call void @nocap_callee(double* %noescape_alloca_a0)
-; CHECK-NEXT: Both ModRef:  Ptr: double* %arg_a0	<->  call void @nocap_callee(double* %noescape_alloca_a0)
-; CHECK-NEXT: Both ModRef:  Ptr: double* %arg_a1	<->  call void @nocap_callee(double* %noescape_alloca_a0)
-; CHECK-NEXT: NoModRef:  Ptr: double* %noalias_arg_a0	<->  call void @nocap_callee(double* %noescape_alloca_a0)
-; CHECK-NEXT: NoModRef:  Ptr: double* %noalias_arg_a1	<->  call void @nocap_callee(double* %noescape_alloca_a0)
-; CHECK-NEXT: Both ModRef:  Ptr: double* %escape_alloca_a0	<->  call void @nocap_callee(double* %noescape_alloca_a0)
-; CHECK-NEXT: Both ModRef:  Ptr: double* %escape_alloca_a1	<->  call void @nocap_callee(double* %noescape_alloca_a0)
-; CHECK-NEXT: Both ModRef:  Ptr: double* %noescape_alloca_a0	<->  call void @nocap_callee(double* %noescape_alloca_a0)
-; CHECK-NEXT: NoModRef:  Ptr: double* %noescape_alloca_a1	<->  call void @nocap_callee(double* %noescape_alloca_a0)
-; CHECK-NEXT: Both ModRef:  Ptr: double* %normal_ret_a0	<->  call void @nocap_callee(double* %noescape_alloca_a0)
-; CHECK-NEXT: Both ModRef:  Ptr: double* %normal_ret_a1	<->  call void @nocap_callee(double* %noescape_alloca_a0)
-; CHECK-NEXT: NoModRef:  Ptr: double* %noalias_ret_a0	<->  call void @nocap_callee(double* %noescape_alloca_a0)
-; CHECK-NEXT: NoModRef:  Ptr: double* %noalias_ret_a1	<->  call void @nocap_callee(double* %noescape_alloca_a0)
-; CHECK-NEXT: Both ModRef:  Ptr: double** %indirect_a0	<->  call void @nocap_callee(double* %noescape_alloca_a1)
-; CHECK-NEXT: Both ModRef:  Ptr: double** %indirect_a1	<->  call void @nocap_callee(double* %noescape_alloca_a1)
-; CHECK-NEXT: Both ModRef:  Ptr: double* %loaded_a0	<->  call void @nocap_callee(double* %noescape_alloca_a1)
-; CHECK-NEXT: Both ModRef:  Ptr: double* %loaded_a1	<->  call void @nocap_callee(double* %noescape_alloca_a1)
-; CHECK-NEXT: Both ModRef:  Ptr: double* %arg_a0	<->  call void @nocap_callee(double* %noescape_alloca_a1)
-; CHECK-NEXT: Both ModRef:  Ptr: double* %arg_a1	<->  call void @nocap_callee(double* %noescape_alloca_a1)
-; CHECK-NEXT: NoModRef:  Ptr: double* %noalias_arg_a0	<->  call void @nocap_callee(double* %noescape_alloca_a1)
-; CHECK-NEXT: NoModRef:  Ptr: double* %noalias_arg_a1	<->  call void @nocap_callee(double* %noescape_alloca_a1)
-; CHECK-NEXT: Both ModRef:  Ptr: double* %escape_alloca_a0	<->  call void @nocap_callee(double* %noescape_alloca_a1)
-; CHECK-NEXT: Both ModRef:  Ptr: double* %escape_alloca_a1	<->  call void @nocap_callee(double* %noescape_alloca_a1)
-; CHECK-NEXT: NoModRef:  Ptr: double* %noescape_alloca_a0	<->  call void @nocap_callee(double* %noescape_alloca_a1)
-; CHECK-NEXT: Both ModRef:  Ptr: double* %noescape_alloca_a1	<->  call void @nocap_callee(double* %noescape_alloca_a1)
-; CHECK-NEXT: Both ModRef:  Ptr: double* %normal_ret_a0	<->  call void @nocap_callee(double* %noescape_alloca_a1)
-; CHECK-NEXT: Both ModRef:  Ptr: double* %normal_ret_a1	<->  call void @nocap_callee(double* %noescape_alloca_a1)
-; CHECK-NEXT: NoModRef:  Ptr: double* %noalias_ret_a0	<->  call void @nocap_callee(double* %noescape_alloca_a1)
-; CHECK-NEXT: NoModRef:  Ptr: double* %noalias_ret_a1	<->  call void @nocap_callee(double* %noescape_alloca_a1)
-; CHECK-NEXT: Both ModRef:   %normal_ret_a0 = call double* @normal_returner() <->   %normal_ret_a1 = call double* @normal_returner()
-; CHECK-NEXT: Both ModRef:   %normal_ret_a0 = call double* @normal_returner() <->   %noalias_ret_a0 = call double* @noalias_returner()
-; CHECK-NEXT: Both ModRef:   %normal_ret_a0 = call double* @normal_returner() <->   %noalias_ret_a1 = call double* @noalias_returner()
-; CHECK-NEXT: Both ModRef:   %normal_ret_a0 = call double* @normal_returner() <->   call void @callee(double* %escape_alloca_a0)
-; CHECK-NEXT: Both ModRef:   %normal_ret_a0 = call double* @normal_returner() <->   call void @callee(double* %escape_alloca_a1)
-; CHECK-NEXT: Both ModRef:   %normal_ret_a0 = call double* @normal_returner() <->   call void @nocap_callee(double* %noescape_alloca_a0)
-; CHECK-NEXT: Both ModRef:   %normal_ret_a0 = call double* @normal_returner() <->   call void @nocap_callee(double* %noescape_alloca_a1)
-; CHECK-NEXT: Both ModRef:   %normal_ret_a1 = call double* @normal_returner() <->   %normal_ret_a0 = call double* @normal_returner()
-; CHECK-NEXT: Both ModRef:   %normal_ret_a1 = call double* @normal_returner() <->   %noalias_ret_a0 = call double* @noalias_returner()
-; CHECK-NEXT: Both ModRef:   %normal_ret_a1 = call double* @normal_returner() <->   %noalias_ret_a1 = call double* @noalias_returner()
-; CHECK-NEXT: Both ModRef:   %normal_ret_a1 = call double* @normal_returner() <->   call void @callee(double* %escape_alloca_a0)
-; CHECK-NEXT: Both ModRef:   %normal_ret_a1 = call double* @normal_returner() <->   call void @callee(double* %escape_alloca_a1)
-; CHECK-NEXT: Both ModRef:   %normal_ret_a1 = call double* @normal_returner() <->   call void @nocap_callee(double* %noescape_alloca_a0)
-; CHECK-NEXT: Both ModRef:   %normal_ret_a1 = call double* @normal_returner() <->   call void @nocap_callee(double* %noescape_alloca_a1)
-; CHECK-NEXT: Both ModRef:   %noalias_ret_a0 = call double* @noalias_returner() <->   %normal_ret_a0 = call double* @normal_returner()
-; CHECK-NEXT: Both ModRef:   %noalias_ret_a0 = call double* @noalias_returner() <->   %normal_ret_a1 = call double* @normal_returner()
-; CHECK-NEXT: Both ModRef:   %noalias_ret_a0 = call double* @noalias_returner() <->   %noalias_ret_a1 = call double* @noalias_returner()
-; CHECK-NEXT: Both ModRef:   %noalias_ret_a0 = call double* @noalias_returner() <->   call void @callee(double* %escape_alloca_a0)
-; CHECK-NEXT: Both ModRef:   %noalias_ret_a0 = call double* @noalias_returner() <->   call void @callee(double* %escape_alloca_a1)
-; CHECK-NEXT: Both ModRef:   %noalias_ret_a0 = call double* @noalias_returner() <->   call void @nocap_callee(double* %noescape_alloca_a0)
-; CHECK-NEXT: Both ModRef:   %noalias_ret_a0 = call double* @noalias_returner() <->   call void @nocap_callee(double* %noescape_alloca_a1)
-; CHECK-NEXT: Both ModRef:   %noalias_ret_a1 = call double* @noalias_returner() <->   %normal_ret_a0 = call double* @normal_returner()
-; CHECK-NEXT: Both ModRef:   %noalias_ret_a1 = call double* @noalias_returner() <->   %normal_ret_a1 = call double* @normal_returner()
-; CHECK-NEXT: Both ModRef:   %noalias_ret_a1 = call double* @noalias_returner() <->   %noalias_ret_a0 = call double* @noalias_returner()
-; CHECK-NEXT: Both ModRef:   %noalias_ret_a1 = call double* @noalias_returner() <->   call void @callee(double* %escape_alloca_a0)
-; CHECK-NEXT: Both ModRef:   %noalias_ret_a1 = call double* @noalias_returner() <->   call void @callee(double* %escape_alloca_a1)
-; CHECK-NEXT: Both ModRef:   %noalias_ret_a1 = call double* @noalias_returner() <->   call void @nocap_callee(double* %noescape_alloca_a0)
-; CHECK-NEXT: Both ModRef:   %noalias_ret_a1 = call double* @noalias_returner() <->   call void @nocap_callee(double* %noescape_alloca_a1)
-; CHECK-NEXT: Both ModRef:   call void @callee(double* %escape_alloca_a0) <->   %normal_ret_a0 = call double* @normal_returner()
-; CHECK-NEXT: Both ModRef:   call void @callee(double* %escape_alloca_a0) <->   %normal_ret_a1 = call double* @normal_returner()
-; CHECK-NEXT: Both ModRef:   call void @callee(double* %escape_alloca_a0) <->   %noalias_ret_a0 = call double* @noalias_returner()
-; CHECK-NEXT: Both ModRef:   call void @callee(double* %escape_alloca_a0) <->   %noalias_ret_a1 = call double* @noalias_returner()
-; CHECK-NEXT: Both ModRef:   call void @callee(double* %escape_alloca_a0) <->   call void @callee(double* %escape_alloca_a1)
-; CHECK-NEXT: Both ModRef:   call void @callee(double* %escape_alloca_a0) <->   call void @nocap_callee(double* %noescape_alloca_a0)
-; CHECK-NEXT: Both ModRef:   call void @callee(double* %escape_alloca_a0) <->   call void @nocap_callee(double* %noescape_alloca_a1)
-; CHECK-NEXT: Both ModRef:   call void @callee(double* %escape_alloca_a1) <->   %normal_ret_a0 = call double* @normal_returner()
-; CHECK-NEXT: Both ModRef:   call void @callee(double* %escape_alloca_a1) <->   %normal_ret_a1 = call double* @normal_returner()
-; CHECK-NEXT: Both ModRef:   call void @callee(double* %escape_alloca_a1) <->   %noalias_ret_a0 = call double* @noalias_returner()
-; CHECK-NEXT: Both ModRef:   call void @callee(double* %escape_alloca_a1) <->   %noalias_ret_a1 = call double* @noalias_returner()
-; CHECK-NEXT: Both ModRef:   call void @callee(double* %escape_alloca_a1) <->   call void @callee(double* %escape_alloca_a0)
-; CHECK-NEXT: Both ModRef:   call void @callee(double* %escape_alloca_a1) <->   call void @nocap_callee(double* %noescape_alloca_a0)
-; CHECK-NEXT: Both ModRef:   call void @callee(double* %escape_alloca_a1) <->   call void @nocap_callee(double* %noescape_alloca_a1)
-; CHECK-NEXT: Both ModRef:   call void @nocap_callee(double* %noescape_alloca_a0) <->   %normal_ret_a0 = call double* @normal_returner()
-; CHECK-NEXT: Both ModRef:   call void @nocap_callee(double* %noescape_alloca_a0) <->   %normal_ret_a1 = call double* @normal_returner()
-; CHECK-NEXT: Both ModRef:   call void @nocap_callee(double* %noescape_alloca_a0) <->   %noalias_ret_a0 = call double* @noalias_returner()
-; CHECK-NEXT: Both ModRef:   call void @nocap_callee(double* %noescape_alloca_a0) <->   %noalias_ret_a1 = call double* @noalias_returner()
-; CHECK-NEXT: Both ModRef:   call void @nocap_callee(double* %noescape_alloca_a0) <->   call void @callee(double* %escape_alloca_a0)
-; CHECK-NEXT: Both ModRef:   call void @nocap_callee(double* %noescape_alloca_a0) <->   call void @callee(double* %escape_alloca_a1)
-; CHECK-NEXT: Both ModRef:   call void @nocap_callee(double* %noescape_alloca_a0) <->   call void @nocap_callee(double* %noescape_alloca_a1)
-; CHECK-NEXT: Both ModRef:   call void @nocap_callee(double* %noescape_alloca_a1) <->   %normal_ret_a0 = call double* @normal_returner()
-; CHECK-NEXT: Both ModRef:   call void @nocap_callee(double* %noescape_alloca_a1) <->   %normal_ret_a1 = call double* @normal_returner()
-; CHECK-NEXT: Both ModRef:   call void @nocap_callee(double* %noescape_alloca_a1) <->   %noalias_ret_a0 = call double* @noalias_returner()
-; CHECK-NEXT: Both ModRef:   call void @nocap_callee(double* %noescape_alloca_a1) <->   %noalias_ret_a1 = call double* @noalias_returner()
-; CHECK-NEXT: Both ModRef:   call void @nocap_callee(double* %noescape_alloca_a1) <->   call void @callee(double* %escape_alloca_a0)
-; CHECK-NEXT: Both ModRef:   call void @nocap_callee(double* %noescape_alloca_a1) <->   call void @callee(double* %escape_alloca_a1)
-; CHECK-NEXT: Both ModRef:   call void @nocap_callee(double* %noescape_alloca_a1) <->   call void @nocap_callee(double* %noescape_alloca_a0)
+; CHECK: MayAlias:	ptr* %indirect_a0, ptr* %indirect_a1
+; CHECK: MayAlias:	ptr* %indirect_a0, double* %loaded_a0
+; CHECK: MayAlias:	ptr* %indirect_a1, double* %loaded_a0
+; CHECK: MayAlias:	ptr* %indirect_a0, double* %loaded_a1
+; CHECK: MayAlias:	ptr* %indirect_a1, double* %loaded_a1
+; CHECK: MayAlias:	double* %loaded_a0, double* %loaded_a1
+; CHECK: MayAlias:	double* %arg_a0, ptr* %indirect_a0
+; CHECK: MayAlias:	double* %arg_a0, ptr* %indirect_a1
+; CHECK: MayAlias:	double* %arg_a0, double* %loaded_a0
+; CHECK: MayAlias:	double* %arg_a0, double* %loaded_a1
+; CHECK: MayAlias:	double* %arg_a1, ptr* %indirect_a0
+; CHECK: MayAlias:	double* %arg_a1, ptr* %indirect_a1
+; CHECK: MayAlias:	double* %arg_a1, double* %loaded_a0
+; CHECK: MayAlias:	double* %arg_a1, double* %loaded_a1
+; CHECK: MayAlias:	double* %arg_a0, double* %arg_a1
+; CHECK: NoAlias:	ptr* %indirect_a0, double* %noalias_arg_a0
+; CHECK: NoAlias:	ptr* %indirect_a1, double* %noalias_arg_a0
+; CHECK: NoAlias:	double* %loaded_a0, double* %noalias_arg_a0
+; CHECK: NoAlias:	double* %loaded_a1, double* %noalias_arg_a0
+; CHECK: NoAlias:	double* %arg_a0, double* %noalias_arg_a0
+; CHECK: NoAlias:	double* %arg_a1, double* %noalias_arg_a0
+; CHECK: NoAlias:	ptr* %indirect_a0, double* %noalias_arg_a1
+; CHECK: NoAlias:	ptr* %indirect_a1, double* %noalias_arg_a1
+; CHECK: NoAlias:	double* %loaded_a0, double* %noalias_arg_a1
+; CHECK: NoAlias:	double* %loaded_a1, double* %noalias_arg_a1
+; CHECK: NoAlias:	double* %arg_a0, double* %noalias_arg_a1
+; CHECK: NoAlias:	double* %arg_a1, double* %noalias_arg_a1
+; CHECK: NoAlias:	double* %noalias_arg_a0, double* %noalias_arg_a1
+; CHECK: NoAlias:	double* %escape_alloca_a0, ptr* %indirect_a0
+; CHECK: NoAlias:	double* %escape_alloca_a0, ptr* %indirect_a1
+; CHECK: MayAlias:	double* %escape_alloca_a0, double* %loaded_a0
+; CHECK: MayAlias:	double* %escape_alloca_a0, double* %loaded_a1
+; CHECK: NoAlias:	double* %arg_a0, double* %escape_alloca_a0
+; CHECK: NoAlias:	double* %arg_a1, double* %escape_alloca_a0
+; CHECK: NoAlias:	double* %escape_alloca_a0, double* %noalias_arg_a0
+; CHECK: NoAlias:	double* %escape_alloca_a0, double* %noalias_arg_a1
+; CHECK: NoAlias:	double* %escape_alloca_a1, ptr* %indirect_a0
+; CHECK: NoAlias:	double* %escape_alloca_a1, ptr* %indirect_a1
+; CHECK: MayAlias:	double* %escape_alloca_a1, double* %loaded_a0
+; CHECK: MayAlias:	double* %escape_alloca_a1, double* %loaded_a1
+; CHECK: NoAlias:	double* %arg_a0, double* %escape_alloca_a1
+; CHECK: NoAlias:	double* %arg_a1, double* %escape_alloca_a1
+; CHECK: NoAlias:	double* %escape_alloca_a1, double* %noalias_arg_a0
+; CHECK: NoAlias:	double* %escape_alloca_a1, double* %noalias_arg_a1
+; CHECK: NoAlias:	double* %escape_alloca_a0, double* %escape_alloca_a1
+; CHECK: NoAlias:	ptr* %indirect_a0, double* %noescape_alloca_a0
+; CHECK: NoAlias:	ptr* %indirect_a1, double* %noescape_alloca_a0
+; CHECK: NoAlias:	double* %loaded_a0, double* %noescape_alloca_a0
+; CHECK: NoAlias:	double* %loaded_a1, double* %noescape_alloca_a0
+; CHECK: NoAlias:	double* %arg_a0, double* %noescape_alloca_a0
+; CHECK: NoAlias:	double* %arg_a1, double* %noescape_alloca_a0
+; CHECK: NoAlias:	double* %noalias_arg_a0, double* %noescape_alloca_a0
+; CHECK: NoAlias:	double* %noalias_arg_a1, double* %noescape_alloca_a0
+; CHECK: NoAlias:	double* %escape_alloca_a0, double* %noescape_alloca_a0
+; CHECK: NoAlias:	double* %escape_alloca_a1, double* %noescape_alloca_a0
+; CHECK: NoAlias:	ptr* %indirect_a0, double* %noescape_alloca_a1
+; CHECK: NoAlias:	ptr* %indirect_a1, double* %noescape_alloca_a1
+; CHECK: NoAlias:	double* %loaded_a0, double* %noescape_alloca_a1
+; CHECK: NoAlias:	double* %loaded_a1, double* %noescape_alloca_a1
+; CHECK: NoAlias:	double* %arg_a0, double* %noescape_alloca_a1
+; CHECK: NoAlias:	double* %arg_a1, double* %noescape_alloca_a1
+; CHECK: NoAlias:	double* %noalias_arg_a0, double* %noescape_alloca_a1
+; CHECK: NoAlias:	double* %noalias_arg_a1, double* %noescape_alloca_a1
+; CHECK: NoAlias:	double* %escape_alloca_a0, double* %noescape_alloca_a1
+; CHECK: NoAlias:	double* %escape_alloca_a1, double* %noescape_alloca_a1
+; CHECK: NoAlias:	double* %noescape_alloca_a0, double* %noescape_alloca_a1
+; CHECK: MayAlias:	ptr* %indirect_a0, double* %normal_ret_a0
+; CHECK: MayAlias:	ptr* %indirect_a1, double* %normal_ret_a0
+; CHECK: MayAlias:	double* %loaded_a0, double* %normal_ret_a0
+; CHECK: MayAlias:	double* %loaded_a1, double* %normal_ret_a0
+; CHECK: MayAlias:	double* %arg_a0, double* %normal_ret_a0
+; CHECK: MayAlias:	double* %arg_a1, double* %normal_ret_a0
+; CHECK: NoAlias:	double* %noalias_arg_a0, double* %normal_ret_a0
+; CHECK: NoAlias:	double* %noalias_arg_a1, double* %normal_ret_a0
+; CHECK: MayAlias:	double* %escape_alloca_a0, double* %normal_ret_a0
+; CHECK: MayAlias:	double* %escape_alloca_a1, double* %normal_ret_a0
+; CHECK: NoAlias:	double* %noescape_alloca_a0, double* %normal_ret_a0
+; CHECK: NoAlias:	double* %noescape_alloca_a1, double* %normal_ret_a0
+; CHECK: MayAlias:	ptr* %indirect_a0, double* %normal_ret_a1
+; CHECK: MayAlias:	ptr* %indirect_a1, double* %normal_ret_a1
+; CHECK: MayAlias:	double* %loaded_a0, double* %normal_ret_a1
+; CHECK: MayAlias:	double* %loaded_a1, double* %normal_ret_a1
+; CHECK: MayAlias:	double* %arg_a0, double* %normal_ret_a1
+; CHECK: MayAlias:	double* %arg_a1, double* %normal_ret_a1
+; CHECK: NoAlias:	double* %noalias_arg_a0, double* %normal_ret_a1
+; CHECK: NoAlias:	double* %noalias_arg_a1, double* %normal_ret_a1
+; CHECK: MayAlias:	double* %escape_alloca_a0, double* %normal_ret_a1
+; CHECK: MayAlias:	double* %escape_alloca_a1, double* %normal_ret_a1
+; CHECK: NoAlias:	double* %noescape_alloca_a0, double* %normal_ret_a1
+; CHECK: NoAlias:	double* %noescape_alloca_a1, double* %normal_ret_a1
+; CHECK: MayAlias:	double* %normal_ret_a0, double* %normal_ret_a1
+; CHECK: NoAlias:	ptr* %indirect_a0, double* %noalias_ret_a0
+; CHECK: NoAlias:	ptr* %indirect_a1, double* %noalias_ret_a0
+; CHECK: NoAlias:	double* %loaded_a0, double* %noalias_ret_a0
+; CHECK: NoAlias:	double* %loaded_a1, double* %noalias_ret_a0
+; CHECK: NoAlias:	double* %arg_a0, double* %noalias_ret_a0
+; CHECK: NoAlias:	double* %arg_a1, double* %noalias_ret_a0
+; CHECK: NoAlias:	double* %noalias_arg_a0, double* %noalias_ret_a0
+; CHECK: NoAlias:	double* %noalias_arg_a1, double* %noalias_ret_a0
+; CHECK: NoAlias:	double* %escape_alloca_a0, double* %noalias_ret_a0
+; CHECK: NoAlias:	double* %escape_alloca_a1, double* %noalias_ret_a0
+; CHECK: NoAlias:	double* %noalias_ret_a0, double* %noescape_alloca_a0
+; CHECK: NoAlias:	double* %noalias_ret_a0, double* %noescape_alloca_a1
+; CHECK: NoAlias:	double* %noalias_ret_a0, double* %normal_ret_a0
+; CHECK: NoAlias:	double* %noalias_ret_a0, double* %normal_ret_a1
+; CHECK: NoAlias:	ptr* %indirect_a0, double* %noalias_ret_a1
+; CHECK: NoAlias:	ptr* %indirect_a1, double* %noalias_ret_a1
+; CHECK: NoAlias:	double* %loaded_a0, double* %noalias_ret_a1
+; CHECK: NoAlias:	double* %loaded_a1, double* %noalias_ret_a1
+; CHECK: NoAlias:	double* %arg_a0, double* %noalias_ret_a1
+; CHECK: NoAlias:	double* %arg_a1, double* %noalias_ret_a1
+; CHECK: NoAlias:	double* %noalias_arg_a0, double* %noalias_ret_a1
+; CHECK: NoAlias:	double* %noalias_arg_a1, double* %noalias_ret_a1
+; CHECK: NoAlias:	double* %escape_alloca_a0, double* %noalias_ret_a1
+; CHECK: NoAlias:	double* %escape_alloca_a1, double* %noalias_ret_a1
+; CHECK: NoAlias:	double* %noalias_ret_a1, double* %noescape_alloca_a0
+; CHECK: NoAlias:	double* %noalias_ret_a1, double* %noescape_alloca_a1
+; CHECK: NoAlias:	double* %noalias_ret_a1, double* %normal_ret_a0
+; CHECK: NoAlias:	double* %noalias_ret_a1, double* %normal_ret_a1
+; CHECK: NoAlias:	double* %noalias_ret_a0, double* %noalias_ret_a1
+; CHECK: Both ModRef:  Ptr: ptr* %indirect_a0	<->  %normal_ret_a0 = call ptr @normal_returner()
+; CHECK: Both ModRef:  Ptr: ptr* %indirect_a1	<->  %normal_ret_a0 = call ptr @normal_returner()
+; CHECK: Both ModRef:  Ptr: double* %loaded_a0	<->  %normal_ret_a0 = call ptr @normal_returner()
+; CHECK: Both ModRef:  Ptr: double* %loaded_a1	<->  %normal_ret_a0 = call ptr @normal_returner()
+; CHECK: Both ModRef:  Ptr: double* %arg_a0	<->  %normal_ret_a0 = call ptr @normal_returner()
+; CHECK: Both ModRef:  Ptr: double* %arg_a1	<->  %normal_ret_a0 = call ptr @normal_returner()
+; CHECK: NoModRef:  Ptr: double* %noalias_arg_a0	<->  %normal_ret_a0 = call ptr @normal_returner()
+; CHECK: NoModRef:  Ptr: double* %noalias_arg_a1	<->  %normal_ret_a0 = call ptr @normal_returner()
+; CHECK: Both ModRef:  Ptr: double* %escape_alloca_a0	<->  %normal_ret_a0 = call ptr @normal_returner()
+; CHECK: Both ModRef:  Ptr: double* %escape_alloca_a1	<->  %normal_ret_a0 = call ptr @normal_returner()
+; CHECK: NoModRef:  Ptr: double* %noescape_alloca_a0	<->  %normal_ret_a0 = call ptr @normal_returner()
+; CHECK: NoModRef:  Ptr: double* %noescape_alloca_a1	<->  %normal_ret_a0 = call ptr @normal_returner()
+; CHECK: Both ModRef:  Ptr: double* %normal_ret_a0	<->  %normal_ret_a0 = call ptr @normal_returner()
+; CHECK: Both ModRef:  Ptr: double* %normal_ret_a1	<->  %normal_ret_a0 = call ptr @normal_returner()
+; CHECK: NoModRef:  Ptr: double* %noalias_ret_a0	<->  %normal_ret_a0 = call ptr @normal_returner()
+; CHECK: NoModRef:  Ptr: double* %noalias_ret_a1	<->  %normal_ret_a0 = call ptr @normal_returner()
+; CHECK: Both ModRef:  Ptr: ptr* %indirect_a0	<->  %normal_ret_a1 = call ptr @normal_returner()
+; CHECK: Both ModRef:  Ptr: ptr* %indirect_a1	<->  %normal_ret_a1 = call ptr @normal_returner()
+; CHECK: Both ModRef:  Ptr: double* %loaded_a0	<->  %normal_ret_a1 = call ptr @normal_returner()
+; CHECK: Both ModRef:  Ptr: double* %loaded_a1	<->  %normal_ret_a1 = call ptr @normal_returner()
+; CHECK: Both ModRef:  Ptr: double* %arg_a0	<->  %normal_ret_a1 = call ptr @normal_returner()
+; CHECK: Both ModRef:  Ptr: double* %arg_a1	<->  %normal_ret_a1 = call ptr @normal_returner()
+; CHECK: NoModRef:  Ptr: double* %noalias_arg_a0	<->  %normal_ret_a1 = call ptr @normal_returner()
+; CHECK: NoModRef:  Ptr: double* %noalias_arg_a1	<->  %normal_ret_a1 = call ptr @normal_returner()
+; CHECK: Both ModRef:  Ptr: double* %escape_alloca_a0	<->  %normal_ret_a1 = call ptr @normal_returner()
+; CHECK: Both ModRef:  Ptr: double* %escape_alloca_a1	<->  %normal_ret_a1 = call ptr @normal_returner()
+; CHECK: NoModRef:  Ptr: double* %noescape_alloca_a0	<->  %normal_ret_a1 = call ptr @normal_returner()
+; CHECK: NoModRef:  Ptr: double* %noescape_alloca_a1	<->  %normal_ret_a1 = call ptr @normal_returner()
+; CHECK: Both ModRef:  Ptr: double* %normal_ret_a0	<->  %normal_ret_a1 = call ptr @normal_returner()
+; CHECK: Both ModRef:  Ptr: double* %normal_ret_a1	<->  %normal_ret_a1 = call ptr @normal_returner()
+; CHECK: NoModRef:  Ptr: double* %noalias_ret_a0	<->  %normal_ret_a1 = call ptr @normal_returner()
+; CHECK: NoModRef:  Ptr: double* %noalias_ret_a1	<->  %normal_ret_a1 = call ptr @normal_returner()
+; CHECK: Both ModRef:  Ptr: ptr* %indirect_a0	<->  %noalias_ret_a0 = call ptr @noalias_returner()
+; CHECK: Both ModRef:  Ptr: ptr* %indirect_a1	<->  %noalias_ret_a0 = call ptr @noalias_returner()
+; CHECK: Both ModRef:  Ptr: double* %loaded_a0	<->  %noalias_ret_a0 = call ptr @noalias_returner()
+; CHECK: Both ModRef:  Ptr: double* %loaded_a1	<->  %noalias_ret_a0 = call ptr @noalias_returner()
+; CHECK: Both ModRef:  Ptr: double* %arg_a0	<->  %noalias_ret_a0 = call ptr @noalias_returner()
+; CHECK: Both ModRef:  Ptr: double* %arg_a1	<->  %noalias_ret_a0 = call ptr @noalias_returner()
+; CHECK: NoModRef:  Ptr: double* %noalias_arg_a0	<->  %noalias_ret_a0 = call ptr @noalias_returner()
+; CHECK: NoModRef:  Ptr: double* %noalias_arg_a1	<->  %noalias_ret_a0 = call ptr @noalias_returner()
+; CHECK: Both ModRef:  Ptr: double* %escape_alloca_a0	<->  %noalias_ret_a0 = call ptr @noalias_returner()
+; CHECK: Both ModRef:  Ptr: double* %escape_alloca_a1	<->  %noalias_ret_a0 = call ptr @noalias_returner()
+; CHECK: NoModRef:  Ptr: double* %noescape_alloca_a0	<->  %noalias_ret_a0 = call ptr @noalias_returner()
+; CHECK: NoModRef:  Ptr: double* %noescape_alloca_a1	<->  %noalias_ret_a0 = call ptr @noalias_returner()
+; CHECK: Both ModRef:  Ptr: double* %normal_ret_a0	<->  %noalias_ret_a0 = call ptr @noalias_returner()
+; CHECK: Both ModRef:  Ptr: double* %normal_ret_a1	<->  %noalias_ret_a0 = call ptr @noalias_returner()
+; CHECK: Both ModRef:  Ptr: double* %noalias_ret_a0	<->  %noalias_ret_a0 = call ptr @noalias_returner()
+; CHECK: NoModRef:  Ptr: double* %noalias_ret_a1	<->  %noalias_ret_a0 = call ptr @noalias_returner()
+; CHECK: Both ModRef:  Ptr: ptr* %indirect_a0	<->  %noalias_ret_a1 = call ptr @noalias_returner()
+; CHECK: Both ModRef:  Ptr: ptr* %indirect_a1	<->  %noalias_ret_a1 = call ptr @noalias_returner()
+; CHECK: Both ModRef:  Ptr: double* %loaded_a0	<->  %noalias_ret_a1 = call ptr @noalias_returner()
+; CHECK: Both ModRef:  Ptr: double* %loaded_a1	<->  %noalias_ret_a1 = call ptr @noalias_returner()
+; CHECK: Both ModRef:  Ptr: double* %arg_a0	<->  %noalias_ret_a1 = call ptr @noalias_returner()
+; CHECK: Both ModRef:  Ptr: double* %arg_a1	<->  %noalias_ret_a1 = call ptr @noalias_returner()
+; CHECK: NoModRef:  Ptr: double* %noalias_arg_a0	<->  %noalias_ret_a1 = call ptr @noalias_returner()
+; CHECK: NoModRef:  Ptr: double* %noalias_arg_a1	<->  %noalias_ret_a1 = call ptr @noalias_returner()
+; CHECK: Both ModRef:  Ptr: double* %escape_alloca_a0	<->  %noalias_ret_a1 = call ptr @noalias_returner()
+; CHECK: Both ModRef:  Ptr: double* %escape_alloca_a1	<->  %noalias_ret_a1 = call ptr @noalias_returner()
+; CHECK: NoModRef:  Ptr: double* %noescape_alloca_a0	<->  %noalias_ret_a1 = call ptr @noalias_returner()
+; CHECK: NoModRef:  Ptr: double* %noescape_alloca_a1	<->  %noalias_ret_a1 = call ptr @noalias_returner()
+; CHECK: Both ModRef:  Ptr: double* %normal_ret_a0	<->  %noalias_ret_a1 = call ptr @noalias_returner()
+; CHECK: Both ModRef:  Ptr: double* %normal_ret_a1	<->  %noalias_ret_a1 = call ptr @noalias_returner()
+; CHECK: NoModRef:  Ptr: double* %noalias_ret_a0	<->  %noalias_ret_a1 = call ptr @noalias_returner()
+; CHECK: Both ModRef:  Ptr: double* %noalias_ret_a1	<->  %noalias_ret_a1 = call ptr @noalias_returner()
+; CHECK: Both ModRef:  Ptr: ptr* %indirect_a0	<->  call void @callee(ptr %escape_alloca_a0)
+; CHECK: Both ModRef:  Ptr: ptr* %indirect_a1	<->  call void @callee(ptr %escape_alloca_a0)
+; CHECK: Both ModRef:  Ptr: double* %loaded_a0	<->  call void @callee(ptr %escape_alloca_a0)
+; CHECK: Both ModRef:  Ptr: double* %loaded_a1	<->  call void @callee(ptr %escape_alloca_a0)
+; CHECK: Both ModRef:  Ptr: double* %arg_a0	<->  call void @callee(ptr %escape_alloca_a0)
+; CHECK: Both ModRef:  Ptr: double* %arg_a1	<->  call void @callee(ptr %escape_alloca_a0)
+; CHECK: NoModRef:  Ptr: double* %noalias_arg_a0	<->  call void @callee(ptr %escape_alloca_a0)
+; CHECK: NoModRef:  Ptr: double* %noalias_arg_a1	<->  call void @callee(ptr %escape_alloca_a0)
+; CHECK: Both ModRef:  Ptr: double* %escape_alloca_a0	<->  call void @callee(ptr %escape_alloca_a0)
+; CHECK: Both ModRef:  Ptr: double* %escape_alloca_a1	<->  call void @callee(ptr %escape_alloca_a0)
+; CHECK: NoModRef:  Ptr: double* %noescape_alloca_a0	<->  call void @callee(ptr %escape_alloca_a0)
+; CHECK: NoModRef:  Ptr: double* %noescape_alloca_a1	<->  call void @callee(ptr %escape_alloca_a0)
+; CHECK: Both ModRef:  Ptr: double* %normal_ret_a0	<->  call void @callee(ptr %escape_alloca_a0)
+; CHECK: Both ModRef:  Ptr: double* %normal_ret_a1	<->  call void @callee(ptr %escape_alloca_a0)
+; CHECK: NoModRef:  Ptr: double* %noalias_ret_a0	<->  call void @callee(ptr %escape_alloca_a0)
+; CHECK: NoModRef:  Ptr: double* %noalias_ret_a1	<->  call void @callee(ptr %escape_alloca_a0)
+; CHECK: Both ModRef:  Ptr: ptr* %indirect_a0	<->  call void @callee(ptr %escape_alloca_a1)
+; CHECK: Both ModRef:  Ptr: ptr* %indirect_a1	<->  call void @callee(ptr %escape_alloca_a1)
+; CHECK: Both ModRef:  Ptr: double* %loaded_a0	<->  call void @callee(ptr %escape_alloca_a1)
+; CHECK: Both ModRef:  Ptr: double* %loaded_a1	<->  call void @callee(ptr %escape_alloca_a1)
+; CHECK: Both ModRef:  Ptr: double* %arg_a0	<->  call void @callee(ptr %escape_alloca_a1)
+; CHECK: Both ModRef:  Ptr: double* %arg_a1	<->  call void @callee(ptr %escape_alloca_a1)
+; CHECK: NoModRef:  Ptr: double* %noalias_arg_a0	<->  call void @callee(ptr %escape_alloca_a1)
+; CHECK: NoModRef:  Ptr: double* %noalias_arg_a1	<->  call void @callee(ptr %escape_alloca_a1)
+; CHECK: Both ModRef:  Ptr: double* %escape_alloca_a0	<->  call void @callee(ptr %escape_alloca_a1)
+; CHECK: Both ModRef:  Ptr: double* %escape_alloca_a1	<->  call void @callee(ptr %escape_alloca_a1)
+; CHECK: NoModRef:  Ptr: double* %noescape_alloca_a0	<->  call void @callee(ptr %escape_alloca_a1)
+; CHECK: NoModRef:  Ptr: double* %noescape_alloca_a1	<->  call void @callee(ptr %escape_alloca_a1)
+; CHECK: Both ModRef:  Ptr: double* %normal_ret_a0	<->  call void @callee(ptr %escape_alloca_a1)
+; CHECK: Both ModRef:  Ptr: double* %normal_ret_a1	<->  call void @callee(ptr %escape_alloca_a1)
+; CHECK: NoModRef:  Ptr: double* %noalias_ret_a0	<->  call void @callee(ptr %escape_alloca_a1)
+; CHECK: NoModRef:  Ptr: double* %noalias_ret_a1	<->  call void @callee(ptr %escape_alloca_a1)
+; CHECK: Both ModRef:  Ptr: ptr* %indirect_a0	<->  call void @nocap_callee(ptr %noescape_alloca_a0)
+; CHECK: Both ModRef:  Ptr: ptr* %indirect_a1	<->  call void @nocap_callee(ptr %noescape_alloca_a0)
+; CHECK: Both ModRef:  Ptr: double* %loaded_a0	<->  call void @nocap_callee(ptr %noescape_alloca_a0)
+; CHECK: Both ModRef:  Ptr: double* %loaded_a1	<->  call void @nocap_callee(ptr %noescape_alloca_a0)
+; CHECK: Both ModRef:  Ptr: double* %arg_a0	<->  call void @nocap_callee(ptr %noescape_alloca_a0)
+; CHECK: Both ModRef:  Ptr: double* %arg_a1	<->  call void @nocap_callee(ptr %noescape_alloca_a0)
+; CHECK: NoModRef:  Ptr: double* %noalias_arg_a0	<->  call void @nocap_callee(ptr %noescape_alloca_a0)
+; CHECK: NoModRef:  Ptr: double* %noalias_arg_a1	<->  call void @nocap_callee(ptr %noescape_alloca_a0)
+; CHECK: Both ModRef:  Ptr: double* %escape_alloca_a0	<->  call void @nocap_callee(ptr %noescape_alloca_a0)
+; CHECK: Both ModRef:  Ptr: double* %escape_alloca_a1	<->  call void @nocap_callee(ptr %noescape_alloca_a0)
+; CHECK: Both ModRef:  Ptr: double* %noescape_alloca_a0	<->  call void @nocap_callee(ptr %noescape_alloca_a0)
+; CHECK: NoModRef:  Ptr: double* %noescape_alloca_a1	<->  call void @nocap_callee(ptr %noescape_alloca_a0)
+; CHECK: Both ModRef:  Ptr: double* %normal_ret_a0	<->  call void @nocap_callee(ptr %noescape_alloca_a0)
+; CHECK: Both ModRef:  Ptr: double* %normal_ret_a1	<->  call void @nocap_callee(ptr %noescape_alloca_a0)
+; CHECK: NoModRef:  Ptr: double* %noalias_ret_a0	<->  call void @nocap_callee(ptr %noescape_alloca_a0)
+; CHECK: NoModRef:  Ptr: double* %noalias_ret_a1	<->  call void @nocap_callee(ptr %noescape_alloca_a0)
+; CHECK: Both ModRef:  Ptr: ptr* %indirect_a0	<->  call void @nocap_callee(ptr %noescape_alloca_a1)
+; CHECK: Both ModRef:  Ptr: ptr* %indirect_a1	<->  call void @nocap_callee(ptr %noescape_alloca_a1)
+; CHECK: Both ModRef:  Ptr: double* %loaded_a0	<->  call void @nocap_callee(ptr %noescape_alloca_a1)
+; CHECK: Both ModRef:  Ptr: double* %loaded_a1	<->  call void @nocap_callee(ptr %noescape_alloca_a1)
+; CHECK: Both ModRef:  Ptr: double* %arg_a0	<->  call void @nocap_callee(ptr %noescape_alloca_a1)
+; CHECK: Both ModRef:  Ptr: double* %arg_a1	<->  call void @nocap_callee(ptr %noescape_alloca_a1)
+; CHECK: NoModRef:  Ptr: double* %noalias_arg_a0	<->  call void @nocap_callee(ptr %noescape_alloca_a1)
+; CHECK: NoModRef:  Ptr: double* %noalias_arg_a1	<->  call void @nocap_callee(ptr %noescape_alloca_a1)
+; CHECK: Both ModRef:  Ptr: double* %escape_alloca_a0	<->  call void @nocap_callee(ptr %noescape_alloca_a1)
+; CHECK: Both ModRef:  Ptr: double* %escape_alloca_a1	<->  call void @nocap_callee(ptr %noescape_alloca_a1)
+; CHECK: NoModRef:  Ptr: double* %noescape_alloca_a0	<->  call void @nocap_callee(ptr %noescape_alloca_a1)
+; CHECK: Both ModRef:  Ptr: double* %noescape_alloca_a1	<->  call void @nocap_callee(ptr %noescape_alloca_a1)
+; CHECK: Both ModRef:  Ptr: double* %normal_ret_a0	<->  call void @nocap_callee(ptr %noescape_alloca_a1)
+; CHECK: Both ModRef:  Ptr: double* %normal_ret_a1	<->  call void @nocap_callee(ptr %noescape_alloca_a1)
+; CHECK: NoModRef:  Ptr: double* %noalias_ret_a0	<->  call void @nocap_callee(ptr %noescape_alloca_a1)
+; CHECK: NoModRef:  Ptr: double* %noalias_ret_a1	<->  call void @nocap_callee(ptr %noescape_alloca_a1)
+; CHECK: Both ModRef:   %normal_ret_a0 = call ptr @normal_returner() <->   %normal_ret_a1 = call ptr @normal_returner()
+; CHECK: Both ModRef:   %normal_ret_a0 = call ptr @normal_returner() <->   %noalias_ret_a0 = call ptr @noalias_returner()
+; CHECK: Both ModRef:   %normal_ret_a0 = call ptr @normal_returner() <->   %noalias_ret_a1 = call ptr @noalias_returner()
+; CHECK: Both ModRef:   %normal_ret_a0 = call ptr @normal_returner() <->   call void @callee(ptr %escape_alloca_a0)
+; CHECK: Both ModRef:   %normal_ret_a0 = call ptr @normal_returner() <->   call void @callee(ptr %escape_alloca_a1)
+; CHECK: Both ModRef:   %normal_ret_a0 = call ptr @normal_returner() <->   call void @nocap_callee(ptr %noescape_alloca_a0)
+; CHECK: Both ModRef:   %normal_ret_a0 = call ptr @normal_returner() <->   call void @nocap_callee(ptr %noescape_alloca_a1)
+; CHECK: Both ModRef:   %normal_ret_a1 = call ptr @normal_returner() <->   %normal_ret_a0 = call ptr @normal_returner()
+; CHECK: Both ModRef:   %normal_ret_a1 = call ptr @normal_returner() <->   %noalias_ret_a0 = call ptr @noalias_returner()
+; CHECK: Both ModRef:   %normal_ret_a1 = call ptr @normal_returner() <->   %noalias_ret_a1 = call ptr @noalias_returner()
+; CHECK: Both ModRef:   %normal_ret_a1 = call ptr @normal_returner() <->   call void @callee(ptr %escape_alloca_a0)
+; CHECK: Both ModRef:   %normal_ret_a1 = call ptr @normal_returner() <->   call void @callee(ptr %escape_alloca_a1)
+; CHECK: Both ModRef:   %normal_ret_a1 = call ptr @normal_returner() <->   call void @nocap_callee(ptr %noescape_alloca_a0)
+; CHECK: Both ModRef:   %normal_ret_a1 = call ptr @normal_returner() <->   call void @nocap_callee(ptr %noescape_alloca_a1)
+; CHECK: Both ModRef:   %noalias_ret_a0 = call ptr @noalias_returner() <->   %normal_ret_a0 = call ptr @normal_returner()
+; CHECK: Both ModRef:   %noalias_ret_a0 = call ptr @noalias_returner() <->   %normal_ret_a1 = call ptr @normal_returner()
+; CHECK: Both ModRef:   %noalias_ret_a0 = call ptr @noalias_returner() <->   %noalias_ret_a1 = call ptr @noalias_returner()
+; CHECK: Both ModRef:   %noalias_ret_a0 = call ptr @noalias_returner() <->   call void @callee(ptr %escape_alloca_a0)
+; CHECK: Both ModRef:   %noalias_ret_a0 = call ptr @noalias_returner() <->   call void @callee(ptr %escape_alloca_a1)
+; CHECK: Both ModRef:   %noalias_ret_a0 = call ptr @noalias_returner() <->   call void @nocap_callee(ptr %noescape_alloca_a0)
+; CHECK: Both ModRef:   %noalias_ret_a0 = call ptr @noalias_returner() <->   call void @nocap_callee(ptr %noescape_alloca_a1)
+; CHECK: Both ModRef:   %noalias_ret_a1 = call ptr @noalias_returner() <->   %normal_ret_a0 = call ptr @normal_returner()
+; CHECK: Both ModRef:   %noalias_ret_a1 = call ptr @noalias_returner() <->   %normal_ret_a1 = call ptr @normal_returner()
+; CHECK: Both ModRef:   %noalias_ret_a1 = call ptr @noalias_returner() <->   %noalias_ret_a0 = call ptr @noalias_returner()
+; CHECK: Both ModRef:   %noalias_ret_a1 = call ptr @noalias_returner() <->   call void @callee(ptr %escape_alloca_a0)
+; CHECK: Both ModRef:   %noalias_ret_a1 = call ptr @noalias_returner() <->   call void @callee(ptr %escape_alloca_a1)
+; CHECK: Both ModRef:   %noalias_ret_a1 = call ptr @noalias_returner() <->   call void @nocap_callee(ptr %noescape_alloca_a0)
+; CHECK: Both ModRef:   %noalias_ret_a1 = call ptr @noalias_returner() <->   call void @nocap_callee(ptr %noescape_alloca_a1)
+; CHECK: Both ModRef:   call void @callee(ptr %escape_alloca_a0) <->   %normal_ret_a0 = call ptr @normal_returner()
+; CHECK: Both ModRef:   call void @callee(ptr %escape_alloca_a0) <->   %normal_ret_a1 = call ptr @normal_returner()
+; CHECK: Both ModRef:   call void @callee(ptr %escape_alloca_a0) <->   %noalias_ret_a0 = call ptr @noalias_returner()
+; CHECK: Both ModRef:   call void @callee(ptr %escape_alloca_a0) <->   %noalias_ret_a1 = call ptr @noalias_returner()
+; CHECK: Both ModRef:   call void @callee(ptr %escape_alloca_a0) <->   call void @callee(ptr %escape_alloca_a1)
+; CHECK: Both ModRef:   call void @callee(ptr %escape_alloca_a0) <->   call void @nocap_callee(ptr %noescape_alloca_a0)
+; CHECK: Both ModRef:   call void @callee(ptr %escape_alloca_a0) <->   call void @nocap_callee(ptr %noescape_alloca_a1)
+; CHECK: Both ModRef:   call void @callee(ptr %escape_alloca_a1) <->   %normal_ret_a0 = call ptr @normal_returner()
+; CHECK: Both ModRef:   call void @callee(ptr %escape_alloca_a1) <->   %normal_ret_a1 = call ptr @normal_returner()
+; CHECK: Both ModRef:   call void @callee(ptr %escape_alloca_a1) <->   %noalias_ret_a0 = call ptr @noalias_returner()
+; CHECK: Both ModRef:   call void @callee(ptr %escape_alloca_a1) <->   %noalias_ret_a1 = call ptr @noalias_returner()
+; CHECK: Both ModRef:   call void @callee(ptr %escape_alloca_a1) <->   call void @callee(ptr %escape_alloca_a0)
+; CHECK: Both ModRef:   call void @callee(ptr %escape_alloca_a1) <->   call void @nocap_callee(ptr %noescape_alloca_a0)
+; CHECK: Both ModRef:   call void @callee(ptr %escape_alloca_a1) <->   call void @nocap_callee(ptr %noescape_alloca_a1)
+; CHECK: Both ModRef:   call void @nocap_callee(ptr %noescape_alloca_a0) <->   %normal_ret_a0 = call ptr @normal_returner()
+; CHECK: Both ModRef:   call void @nocap_callee(ptr %noescape_alloca_a0) <->   %normal_ret_a1 = call ptr @normal_returner()
+; CHECK: Both ModRef:   call void @nocap_callee(ptr %noescape_alloca_a0) <->   %noalias_ret_a0 = call ptr @noalias_returner()
+; CHECK: Both ModRef:   call void @nocap_callee(ptr %noescape_alloca_a0) <->   %noalias_ret_a1 = call ptr @noalias_returner()
+; CHECK: Both ModRef:   call void @nocap_callee(ptr %noescape_alloca_a0) <->   call void @callee(ptr %escape_alloca_a0)
+; CHECK: Both ModRef:   call void @nocap_callee(ptr %noescape_alloca_a0) <->   call void @callee(ptr %escape_alloca_a1)
+; CHECK: Both ModRef:   call void @nocap_callee(ptr %noescape_alloca_a0) <->   call void @nocap_callee(ptr %noescape_alloca_a1)
+; CHECK: Both ModRef:   call void @nocap_callee(ptr %noescape_alloca_a1) <->   %normal_ret_a0 = call ptr @normal_returner()
+; CHECK: Both ModRef:   call void @nocap_callee(ptr %noescape_alloca_a1) <->   %normal_ret_a1 = call ptr @normal_returner()
+; CHECK: Both ModRef:   call void @nocap_callee(ptr %noescape_alloca_a1) <->   %noalias_ret_a0 = call ptr @noalias_returner()
+; CHECK: Both ModRef:   call void @nocap_callee(ptr %noescape_alloca_a1) <->   %noalias_ret_a1 = call ptr @noalias_returner()
+; CHECK: Both ModRef:   call void @nocap_callee(ptr %noescape_alloca_a1) <->   call void @callee(ptr %escape_alloca_a0)
+; CHECK: Both ModRef:   call void @nocap_callee(ptr %noescape_alloca_a1) <->   call void @callee(ptr %escape_alloca_a1)
+; CHECK: Both ModRef:   call void @nocap_callee(ptr %noescape_alloca_a1) <->   call void @nocap_callee(ptr %noescape_alloca_a0)
 ; CHECK: ===== Alias Analysis Evaluator Report =====
 ; CHECK-NEXT:   120 Total Alias Queries Performed
 ; CHECK-NEXT:   84 no alias responses (70.0%)

diff  --git a/llvm/test/Analysis/BasicAA/assume.ll b/llvm/test/Analysis/BasicAA/assume.ll
index 6579aae6fbec..0d7bbb56949c 100644
--- a/llvm/test/Analysis/BasicAA/assume.ll
+++ b/llvm/test/Analysis/BasicAA/assume.ll
@@ -1,14 +1,14 @@
 ; RUN: opt < %s -aa-pipeline=basic-aa -passes=aa-eval -print-all-alias-modref-info -disable-output 2>&1 | FileCheck %s
 target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:32:64-v128:32:128-a0:0:32-n32"
 
-declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i1) #0
+declare void @llvm.memcpy.p0.p0.i64(ptr nocapture, ptr nocapture, i64, i1) #0
 declare void @llvm.assume(i1) #0
 
-define void @test1(i8* %P, i8* %Q) nounwind ssp {
+define void @test1(ptr %P, ptr %Q) nounwind ssp {
   tail call void @llvm.assume(i1 true)
-  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-  load i8, i8* %P
-  load i8, i8* %Q
+  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+  load i8, ptr %P
+  load i8, ptr %Q
   ret void
 
 ; CHECK-LABEL: Function: test1:
@@ -16,29 +16,29 @@ define void @test1(i8* %P, i8* %Q) nounwind ssp {
 ; CHECK: MayAlias:	i8* %P, i8* %Q
 ; CHECK: NoModRef:  Ptr: i8* %P	<->  tail call void @llvm.assume(i1 true)
 ; CHECK: NoModRef:  Ptr: i8* %Q	<->  tail call void @llvm.assume(i1 true)
-; CHECK: Both ModRef:  Ptr: i8* %P	<->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-; CHECK: Both ModRef:  Ptr: i8* %Q	<->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-; CHECK: NoModRef:   tail call void @llvm.assume(i1 true) <->   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-; CHECK: NoModRef:   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false) <->   tail call void @llvm.assume(i1 true)
+; CHECK: Both ModRef:  Ptr: i8* %P	<->  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+; CHECK: Both ModRef:  Ptr: i8* %Q	<->  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+; CHECK: NoModRef:   tail call void @llvm.assume(i1 true) <->   tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+; CHECK: NoModRef:   tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false) <->   tail call void @llvm.assume(i1 true)
 }
 
 ; Same but with operand bundles
-define void @test2(i8* %P, i8* %Q) nounwind ssp {
-  tail call void @llvm.assume(i1 true) [ "nonnull"(i8* %P) ]
-  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-  load i8, i8* %P
-  load i8, i8* %Q
+define void @test2(ptr %P, ptr %Q) nounwind ssp {
+  tail call void @llvm.assume(i1 true) [ "nonnull"(ptr %P) ]
+  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+  load i8, ptr %P
+  load i8, ptr %Q
   ret void
 
 ; CHECK-LABEL: Function: test2:
 
 ; CHECK: MayAlias:	i8* %P, i8* %Q
-; CHECK: NoModRef:  Ptr: i8* %P	<->  tail call void @llvm.assume(i1 true) [ "nonnull"(i8* %P) ]
-; CHECK: NoModRef:  Ptr: i8* %Q	<->  tail call void @llvm.assume(i1 true) [ "nonnull"(i8* %P) ]
-; CHECK: Both ModRef:  Ptr: i8* %P	<->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-; CHECK: Both ModRef:  Ptr: i8* %Q	<->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-; CHECK: NoModRef:   tail call void @llvm.assume(i1 true) [ "nonnull"(i8* %P) ] <->   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-; CHECK: NoModRef:   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false) <->   tail call void @llvm.assume(i1 true) [ "nonnull"(i8* %P) ]
+; CHECK: NoModRef:  Ptr: i8* %P	<->  tail call void @llvm.assume(i1 true) [ "nonnull"(ptr %P) ]
+; CHECK: NoModRef:  Ptr: i8* %Q	<->  tail call void @llvm.assume(i1 true) [ "nonnull"(ptr %P) ]
+; CHECK: Both ModRef:  Ptr: i8* %P	<->  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+; CHECK: Both ModRef:  Ptr: i8* %Q	<->  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+; CHECK: NoModRef:   tail call void @llvm.assume(i1 true) [ "nonnull"(ptr %P) ] <->   tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+; CHECK: NoModRef:   tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false) <->   tail call void @llvm.assume(i1 true) [ "nonnull"(ptr %P) ]
 }
 
 attributes #0 = { nounwind }

diff  --git a/llvm/test/Analysis/BasicAA/atomic-memory-intrinsics.ll b/llvm/test/Analysis/BasicAA/atomic-memory-intrinsics.ll
index 76c31efbe9f5..e60e7b1ec0b3 100644
--- a/llvm/test/Analysis/BasicAA/atomic-memory-intrinsics.ll
+++ b/llvm/test/Analysis/BasicAA/atomic-memory-intrinsics.ll
@@ -1,135 +1,135 @@
 ; RUN: opt -aa-pipeline=basic-aa -passes=aa-eval -print-all-alias-modref-info -disable-output 2>&1 %s | FileCheck %s
 
-declare void @llvm.memset.element.unordered.atomic.p0i8.i32(i8*, i8, i64, i32)
+declare void @llvm.memset.element.unordered.atomic.p0.i32(ptr, i8, i64, i32)
 
-define void @test_memset_element_unordered_atomic_const_size(i8* noalias %a) {
+define void @test_memset_element_unordered_atomic_const_size(ptr noalias %a) {
 ; CHECK-LABEL: Function: test_memset_element_unordered_atomic_const_size
-; CHECK:       Just Mod:  Ptr: i8* %a	<->  call void @llvm.memset.element.unordered.atomic.p0i8.i64(i8* align 1 %a, i8 0, i64 4, i32 1)
-; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.1	<->  call void @llvm.memset.element.unordered.atomic.p0i8.i64(i8* align 1 %a, i8 0, i64 4, i32 1)
-; CHECK-NEXT:  NoModRef:  Ptr: i8* %a.gep.5	<->  call void @llvm.memset.element.unordered.atomic.p0i8.i64(i8* align 1 %a, i8 0, i64 4, i32 1)
+; CHECK:       Just Mod:  Ptr: i8* %a	<->  call void @llvm.memset.element.unordered.atomic.p0.i64(ptr align 1 %a, i8 0, i64 4, i32 1)
+; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.1	<->  call void @llvm.memset.element.unordered.atomic.p0.i64(ptr align 1 %a, i8 0, i64 4, i32 1)
+; CHECK-NEXT:  NoModRef:  Ptr: i8* %a.gep.5	<->  call void @llvm.memset.element.unordered.atomic.p0.i64(ptr align 1 %a, i8 0, i64 4, i32 1)
 ;
 entry:
-  load i8, i8* %a
-  call void @llvm.memset.element.unordered.atomic.p0i8.i32(i8* align 1 %a, i8 0, i64 4, i32 1)
-  %a.gep.1 = getelementptr i8, i8* %a, i32 1
-  store i8 0, i8* %a.gep.1
-  %a.gep.5 = getelementptr i8, i8* %a, i32 5
-  store i8 1, i8* %a.gep.5
+  load i8, ptr %a
+  call void @llvm.memset.element.unordered.atomic.p0.i32(ptr align 1 %a, i8 0, i64 4, i32 1)
+  %a.gep.1 = getelementptr i8, ptr %a, i32 1
+  store i8 0, ptr %a.gep.1
+  %a.gep.5 = getelementptr i8, ptr %a, i32 5
+  store i8 1, ptr %a.gep.5
   ret void
 }
 
-define void @test_memset_element_unordered_atomic_variable_size(i8* noalias %a, i64 %n) {
+define void @test_memset_element_unordered_atomic_variable_size(ptr noalias %a, i64 %n) {
 ; CHECK-LABEL: Function: test_memset_element_unordered_atomic_variable_size
-; CHECK:       Just Mod:  Ptr: i8* %a	<->  call void @llvm.memset.element.unordered.atomic.p0i8.i64(i8* align 1 %a, i8 0, i64 %n, i32 1)
-; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.1	<->  call void @llvm.memset.element.unordered.atomic.p0i8.i64(i8* align 1 %a, i8 0, i64 %n, i32 1)
-; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.5	<->  call void @llvm.memset.element.unordered.atomic.p0i8.i64(i8* align 1 %a, i8 0, i64 %n, i32 1)
+; CHECK:       Just Mod:  Ptr: i8* %a	<->  call void @llvm.memset.element.unordered.atomic.p0.i64(ptr align 1 %a, i8 0, i64 %n, i32 1)
+; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.1	<->  call void @llvm.memset.element.unordered.atomic.p0.i64(ptr align 1 %a, i8 0, i64 %n, i32 1)
+; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.5	<->  call void @llvm.memset.element.unordered.atomic.p0.i64(ptr align 1 %a, i8 0, i64 %n, i32 1)
 ;
 entry:
-  load i8, i8* %a
-  call void @llvm.memset.element.unordered.atomic.p0i8.i32(i8* align 1 %a, i8 0, i64 %n, i32 1)
-  %a.gep.1 = getelementptr i8, i8* %a, i32 1
-  store i8 0, i8* %a.gep.1
-  %a.gep.5 = getelementptr i8, i8* %a, i32 5
-  store i8 1, i8* %a.gep.5
+  load i8, ptr %a
+  call void @llvm.memset.element.unordered.atomic.p0.i32(ptr align 1 %a, i8 0, i64 %n, i32 1)
+  %a.gep.1 = getelementptr i8, ptr %a, i32 1
+  store i8 0, ptr %a.gep.1
+  %a.gep.5 = getelementptr i8, ptr %a, i32 5
+  store i8 1, ptr %a.gep.5
   ret void
 }
 
-declare void @llvm.memcpy.element.unordered.atomic.p0i8.p0i8.i64(i8* nocapture writeonly, i8* nocapture readonly, i64, i32)
+declare void @llvm.memcpy.element.unordered.atomic.p0.p0.i64(ptr nocapture writeonly, ptr nocapture readonly, i64, i32)
 
-define void @test_memcpy_element_unordered_atomic_const_size(i8* noalias %a, i8* noalias %b) {
+define void @test_memcpy_element_unordered_atomic_const_size(ptr noalias %a, ptr noalias %b) {
 ; CHECK-LABEL: Function: test_memcpy_element_unordered_atomic_const_size
-; CHECK:       Just Ref:  Ptr: i8* %a	<->  call void @llvm.memcpy.element.unordered.atomic.p0i8.p0i8.i64(i8* align 1 %b, i8* align 1 %a, i64 4, i32 1)
-; CHECK-NEXT:  Just Mod:  Ptr: i8* %b	<->  call void @llvm.memcpy.element.unordered.atomic.p0i8.p0i8.i64(i8* align 1 %b, i8* align 1 %a, i64 4, i32 1)
-; CHECK-NEXT:  Just Ref:  Ptr: i8* %a.gep.1	<->  call void @llvm.memcpy.element.unordered.atomic.p0i8.p0i8.i64(i8* align 1 %b, i8* align 1 %a, i64 4, i32 1)
-; CHECK-NEXT:  NoModRef:  Ptr: i8* %a.gep.5	<->  call void @llvm.memcpy.element.unordered.atomic.p0i8.p0i8.i64(i8* align 1 %b, i8* align 1 %a, i64 4, i32 1)
-; CHECK-NEXT:  Just Mod:  Ptr: i8* %b.gep.1	<->  call void @llvm.memcpy.element.unordered.atomic.p0i8.p0i8.i64(i8* align 1 %b, i8* align 1 %a, i64 4, i32 1)
-; CHECK-NEXT:  NoModRef:  Ptr: i8* %b.gep.5	<->  call void @llvm.memcpy.element.unordered.atomic.p0i8.p0i8.i64(i8* align 1 %b, i8* align 1 %a, i64 4, i32 1)
+; CHECK:       Just Ref:  Ptr: i8* %a	<->  call void @llvm.memcpy.element.unordered.atomic.p0.p0.i64(ptr align 1 %b, ptr align 1 %a, i64 4, i32 1)
+; CHECK-NEXT:  Just Mod:  Ptr: i8* %b	<->  call void @llvm.memcpy.element.unordered.atomic.p0.p0.i64(ptr align 1 %b, ptr align 1 %a, i64 4, i32 1)
+; CHECK-NEXT:  Just Ref:  Ptr: i8* %a.gep.1	<->  call void @llvm.memcpy.element.unordered.atomic.p0.p0.i64(ptr align 1 %b, ptr align 1 %a, i64 4, i32 1)
+; CHECK-NEXT:  NoModRef:  Ptr: i8* %a.gep.5	<->  call void @llvm.memcpy.element.unordered.atomic.p0.p0.i64(ptr align 1 %b, ptr align 1 %a, i64 4, i32 1)
+; CHECK-NEXT:  Just Mod:  Ptr: i8* %b.gep.1	<->  call void @llvm.memcpy.element.unordered.atomic.p0.p0.i64(ptr align 1 %b, ptr align 1 %a, i64 4, i32 1)
+; CHECK-NEXT:  NoModRef:  Ptr: i8* %b.gep.5	<->  call void @llvm.memcpy.element.unordered.atomic.p0.p0.i64(ptr align 1 %b, ptr align 1 %a, i64 4, i32 1)
 ;
 entry:
-  load i8, i8* %a
-  load i8, i8* %b
-  %a.gep.1 = getelementptr i8, i8* %a, i32 1
-  store i8 0, i8* %a.gep.1
-  %a.gep.5 = getelementptr i8, i8* %a, i32 5
-  store i8 1, i8* %a.gep.5
-  call void @llvm.memcpy.element.unordered.atomic.p0i8.p0i8.i64(i8* align 1 %b, i8* align 1 %a, i64 4, i32 1)
-  %b.gep.1 = getelementptr i8, i8* %b, i32 1
-  store i8 0, i8* %b.gep.1
-  %b.gep.5 = getelementptr i8, i8* %b, i32 5
-  store i8 1, i8* %b.gep.5
+  load i8, ptr %a
+  load i8, ptr %b
+  %a.gep.1 = getelementptr i8, ptr %a, i32 1
+  store i8 0, ptr %a.gep.1
+  %a.gep.5 = getelementptr i8, ptr %a, i32 5
+  store i8 1, ptr %a.gep.5
+  call void @llvm.memcpy.element.unordered.atomic.p0.p0.i64(ptr align 1 %b, ptr align 1 %a, i64 4, i32 1)
+  %b.gep.1 = getelementptr i8, ptr %b, i32 1
+  store i8 0, ptr %b.gep.1
+  %b.gep.5 = getelementptr i8, ptr %b, i32 5
+  store i8 1, ptr %b.gep.5
   ret void
 }
 
-define void @test_memcpy_element_unordered_atomic_variable_size(i8* noalias %a, i8* noalias %b, i64 %n) {
+define void @test_memcpy_element_unordered_atomic_variable_size(ptr noalias %a, ptr noalias %b, i64 %n) {
 ; CHECK-LABEL: Function: test_memcpy_element_unordered_atomic_variable_size
-; CHECK:       Just Ref:  Ptr: i8* %a	<->  call void @llvm.memcpy.element.unordered.atomic.p0i8.p0i8.i64(i8* align 1 %b, i8* align 1 %a, i64 %n, i32 1)
-; CHECK-NEXT:  Just Mod:  Ptr: i8* %b	<->  call void @llvm.memcpy.element.unordered.atomic.p0i8.p0i8.i64(i8* align 1 %b, i8* align 1 %a, i64 %n, i32 1)
-; CHECK-NEXT:  Just Ref:  Ptr: i8* %a.gep.1	<->  call void @llvm.memcpy.element.unordered.atomic.p0i8.p0i8.i64(i8* align 1 %b, i8* align 1 %a, i64 %n, i32 1)
-; CHECK-NEXT:  Just Ref:  Ptr: i8* %a.gep.5	<->  call void @llvm.memcpy.element.unordered.atomic.p0i8.p0i8.i64(i8* align 1 %b, i8* align 1 %a, i64 %n, i32 1)
-; CHECK-NEXT:  Just Mod:  Ptr: i8* %b.gep.1	<->  call void @llvm.memcpy.element.unordered.atomic.p0i8.p0i8.i64(i8* align 1 %b, i8* align 1 %a, i64 %n, i32 1)
-; CHECK-NEXT:  Just Mod:  Ptr: i8* %b.gep.5	<->  call void @llvm.memcpy.element.unordered.atomic.p0i8.p0i8.i64(i8* align 1 %b, i8* align 1 %a, i64 %n, i32 1)
+; CHECK:       Just Ref:  Ptr: i8* %a	<->  call void @llvm.memcpy.element.unordered.atomic.p0.p0.i64(ptr align 1 %b, ptr align 1 %a, i64 %n, i32 1)
+; CHECK-NEXT:  Just Mod:  Ptr: i8* %b	<->  call void @llvm.memcpy.element.unordered.atomic.p0.p0.i64(ptr align 1 %b, ptr align 1 %a, i64 %n, i32 1)
+; CHECK-NEXT:  Just Ref:  Ptr: i8* %a.gep.1	<->  call void @llvm.memcpy.element.unordered.atomic.p0.p0.i64(ptr align 1 %b, ptr align 1 %a, i64 %n, i32 1)
+; CHECK-NEXT:  Just Ref:  Ptr: i8* %a.gep.5	<->  call void @llvm.memcpy.element.unordered.atomic.p0.p0.i64(ptr align 1 %b, ptr align 1 %a, i64 %n, i32 1)
+; CHECK-NEXT:  Just Mod:  Ptr: i8* %b.gep.1	<->  call void @llvm.memcpy.element.unordered.atomic.p0.p0.i64(ptr align 1 %b, ptr align 1 %a, i64 %n, i32 1)
+; CHECK-NEXT:  Just Mod:  Ptr: i8* %b.gep.5	<->  call void @llvm.memcpy.element.unordered.atomic.p0.p0.i64(ptr align 1 %b, ptr align 1 %a, i64 %n, i32 1)
 ;
 entry:
-  load i8, i8* %a
-  load i8, i8* %b
-  %a.gep.1 = getelementptr i8, i8* %a, i32 1
-  store i8 0, i8* %a.gep.1
-  %a.gep.5 = getelementptr i8, i8* %a, i32 5
-  store i8 1, i8* %a.gep.5
-  call void @llvm.memcpy.element.unordered.atomic.p0i8.p0i8.i64(i8* align 1 %b, i8* align 1 %a, i64 %n, i32 1)
-  %b.gep.1 = getelementptr i8, i8* %b, i32 1
-  store i8 0, i8* %b.gep.1
-  %b.gep.5 = getelementptr i8, i8* %b, i32 5
-  store i8 1, i8* %b.gep.5
+  load i8, ptr %a
+  load i8, ptr %b
+  %a.gep.1 = getelementptr i8, ptr %a, i32 1
+  store i8 0, ptr %a.gep.1
+  %a.gep.5 = getelementptr i8, ptr %a, i32 5
+  store i8 1, ptr %a.gep.5
+  call void @llvm.memcpy.element.unordered.atomic.p0.p0.i64(ptr align 1 %b, ptr align 1 %a, i64 %n, i32 1)
+  %b.gep.1 = getelementptr i8, ptr %b, i32 1
+  store i8 0, ptr %b.gep.1
+  %b.gep.5 = getelementptr i8, ptr %b, i32 5
+  store i8 1, ptr %b.gep.5
   ret void
 }
 
-declare void @llvm.memmove.element.unordered.atomic.p0i8.p0i8.i64(i8* nocapture writeonly, i8* nocapture readonly, i64, i32)
+declare void @llvm.memmove.element.unordered.atomic.p0.p0.i64(ptr nocapture writeonly, ptr nocapture readonly, i64, i32)
 
-define void @test_memmove_element_unordered_atomic_const_size(i8* noalias %a, i8* noalias %b) {
+define void @test_memmove_element_unordered_atomic_const_size(ptr noalias %a, ptr noalias %b) {
 ; CHECK-LABEL: Function: test_memmove_element_unordered_atomic_const_size
-; CHECK:       Just Ref:  Ptr: i8* %a	<->  call void @llvm.memmove.element.unordered.atomic.p0i8.p0i8.i64(i8* align 1 %b, i8* align 1 %a, i64 4, i32 1)
-; CHECK-NEXT:  Just Mod:  Ptr: i8* %b	<->  call void @llvm.memmove.element.unordered.atomic.p0i8.p0i8.i64(i8* align 1 %b, i8* align 1 %a, i64 4, i32 1)
-; CHECK-NEXT:  Just Ref:  Ptr: i8* %a.gep.1	<->  call void @llvm.memmove.element.unordered.atomic.p0i8.p0i8.i64(i8* align 1 %b, i8* align 1 %a, i64 4, i32 1)
-; CHECK-NEXT:  NoModRef:  Ptr: i8* %a.gep.5	<->  call void @llvm.memmove.element.unordered.atomic.p0i8.p0i8.i64(i8* align 1 %b, i8* align 1 %a, i64 4, i32 1)
-; CHECK-NEXT:  Just Mod:  Ptr: i8* %b.gep.1	<->  call void @llvm.memmove.element.unordered.atomic.p0i8.p0i8.i64(i8* align 1 %b, i8* align 1 %a, i64 4, i32 1)
-; CHECK-NEXT:  NoModRef:  Ptr: i8* %b.gep.5	<->  call void @llvm.memmove.element.unordered.atomic.p0i8.p0i8.i64(i8* align 1 %b, i8* align 1 %a, i64 4, i32 1)
+; CHECK:       Just Ref:  Ptr: i8* %a	<->  call void @llvm.memmove.element.unordered.atomic.p0.p0.i64(ptr align 1 %b, ptr align 1 %a, i64 4, i32 1)
+; CHECK-NEXT:  Just Mod:  Ptr: i8* %b	<->  call void @llvm.memmove.element.unordered.atomic.p0.p0.i64(ptr align 1 %b, ptr align 1 %a, i64 4, i32 1)
+; CHECK-NEXT:  Just Ref:  Ptr: i8* %a.gep.1	<->  call void @llvm.memmove.element.unordered.atomic.p0.p0.i64(ptr align 1 %b, ptr align 1 %a, i64 4, i32 1)
+; CHECK-NEXT:  NoModRef:  Ptr: i8* %a.gep.5	<->  call void @llvm.memmove.element.unordered.atomic.p0.p0.i64(ptr align 1 %b, ptr align 1 %a, i64 4, i32 1)
+; CHECK-NEXT:  Just Mod:  Ptr: i8* %b.gep.1	<->  call void @llvm.memmove.element.unordered.atomic.p0.p0.i64(ptr align 1 %b, ptr align 1 %a, i64 4, i32 1)
+; CHECK-NEXT:  NoModRef:  Ptr: i8* %b.gep.5	<->  call void @llvm.memmove.element.unordered.atomic.p0.p0.i64(ptr align 1 %b, ptr align 1 %a, i64 4, i32 1)
 ;
 entry:
-  load i8, i8* %a
-  load i8, i8* %b
-  %a.gep.1 = getelementptr i8, i8* %a, i32 1
-  store i8 0, i8* %a.gep.1
-  %a.gep.5 = getelementptr i8, i8* %a, i32 5
-  store i8 1, i8* %a.gep.5
-  call void @llvm.memmove.element.unordered.atomic.p0i8.p0i8.i64(i8* align 1 %b, i8* align 1 %a, i64 4, i32 1)
-  %b.gep.1 = getelementptr i8, i8* %b, i32 1
-  store i8 0, i8* %b.gep.1
-  %b.gep.5 = getelementptr i8, i8* %b, i32 5
-  store i8 1, i8* %b.gep.5
+  load i8, ptr %a
+  load i8, ptr %b
+  %a.gep.1 = getelementptr i8, ptr %a, i32 1
+  store i8 0, ptr %a.gep.1
+  %a.gep.5 = getelementptr i8, ptr %a, i32 5
+  store i8 1, ptr %a.gep.5
+  call void @llvm.memmove.element.unordered.atomic.p0.p0.i64(ptr align 1 %b, ptr align 1 %a, i64 4, i32 1)
+  %b.gep.1 = getelementptr i8, ptr %b, i32 1
+  store i8 0, ptr %b.gep.1
+  %b.gep.5 = getelementptr i8, ptr %b, i32 5
+  store i8 1, ptr %b.gep.5
   ret void
 }
 
-define void @test_memmove_element_unordered_atomic_variable_size(i8* noalias %a, i8* noalias %b, i64 %n) {
+define void @test_memmove_element_unordered_atomic_variable_size(ptr noalias %a, ptr noalias %b, i64 %n) {
 ; CHECK-LABEL: Function: test_memmove_element_unordered_atomic_variable_size
-; CHECK:       Just Ref:  Ptr: i8* %a	<->  call void @llvm.memmove.element.unordered.atomic.p0i8.p0i8.i64(i8* align 1 %b, i8* align 1 %a, i64 %n, i32 1)
-; CHECK-NEXT:  Just Mod:  Ptr: i8* %b	<->  call void @llvm.memmove.element.unordered.atomic.p0i8.p0i8.i64(i8* align 1 %b, i8* align 1 %a, i64 %n, i32 1)
-; CHECK-NEXT:  Just Ref:  Ptr: i8* %a.gep.1	<->  call void @llvm.memmove.element.unordered.atomic.p0i8.p0i8.i64(i8* align 1 %b, i8* align 1 %a, i64 %n, i32 1)
-; CHECK-NEXT:  Just Ref:  Ptr: i8* %a.gep.5	<->  call void @llvm.memmove.element.unordered.atomic.p0i8.p0i8.i64(i8* align 1 %b, i8* align 1 %a, i64 %n, i32 1)
-; CHECK-NEXT:  Just Mod:  Ptr: i8* %b.gep.1	<->  call void @llvm.memmove.element.unordered.atomic.p0i8.p0i8.i64(i8* align 1 %b, i8* align 1 %a, i64 %n, i32 1)
-; CHECK-NEXT:  Just Mod:  Ptr: i8* %b.gep.5	<->  call void @llvm.memmove.element.unordered.atomic.p0i8.p0i8.i64(i8* align 1 %b, i8* align 1 %a, i64 %n, i32 1)
+; CHECK:       Just Ref:  Ptr: i8* %a	<->  call void @llvm.memmove.element.unordered.atomic.p0.p0.i64(ptr align 1 %b, ptr align 1 %a, i64 %n, i32 1)
+; CHECK-NEXT:  Just Mod:  Ptr: i8* %b	<->  call void @llvm.memmove.element.unordered.atomic.p0.p0.i64(ptr align 1 %b, ptr align 1 %a, i64 %n, i32 1)
+; CHECK-NEXT:  Just Ref:  Ptr: i8* %a.gep.1	<->  call void @llvm.memmove.element.unordered.atomic.p0.p0.i64(ptr align 1 %b, ptr align 1 %a, i64 %n, i32 1)
+; CHECK-NEXT:  Just Ref:  Ptr: i8* %a.gep.5	<->  call void @llvm.memmove.element.unordered.atomic.p0.p0.i64(ptr align 1 %b, ptr align 1 %a, i64 %n, i32 1)
+; CHECK-NEXT:  Just Mod:  Ptr: i8* %b.gep.1	<->  call void @llvm.memmove.element.unordered.atomic.p0.p0.i64(ptr align 1 %b, ptr align 1 %a, i64 %n, i32 1)
+; CHECK-NEXT:  Just Mod:  Ptr: i8* %b.gep.5	<->  call void @llvm.memmove.element.unordered.atomic.p0.p0.i64(ptr align 1 %b, ptr align 1 %a, i64 %n, i32 1)
 ;
 entry:
-  load i8, i8* %a
-  load i8, i8* %b
-  %a.gep.1 = getelementptr i8, i8* %a, i32 1
-  store i8 0, i8* %a.gep.1
-  %a.gep.5 = getelementptr i8, i8* %a, i32 5
-  store i8 1, i8* %a.gep.5
-  call void @llvm.memmove.element.unordered.atomic.p0i8.p0i8.i64(i8* align 1 %b, i8* align 1 %a, i64 %n, i32 1)
-  %b.gep.1 = getelementptr i8, i8* %b, i32 1
-  store i8 0, i8* %b.gep.1
-  %b.gep.5 = getelementptr i8, i8* %b, i32 5
-  store i8 1, i8* %b.gep.5
+  load i8, ptr %a
+  load i8, ptr %b
+  %a.gep.1 = getelementptr i8, ptr %a, i32 1
+  store i8 0, ptr %a.gep.1
+  %a.gep.5 = getelementptr i8, ptr %a, i32 5
+  store i8 1, ptr %a.gep.5
+  call void @llvm.memmove.element.unordered.atomic.p0.p0.i64(ptr align 1 %b, ptr align 1 %a, i64 %n, i32 1)
+  %b.gep.1 = getelementptr i8, ptr %b, i32 1
+  store i8 0, ptr %b.gep.1
+  %b.gep.5 = getelementptr i8, ptr %b, i32 5
+  store i8 1, ptr %b.gep.5
   ret void
 }

diff  --git a/llvm/test/Analysis/BasicAA/call-attrs.ll b/llvm/test/Analysis/BasicAA/call-attrs.ll
index 8e680570fed3..c42c90831074 100644
--- a/llvm/test/Analysis/BasicAA/call-attrs.ll
+++ b/llvm/test/Analysis/BasicAA/call-attrs.ll
@@ -1,43 +1,43 @@
 ; RUN: opt < %s -aa-pipeline=basic-aa -passes=aa-eval -print-all-alias-modref-info -disable-output 2>&1 | FileCheck %s
 
-declare void @readonly_attr(i8* readonly nocapture)
-declare void @writeonly_attr(i8* writeonly nocapture)
-declare void @readnone_attr(i8* readnone nocapture)
+declare void @readonly_attr(ptr readonly nocapture)
+declare void @writeonly_attr(ptr writeonly nocapture)
+declare void @readnone_attr(ptr readnone nocapture)
 
-declare void @readonly_func(i8* nocapture) readonly
-declare void @writeonly_func(i8* nocapture) writeonly
-declare void @readnone_func(i8* nocapture) readnone
+declare void @readonly_func(ptr nocapture) readonly
+declare void @writeonly_func(ptr nocapture) writeonly
+declare void @readnone_func(ptr nocapture) readnone
 
-declare void @read_write(i8* writeonly nocapture, i8* readonly nocapture, i8* readnone nocapture)
+declare void @read_write(ptr writeonly nocapture, ptr readonly nocapture, ptr readnone nocapture)
 
 declare void @func()
 
-define void @test(i8* noalias %p) {
+define void @test(ptr noalias %p) {
 entry:
-  load i8, i8* %p
-  call void @readonly_attr(i8* %p)
-  call void @readonly_func(i8* %p)
+  load i8, ptr %p
+  call void @readonly_attr(ptr %p)
+  call void @readonly_func(ptr %p)
 
-  call void @writeonly_attr(i8* %p)
-  call void @writeonly_func(i8* %p)
+  call void @writeonly_attr(ptr %p)
+  call void @writeonly_func(ptr %p)
 
-  call void @readnone_attr(i8* %p)
-  call void @readnone_func(i8* %p)
+  call void @readnone_attr(ptr %p)
+  call void @readnone_func(ptr %p)
 
-  call void @read_write(i8* %p, i8* %p, i8* %p)
+  call void @read_write(ptr %p, ptr %p, ptr %p)
 
-  call void @func() ["deopt" (i8* %p)]
-  call void @writeonly_attr(i8* %p) ["deopt" (i8* %p)]
+  call void @func() ["deopt" (ptr %p)]
+  call void @writeonly_attr(ptr %p) ["deopt" (ptr %p)]
 
   ret void
 }
 
-; CHECK:  Just Ref:  Ptr: i8* %p	<->  call void @readonly_attr(i8* %p)
-; CHECK:  Just Ref:  Ptr: i8* %p	<->  call void @readonly_func(i8* %p)
-; CHECK:  Just Mod:  Ptr: i8* %p	<->  call void @writeonly_attr(i8* %p)
-; CHECK:  Just Mod:  Ptr: i8* %p	<->  call void @writeonly_func(i8* %p)
-; CHECK:  NoModRef:  Ptr: i8* %p	<->  call void @readnone_attr(i8* %p)
-; CHECK:  NoModRef:  Ptr: i8* %p	<->  call void @readnone_func(i8* %p)
-; CHECK:  Both ModRef:  Ptr: i8* %p	<->  call void @read_write(i8* %p, i8* %p, i8* %p)
-; CHECK:  Just Ref:  Ptr: i8* %p	<->  call void @func() [ "deopt"(i8* %p) ]
-; CHECK:  Both ModRef:  Ptr: i8* %p	<->  call void @writeonly_attr(i8* %p) [ "deopt"(i8* %p) ]
+; CHECK:  Just Ref:  Ptr: i8* %p	<->  call void @readonly_attr(ptr %p)
+; CHECK:  Just Ref:  Ptr: i8* %p	<->  call void @readonly_func(ptr %p)
+; CHECK:  Just Mod:  Ptr: i8* %p	<->  call void @writeonly_attr(ptr %p)
+; CHECK:  Just Mod:  Ptr: i8* %p	<->  call void @writeonly_func(ptr %p)
+; CHECK:  NoModRef:  Ptr: i8* %p	<->  call void @readnone_attr(ptr %p)
+; CHECK:  NoModRef:  Ptr: i8* %p	<->  call void @readnone_func(ptr %p)
+; CHECK:  Both ModRef:  Ptr: i8* %p	<->  call void @read_write(ptr %p, ptr %p, ptr %p)
+; CHECK:  Just Ref:  Ptr: i8* %p	<->  call void @func() [ "deopt"(ptr %p) ]
+; CHECK:  Both ModRef:  Ptr: i8* %p	<->  call void @writeonly_attr(ptr %p) [ "deopt"(ptr %p) ]

diff  --git a/llvm/test/Analysis/BasicAA/cs-cs-arm.ll b/llvm/test/Analysis/BasicAA/cs-cs-arm.ll
index 6bf321b09201..43e7be2ee20e 100644
--- a/llvm/test/Analysis/BasicAA/cs-cs-arm.ll
+++ b/llvm/test/Analysis/BasicAA/cs-cs-arm.ll
@@ -4,33 +4,33 @@
 target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:32:64-v128:32:128-a0:0:32-n32"
 target triple = "arm-apple-ios"
 
-declare <8 x i16> @llvm.arm.neon.vld1.v8i16.p0i8(i8*, i32) nounwind readonly
-declare void @llvm.arm.neon.vst1.p0i8.v8i16(i8*, <8 x i16>, i32) nounwind
+declare <8 x i16> @llvm.arm.neon.vld1.v8i16.p0(ptr, i32) nounwind readonly
+declare void @llvm.arm.neon.vst1.p0.v8i16(ptr, <8 x i16>, i32) nounwind
 
-define <8 x i16> @test1(i8* %p, <8 x i16> %y) {
+define <8 x i16> @test1(ptr %p, <8 x i16> %y) {
 entry:
-  %q = getelementptr i8, i8* %p, i64 16
-  %a = call <8 x i16> @llvm.arm.neon.vld1.v8i16.p0i8(i8* %p, i32 16) nounwind
-  call void @llvm.arm.neon.vst1.p0i8.v8i16(i8* %q, <8 x i16> %y, i32 16)
-  %b = call <8 x i16> @llvm.arm.neon.vld1.v8i16.p0i8(i8* %p, i32 16) nounwind
+  %q = getelementptr i8, ptr %p, i64 16
+  %a = call <8 x i16> @llvm.arm.neon.vld1.v8i16.p0(ptr %p, i32 16) nounwind
+  call void @llvm.arm.neon.vst1.p0.v8i16(ptr %q, <8 x i16> %y, i32 16)
+  %b = call <8 x i16> @llvm.arm.neon.vld1.v8i16.p0(ptr %p, i32 16) nounwind
   %c = add <8 x i16> %a, %b
-  load i8, i8* %p
-  load i8, i8* %q
+  load i8, ptr %p
+  load i8, ptr %q
   ret <8 x i16> %c
 
 ; CHECK-LABEL: Function: test1:
 
 ; CHECK: NoAlias:      i8* %p, i8* %q
-; CHECK: Just Ref:  Ptr: i8* %p        <->  %a = call <8 x i16> @llvm.arm.neon.vld1.v8i16.p0i8(i8* %p, i32 16)
-; CHECK: NoModRef:  Ptr: i8* %q        <->  %a = call <8 x i16> @llvm.arm.neon.vld1.v8i16.p0i8(i8* %p, i32 16)
-; CHECK: NoModRef:  Ptr: i8* %p        <->  call void @llvm.arm.neon.vst1.p0i8.v8i16(i8* %q, <8 x i16> %y, i32 16)
-; CHECK: Both ModRef:  Ptr: i8* %q     <->  call void @llvm.arm.neon.vst1.p0i8.v8i16(i8* %q, <8 x i16> %y, i32 16)
-; CHECK: Just Ref:  Ptr: i8* %p        <->  %b = call <8 x i16> @llvm.arm.neon.vld1.v8i16.p0i8(i8* %p, i32 16)
-; CHECK: NoModRef:  Ptr: i8* %q        <->  %b = call <8 x i16> @llvm.arm.neon.vld1.v8i16.p0i8(i8* %p, i32 16)
-; CHECK: NoModRef:   %a = call <8 x i16> @llvm.arm.neon.vld1.v8i16.p0i8(i8* %p, i32 16) #{{[0-9]+}} <->   call void @llvm.arm.neon.vst1.p0i8.v8i16(i8* %q, <8 x i16> %y, i32 16)
-; CHECK: NoModRef:   %a = call <8 x i16> @llvm.arm.neon.vld1.v8i16.p0i8(i8* %p, i32 16) #{{[0-9]+}} <->   %b = call <8 x i16> @llvm.arm.neon.vld1.v8i16.p0i8(i8* %p, i32 16)
-; CHECK: NoModRef:   call void @llvm.arm.neon.vst1.p0i8.v8i16(i8* %q, <8 x i16> %y, i32 16) <->   %a = call <8 x i16> @llvm.arm.neon.vld1.v8i16.p0i8(i8* %p, i32 16)
-; CHECK: NoModRef:   call void @llvm.arm.neon.vst1.p0i8.v8i16(i8* %q, <8 x i16> %y, i32 16) <->   %b = call <8 x i16> @llvm.arm.neon.vld1.v8i16.p0i8(i8* %p, i32 16)
-; CHECK: NoModRef:   %b = call <8 x i16> @llvm.arm.neon.vld1.v8i16.p0i8(i8* %p, i32 16) #{{[0-9]+}} <->   %a = call <8 x i16> @llvm.arm.neon.vld1.v8i16.p0i8(i8* %p, i32 16)
-; CHECK: NoModRef:   %b = call <8 x i16> @llvm.arm.neon.vld1.v8i16.p0i8(i8* %p, i32 16) #{{[0-9]+}} <->   call void @llvm.arm.neon.vst1.p0i8.v8i16(i8* %q, <8 x i16> %y, i32 16)
+; CHECK: Just Ref:  Ptr: i8* %p        <->  %a = call <8 x i16> @llvm.arm.neon.vld1.v8i16.p0(ptr %p, i32 16)
+; CHECK: NoModRef:  Ptr: i8* %q        <->  %a = call <8 x i16> @llvm.arm.neon.vld1.v8i16.p0(ptr %p, i32 16)
+; CHECK: NoModRef:  Ptr: i8* %p        <->  call void @llvm.arm.neon.vst1.p0.v8i16(ptr %q, <8 x i16> %y, i32 16)
+; CHECK: Both ModRef:  Ptr: i8* %q     <->  call void @llvm.arm.neon.vst1.p0.v8i16(ptr %q, <8 x i16> %y, i32 16)
+; CHECK: Just Ref:  Ptr: i8* %p        <->  %b = call <8 x i16> @llvm.arm.neon.vld1.v8i16.p0(ptr %p, i32 16)
+; CHECK: NoModRef:  Ptr: i8* %q        <->  %b = call <8 x i16> @llvm.arm.neon.vld1.v8i16.p0(ptr %p, i32 16)
+; CHECK: NoModRef:   %a = call <8 x i16> @llvm.arm.neon.vld1.v8i16.p0(ptr %p, i32 16) #{{[0-9]+}} <->   call void @llvm.arm.neon.vst1.p0.v8i16(ptr %q, <8 x i16> %y, i32 16)
+; CHECK: NoModRef:   %a = call <8 x i16> @llvm.arm.neon.vld1.v8i16.p0(ptr %p, i32 16) #{{[0-9]+}} <->   %b = call <8 x i16> @llvm.arm.neon.vld1.v8i16.p0(ptr %p, i32 16)
+; CHECK: NoModRef:   call void @llvm.arm.neon.vst1.p0.v8i16(ptr %q, <8 x i16> %y, i32 16) <->   %a = call <8 x i16> @llvm.arm.neon.vld1.v8i16.p0(ptr %p, i32 16)
+; CHECK: NoModRef:   call void @llvm.arm.neon.vst1.p0.v8i16(ptr %q, <8 x i16> %y, i32 16) <->   %b = call <8 x i16> @llvm.arm.neon.vld1.v8i16.p0(ptr %p, i32 16)
+; CHECK: NoModRef:   %b = call <8 x i16> @llvm.arm.neon.vld1.v8i16.p0(ptr %p, i32 16) #{{[0-9]+}} <->   %a = call <8 x i16> @llvm.arm.neon.vld1.v8i16.p0(ptr %p, i32 16)
+; CHECK: NoModRef:   %b = call <8 x i16> @llvm.arm.neon.vld1.v8i16.p0(ptr %p, i32 16) #{{[0-9]+}} <->   call void @llvm.arm.neon.vst1.p0.v8i16(ptr %q, <8 x i16> %y, i32 16)
 }

diff  --git a/llvm/test/Analysis/BasicAA/cs-cs.ll b/llvm/test/Analysis/BasicAA/cs-cs.ll
index 513f305b3a19..1e983833342f 100644
--- a/llvm/test/Analysis/BasicAA/cs-cs.ll
+++ b/llvm/test/Analysis/BasicAA/cs-cs.ll
@@ -2,74 +2,74 @@
 target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:32:64-v128:32:128-a0:0:32-n32"
 target triple = "arm-apple-ios"
 
-declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1) #0
-declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture writeonly, i8* nocapture readonly, i64, i1) #0
-declare void @llvm.memcpy.element.unordered.atomic.p0i8.p0i8.i64(i8* nocapture writeonly, i8* nocapture readonly, i64, i32) #0
-
-declare void @a_readonly_func(i8*) #1
-declare void @a_writeonly_func(i8*) #2
-
-define void @test2(i8* %P, i8* %Q) #3 {
-  load i8, i8* %P
-  load i8, i8* %Q
-  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
+declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1) #0
+declare void @llvm.memcpy.p0.p0.i64(ptr nocapture writeonly, ptr nocapture readonly, i64, i1) #0
+declare void @llvm.memcpy.element.unordered.atomic.p0.p0.i64(ptr nocapture writeonly, ptr nocapture readonly, i64, i32) #0
+
+declare void @a_readonly_func(ptr) #1
+declare void @a_writeonly_func(ptr) #2
+
+define void @test2(ptr %P, ptr %Q) #3 {
+  load i8, ptr %P
+  load i8, ptr %Q
+  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
   ret void
 
 ; CHECK-LABEL: Function: test2:
 
 ; CHECK:   MayAlias:     i8* %P, i8* %Q
-; CHECK:   Both ModRef:  Ptr: i8* %P     <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-; CHECK:   Both ModRef:  Ptr: i8* %Q     <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-; CHECK:   Both ModRef:  Ptr: i8* %P     <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-; CHECK:   Both ModRef:  Ptr: i8* %Q     <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-; CHECK:   Both ModRef:   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false) <->   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-; CHECK:   Both ModRef:   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false) <->   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
+; CHECK:   Both ModRef:  Ptr: i8* %P     <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+; CHECK:   Both ModRef:  Ptr: i8* %Q     <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+; CHECK:   Both ModRef:  Ptr: i8* %P     <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+; CHECK:   Both ModRef:  Ptr: i8* %Q     <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+; CHECK:   Both ModRef:   tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false) <->   tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+; CHECK:   Both ModRef:   tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false) <->   tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
 }
 
-define void @test2_atomic(i8* %P, i8* %Q) #3 {
-  load i8, i8* %P
-  load i8, i8* %Q
-  tail call void @llvm.memcpy.element.unordered.atomic.p0i8.p0i8.i64(i8* align 1 %P, i8* align 1 %Q, i64 12, i32 1)
-  tail call void @llvm.memcpy.element.unordered.atomic.p0i8.p0i8.i64(i8* align 1 %P, i8* align 1 %Q, i64 12, i32 1)
+define void @test2_atomic(ptr %P, ptr %Q) #3 {
+  load i8, ptr %P
+  load i8, ptr %Q
+  tail call void @llvm.memcpy.element.unordered.atomic.p0.p0.i64(ptr align 1 %P, ptr align 1 %Q, i64 12, i32 1)
+  tail call void @llvm.memcpy.element.unordered.atomic.p0.p0.i64(ptr align 1 %P, ptr align 1 %Q, i64 12, i32 1)
   ret void
 
 ; CHECK-LABEL: Function: test2_atomic:
 
 ; CHECK:   MayAlias:     i8* %P, i8* %Q
-; CHECK:   Both ModRef:  Ptr: i8* %P     <->  tail call void @llvm.memcpy.element.unordered.atomic.p0i8.p0i8.i64(i8* align 1 %P, i8* align 1 %Q, i64 12, i32 1)
-; CHECK:   Both ModRef:  Ptr: i8* %Q     <->  tail call void @llvm.memcpy.element.unordered.atomic.p0i8.p0i8.i64(i8* align 1 %P, i8* align 1 %Q, i64 12, i32 1)
-; CHECK:   Both ModRef:  Ptr: i8* %P     <->  tail call void @llvm.memcpy.element.unordered.atomic.p0i8.p0i8.i64(i8* align 1 %P, i8* align 1 %Q, i64 12, i32 1)
-; CHECK:   Both ModRef:  Ptr: i8* %Q     <->  tail call void @llvm.memcpy.element.unordered.atomic.p0i8.p0i8.i64(i8* align 1 %P, i8* align 1 %Q, i64 12, i32 1)
-; CHECK:   Both ModRef:   tail call void @llvm.memcpy.element.unordered.atomic.p0i8.p0i8.i64(i8* align 1 %P, i8* align 1 %Q, i64 12, i32 1) <->   tail call void @llvm.memcpy.element.unordered.atomic.p0i8.p0i8.i64(i8* align 1 %P, i8* align 1 %Q, i64 12, i32 1)
-; CHECK:   Both ModRef:   tail call void @llvm.memcpy.element.unordered.atomic.p0i8.p0i8.i64(i8* align 1 %P, i8* align 1 %Q, i64 12, i32 1) <->   tail call void @llvm.memcpy.element.unordered.atomic.p0i8.p0i8.i64(i8* align 1 %P, i8* align 1 %Q, i64 12, i32 1)
+; CHECK:   Both ModRef:  Ptr: i8* %P     <->  tail call void @llvm.memcpy.element.unordered.atomic.p0.p0.i64(ptr align 1 %P, ptr align 1 %Q, i64 12, i32 1)
+; CHECK:   Both ModRef:  Ptr: i8* %Q     <->  tail call void @llvm.memcpy.element.unordered.atomic.p0.p0.i64(ptr align 1 %P, ptr align 1 %Q, i64 12, i32 1)
+; CHECK:   Both ModRef:  Ptr: i8* %P     <->  tail call void @llvm.memcpy.element.unordered.atomic.p0.p0.i64(ptr align 1 %P, ptr align 1 %Q, i64 12, i32 1)
+; CHECK:   Both ModRef:  Ptr: i8* %Q     <->  tail call void @llvm.memcpy.element.unordered.atomic.p0.p0.i64(ptr align 1 %P, ptr align 1 %Q, i64 12, i32 1)
+; CHECK:   Both ModRef:   tail call void @llvm.memcpy.element.unordered.atomic.p0.p0.i64(ptr align 1 %P, ptr align 1 %Q, i64 12, i32 1) <->   tail call void @llvm.memcpy.element.unordered.atomic.p0.p0.i64(ptr align 1 %P, ptr align 1 %Q, i64 12, i32 1)
+; CHECK:   Both ModRef:   tail call void @llvm.memcpy.element.unordered.atomic.p0.p0.i64(ptr align 1 %P, ptr align 1 %Q, i64 12, i32 1) <->   tail call void @llvm.memcpy.element.unordered.atomic.p0.p0.i64(ptr align 1 %P, ptr align 1 %Q, i64 12, i32 1)
 }
 
-define void @test2a(i8* noalias %P, i8* noalias %Q) #3 {
-  load i8, i8* %P
-  load i8, i8* %Q
-  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
+define void @test2a(ptr noalias %P, ptr noalias %Q) #3 {
+  load i8, ptr %P
+  load i8, ptr %Q
+  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
   ret void
 
 ; CHECK-LABEL: Function: test2a:
 
 ; CHECK: NoAlias:      i8* %P, i8* %Q
-; CHECK: Just Mod:  Ptr: i8* %P        <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-; CHECK: Just Ref:  Ptr: i8* %Q        <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-; CHECK: Just Mod:  Ptr: i8* %P        <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-; CHECK: Just Ref:  Ptr: i8* %Q        <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-; CHECK: Just Mod:   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false) <->   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-; CHECK: Just Mod:   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false) <->   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
+; CHECK: Just Mod:  Ptr: i8* %P        <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+; CHECK: Just Ref:  Ptr: i8* %Q        <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+; CHECK: Just Mod:  Ptr: i8* %P        <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+; CHECK: Just Ref:  Ptr: i8* %Q        <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+; CHECK: Just Mod:   tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false) <->   tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+; CHECK: Just Mod:   tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false) <->   tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
 }
 
-define void @test2b(i8* noalias %P, i8* noalias %Q) #3 {
-  load i8, i8* %P
-  load i8, i8* %Q
-  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-  %R = getelementptr i8, i8* %P, i64 12
-  load i8, i8* %R
-  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %R, i8* %Q, i64 12, i1 false)
+define void @test2b(ptr noalias %P, ptr noalias %Q) #3 {
+  load i8, ptr %P
+  load i8, ptr %Q
+  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+  %R = getelementptr i8, ptr %P, i64 12
+  load i8, ptr %R
+  tail call void @llvm.memcpy.p0.p0.i64(ptr %R, ptr %Q, i64 12, i1 false)
   ret void
 
 ; CHECK-LABEL: Function: test2b:
@@ -77,23 +77,23 @@ define void @test2b(i8* noalias %P, i8* noalias %Q) #3 {
 ; CHECK: NoAlias:      i8* %P, i8* %Q
 ; CHECK: NoAlias:      i8* %P, i8* %R
 ; CHECK: NoAlias:      i8* %Q, i8* %R
-; CHECK: Just Mod:  Ptr: i8* %P        <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-; CHECK: Just Ref:  Ptr: i8* %Q        <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-; CHECK: NoModRef:  Ptr: i8* %R        <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-; CHECK: NoModRef:  Ptr: i8* %P        <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %R, i8* %Q, i64 12, i1 false)
-; CHECK: Just Ref:  Ptr: i8* %Q        <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %R, i8* %Q, i64 12, i1 false)
-; CHECK: Just Mod:  Ptr: i8* %R        <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %R, i8* %Q, i64 12, i1 false)
-; CHECK: NoModRef:   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false) <->   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %R, i8* %Q, i64 12, i1 false)
-; CHECK: NoModRef:   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %R, i8* %Q, i64 12, i1 false) <->   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
+; CHECK: Just Mod:  Ptr: i8* %P        <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+; CHECK: Just Ref:  Ptr: i8* %Q        <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+; CHECK: NoModRef:  Ptr: i8* %R        <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+; CHECK: NoModRef:  Ptr: i8* %P        <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %R, ptr %Q, i64 12, i1 false)
+; CHECK: Just Ref:  Ptr: i8* %Q        <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %R, ptr %Q, i64 12, i1 false)
+; CHECK: Just Mod:  Ptr: i8* %R        <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %R, ptr %Q, i64 12, i1 false)
+; CHECK: NoModRef:   tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false) <->   tail call void @llvm.memcpy.p0.p0.i64(ptr %R, ptr %Q, i64 12, i1 false)
+; CHECK: NoModRef:   tail call void @llvm.memcpy.p0.p0.i64(ptr %R, ptr %Q, i64 12, i1 false) <->   tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
 }
 
-define void @test2c(i8* noalias %P, i8* noalias %Q) #3 {
-  load i8, i8* %P
-  load i8, i8* %Q
-  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-  %R = getelementptr i8, i8* %P, i64 11
-  load i8, i8* %R
-  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %R, i8* %Q, i64 12, i1 false)
+define void @test2c(ptr noalias %P, ptr noalias %Q) #3 {
+  load i8, ptr %P
+  load i8, ptr %Q
+  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+  %R = getelementptr i8, ptr %P, i64 11
+  load i8, ptr %R
+  tail call void @llvm.memcpy.p0.p0.i64(ptr %R, ptr %Q, i64 12, i1 false)
   ret void
 
 ; CHECK-LABEL: Function: test2c:
@@ -101,23 +101,23 @@ define void @test2c(i8* noalias %P, i8* noalias %Q) #3 {
 ; CHECK: NoAlias:      i8* %P, i8* %Q
 ; CHECK: NoAlias:      i8* %P, i8* %R
 ; CHECK: NoAlias:      i8* %Q, i8* %R
-; CHECK: Just Mod:  Ptr: i8* %P        <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-; CHECK: Just Ref:  Ptr: i8* %Q        <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-; CHECK: Just Mod:  Ptr: i8* %R        <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-; CHECK: NoModRef:  Ptr: i8* %P        <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %R, i8* %Q, i64 12, i1 false)
-; CHECK: Just Ref:  Ptr: i8* %Q        <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %R, i8* %Q, i64 12, i1 false)
-; CHECK: Just Mod:  Ptr: i8* %R        <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %R, i8* %Q, i64 12, i1 false)
-; CHECK: Just Mod:   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false) <->   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %R, i8* %Q, i64 12, i1 false)
-; CHECK: Just Mod:   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %R, i8* %Q, i64 12, i1 false) <->   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
+; CHECK: Just Mod:  Ptr: i8* %P        <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+; CHECK: Just Ref:  Ptr: i8* %Q        <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+; CHECK: Just Mod:  Ptr: i8* %R        <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+; CHECK: NoModRef:  Ptr: i8* %P        <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %R, ptr %Q, i64 12, i1 false)
+; CHECK: Just Ref:  Ptr: i8* %Q        <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %R, ptr %Q, i64 12, i1 false)
+; CHECK: Just Mod:  Ptr: i8* %R        <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %R, ptr %Q, i64 12, i1 false)
+; CHECK: Just Mod:   tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false) <->   tail call void @llvm.memcpy.p0.p0.i64(ptr %R, ptr %Q, i64 12, i1 false)
+; CHECK: Just Mod:   tail call void @llvm.memcpy.p0.p0.i64(ptr %R, ptr %Q, i64 12, i1 false) <->   tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
 }
 
-define void @test2d(i8* noalias %P, i8* noalias %Q) #3 {
-  load i8, i8* %P
-  load i8, i8* %Q
-  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-  %R = getelementptr i8, i8* %P, i64 -12
-  load i8, i8* %R
-  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %R, i8* %Q, i64 12, i1 false)
+define void @test2d(ptr noalias %P, ptr noalias %Q) #3 {
+  load i8, ptr %P
+  load i8, ptr %Q
+  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+  %R = getelementptr i8, ptr %P, i64 -12
+  load i8, ptr %R
+  tail call void @llvm.memcpy.p0.p0.i64(ptr %R, ptr %Q, i64 12, i1 false)
   ret void
 
 ; CHECK-LABEL: Function: test2d:
@@ -125,23 +125,23 @@ define void @test2d(i8* noalias %P, i8* noalias %Q) #3 {
 ; CHECK: NoAlias:      i8* %P, i8* %Q
 ; CHECK: NoAlias:      i8* %P, i8* %R
 ; CHECK: NoAlias:      i8* %Q, i8* %R
-; CHECK: Just Mod:  Ptr: i8* %P        <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-; CHECK: Just Ref:  Ptr: i8* %Q        <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-; CHECK: NoModRef:  Ptr: i8* %R        <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-; CHECK: NoModRef:  Ptr: i8* %P        <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %R, i8* %Q, i64 12, i1 false)
-; CHECK: Just Ref:  Ptr: i8* %Q        <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %R, i8* %Q, i64 12, i1 false)
-; CHECK: Just Mod:  Ptr: i8* %R        <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %R, i8* %Q, i64 12, i1 false)
-; CHECK: NoModRef:   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false) <->   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %R, i8* %Q, i64 12, i1 false)
-; CHECK: NoModRef:   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %R, i8* %Q, i64 12, i1 false) <->   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
+; CHECK: Just Mod:  Ptr: i8* %P        <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+; CHECK: Just Ref:  Ptr: i8* %Q        <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+; CHECK: NoModRef:  Ptr: i8* %R        <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+; CHECK: NoModRef:  Ptr: i8* %P        <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %R, ptr %Q, i64 12, i1 false)
+; CHECK: Just Ref:  Ptr: i8* %Q        <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %R, ptr %Q, i64 12, i1 false)
+; CHECK: Just Mod:  Ptr: i8* %R        <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %R, ptr %Q, i64 12, i1 false)
+; CHECK: NoModRef:   tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false) <->   tail call void @llvm.memcpy.p0.p0.i64(ptr %R, ptr %Q, i64 12, i1 false)
+; CHECK: NoModRef:   tail call void @llvm.memcpy.p0.p0.i64(ptr %R, ptr %Q, i64 12, i1 false) <->   tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
 }
 
-define void @test2e(i8* noalias %P, i8* noalias %Q) #3 {
-  load i8, i8* %P
-  load i8, i8* %Q
-  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-  %R = getelementptr i8, i8* %P, i64 -11
-  load i8, i8* %R
-  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %R, i8* %Q, i64 12, i1 false)
+define void @test2e(ptr noalias %P, ptr noalias %Q) #3 {
+  load i8, ptr %P
+  load i8, ptr %Q
+  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+  %R = getelementptr i8, ptr %P, i64 -11
+  load i8, ptr %R
+  tail call void @llvm.memcpy.p0.p0.i64(ptr %R, ptr %Q, i64 12, i1 false)
   ret void
 
 ; CHECK-LABEL: Function: test2e:
@@ -149,76 +149,76 @@ define void @test2e(i8* noalias %P, i8* noalias %Q) #3 {
 ; CHECK: NoAlias:      i8* %P, i8* %Q
 ; CHECK: NoAlias:      i8* %P, i8* %R
 ; CHECK: NoAlias:      i8* %Q, i8* %R
-; CHECK: Just Mod:  Ptr: i8* %P        <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-; CHECK: Just Ref:  Ptr: i8* %Q        <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-; CHECK: NoModRef:  Ptr: i8* %R        <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-; CHECK: Just Mod:  Ptr: i8* %P        <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %R, i8* %Q, i64 12, i1 false)
-; CHECK: Just Ref:  Ptr: i8* %Q        <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %R, i8* %Q, i64 12, i1 false)
-; CHECK: Just Mod:  Ptr: i8* %R        <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %R, i8* %Q, i64 12, i1 false)
-; CHECK: Just Mod:   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false) <->   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %R, i8* %Q, i64 12, i1 false)
-; CHECK: Just Mod:   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %R, i8* %Q, i64 12, i1 false) <->   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
+; CHECK: Just Mod:  Ptr: i8* %P        <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+; CHECK: Just Ref:  Ptr: i8* %Q        <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+; CHECK: NoModRef:  Ptr: i8* %R        <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+; CHECK: Just Mod:  Ptr: i8* %P        <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %R, ptr %Q, i64 12, i1 false)
+; CHECK: Just Ref:  Ptr: i8* %Q        <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %R, ptr %Q, i64 12, i1 false)
+; CHECK: Just Mod:  Ptr: i8* %R        <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %R, ptr %Q, i64 12, i1 false)
+; CHECK: Just Mod:   tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false) <->   tail call void @llvm.memcpy.p0.p0.i64(ptr %R, ptr %Q, i64 12, i1 false)
+; CHECK: Just Mod:   tail call void @llvm.memcpy.p0.p0.i64(ptr %R, ptr %Q, i64 12, i1 false) <->   tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
 }
 
-define void @test3(i8* %P, i8* %Q) #3 {
-  load i8, i8* %P
-  load i8, i8* %Q
-  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 8, i1 false)
-  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
+define void @test3(ptr %P, ptr %Q) #3 {
+  load i8, ptr %P
+  load i8, ptr %Q
+  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 8, i1 false)
+  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
   ret void
 
 ; CHECK-LABEL: Function: test3:
 
 ; CHECK: MayAlias:     i8* %P, i8* %Q
-; CHECK: Both ModRef:  Ptr: i8* %P     <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 8, i1 false)
-; CHECK: Both ModRef:  Ptr: i8* %Q     <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 8, i1 false)
-; CHECK: Both ModRef:  Ptr: i8* %P     <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-; CHECK: Both ModRef:  Ptr: i8* %Q     <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-; CHECK: Both ModRef:   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 8, i1 false) <->   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-; CHECK: Both ModRef:   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false) <->   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 8, i1 false)
+; CHECK: Both ModRef:  Ptr: i8* %P     <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 8, i1 false)
+; CHECK: Both ModRef:  Ptr: i8* %Q     <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 8, i1 false)
+; CHECK: Both ModRef:  Ptr: i8* %P     <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+; CHECK: Both ModRef:  Ptr: i8* %Q     <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+; CHECK: Both ModRef:   tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 8, i1 false) <->   tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+; CHECK: Both ModRef:   tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false) <->   tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 8, i1 false)
 }
 
-define void @test3a(i8* noalias %P, i8* noalias %Q) #3 {
-  load i8, i8* %P
-  load i8, i8* %Q
-  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 8, i1 false)
-  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
+define void @test3a(ptr noalias %P, ptr noalias %Q) #3 {
+  load i8, ptr %P
+  load i8, ptr %Q
+  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 8, i1 false)
+  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
   ret void
 
 ; CHECK-LABEL: Function: test3a:
 
 ; CHECK: NoAlias:      i8* %P, i8* %Q
-; CHECK: Just Mod:  Ptr: i8* %P        <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 8, i1 false)
-; CHECK: Just Ref:  Ptr: i8* %Q        <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 8, i1 false)
-; CHECK: Just Mod:  Ptr: i8* %P        <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-; CHECK: Just Ref:  Ptr: i8* %Q        <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-; CHECK: Just Mod:   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 8, i1 false) <->   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-; CHECK: Just Mod:   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false) <->   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 8, i1 false)
+; CHECK: Just Mod:  Ptr: i8* %P        <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 8, i1 false)
+; CHECK: Just Ref:  Ptr: i8* %Q        <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 8, i1 false)
+; CHECK: Just Mod:  Ptr: i8* %P        <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+; CHECK: Just Ref:  Ptr: i8* %Q        <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+; CHECK: Just Mod:   tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 8, i1 false) <->   tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+; CHECK: Just Mod:   tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false) <->   tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 8, i1 false)
 }
 
-define void @test4(i8* %P, i8* noalias %Q) #3 {
-  load i8, i8* %P
-  load i8, i8* %Q
-  tail call void @llvm.memset.p0i8.i64(i8* %P, i8 42, i64 8, i1 false)
-  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
+define void @test4(ptr %P, ptr noalias %Q) #3 {
+  load i8, ptr %P
+  load i8, ptr %Q
+  tail call void @llvm.memset.p0.i64(ptr %P, i8 42, i64 8, i1 false)
+  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
   ret void
 
 ; CHECK-LABEL: Function: test4:
 
 ; CHECK: NoAlias:      i8* %P, i8* %Q
-; CHECK: Just Mod:  Ptr: i8* %P        <->  tail call void @llvm.memset.p0i8.i64(i8* %P, i8 42, i64 8, i1 false)
-; CHECK: NoModRef:  Ptr: i8* %Q        <->  tail call void @llvm.memset.p0i8.i64(i8* %P, i8 42, i64 8, i1 false)
-; CHECK: Just Mod:  Ptr: i8* %P        <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-; CHECK: Just Ref:  Ptr: i8* %Q        <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-; CHECK: Just Mod:   tail call void @llvm.memset.p0i8.i64(i8* %P, i8 42, i64 8, i1 false) <->   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-; CHECK: Just Mod:   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false) <->   tail call void @llvm.memset.p0i8.i64(i8* %P, i8 42, i64 8, i1 false)
+; CHECK: Just Mod:  Ptr: i8* %P        <->  tail call void @llvm.memset.p0.i64(ptr %P, i8 42, i64 8, i1 false)
+; CHECK: NoModRef:  Ptr: i8* %Q        <->  tail call void @llvm.memset.p0.i64(ptr %P, i8 42, i64 8, i1 false)
+; CHECK: Just Mod:  Ptr: i8* %P        <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+; CHECK: Just Ref:  Ptr: i8* %Q        <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+; CHECK: Just Mod:   tail call void @llvm.memset.p0.i64(ptr %P, i8 42, i64 8, i1 false) <->   tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+; CHECK: Just Mod:   tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false) <->   tail call void @llvm.memset.p0.i64(ptr %P, i8 42, i64 8, i1 false)
 }
 
-define void @test5(i8* %P, i8* %Q, i8* %R) #3 {
-  load i8, i8* %P
-  load i8, i8* %Q
-  load i8, i8* %R
-  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %R, i64 12, i1 false)
+define void @test5(ptr %P, ptr %Q, ptr %R) #3 {
+  load i8, ptr %P
+  load i8, ptr %Q
+  load i8, ptr %R
+  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %R, i64 12, i1 false)
   ret void
 
 ; CHECK-LABEL: Function: test5:
@@ -226,22 +226,22 @@ define void @test5(i8* %P, i8* %Q, i8* %R) #3 {
 ; CHECK: MayAlias:     i8* %P, i8* %Q
 ; CHECK: MayAlias:     i8* %P, i8* %R
 ; CHECK: MayAlias:     i8* %Q, i8* %R
-; CHECK: Both ModRef:  Ptr: i8* %P     <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-; CHECK: Both ModRef:  Ptr: i8* %Q     <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-; CHECK: Both ModRef:  Ptr: i8* %R     <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-; CHECK: Both ModRef:  Ptr: i8* %P     <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %R, i64 12, i1 false)
-; CHECK: Both ModRef:  Ptr: i8* %Q     <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %R, i64 12, i1 false)
-; CHECK: Both ModRef:  Ptr: i8* %R     <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %R, i64 12, i1 false)
-; CHECK: Both ModRef:   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false) <->   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %R, i64 12, i1 false)
-; CHECK: Both ModRef:   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %R, i64 12, i1 false) <->   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
+; CHECK: Both ModRef:  Ptr: i8* %P     <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+; CHECK: Both ModRef:  Ptr: i8* %Q     <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+; CHECK: Both ModRef:  Ptr: i8* %R     <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+; CHECK: Both ModRef:  Ptr: i8* %P     <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %R, i64 12, i1 false)
+; CHECK: Both ModRef:  Ptr: i8* %Q     <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %R, i64 12, i1 false)
+; CHECK: Both ModRef:  Ptr: i8* %R     <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %R, i64 12, i1 false)
+; CHECK: Both ModRef:   tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false) <->   tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %R, i64 12, i1 false)
+; CHECK: Both ModRef:   tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %R, i64 12, i1 false) <->   tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
 }
 
-define void @test5a(i8* noalias %P, i8* noalias %Q, i8* noalias %R) nounwind ssp {
-  load i8, i8* %P
-  load i8, i8* %Q
-  load i8, i8* %R
-  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %R, i64 12, i1 false)
+define void @test5a(ptr noalias %P, ptr noalias %Q, ptr noalias %R) nounwind ssp {
+  load i8, ptr %P
+  load i8, ptr %Q
+  load i8, ptr %R
+  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %R, i64 12, i1 false)
   ret void
 
 ; CHECK-LABEL: Function: test5a:
@@ -249,183 +249,183 @@ define void @test5a(i8* noalias %P, i8* noalias %Q, i8* noalias %R) nounwind ssp
 ; CHECK: NoAlias:     i8* %P, i8* %Q
 ; CHECK: NoAlias:     i8* %P, i8* %R
 ; CHECK: NoAlias:     i8* %Q, i8* %R
-; CHECK: Just Mod:  Ptr: i8* %P     <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-; CHECK: Just Ref:  Ptr: i8* %Q     <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-; CHECK: NoModRef:  Ptr: i8* %R     <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-; CHECK: Just Mod:  Ptr: i8* %P     <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %R, i64 12, i1 false)
-; CHECK: NoModRef:  Ptr: i8* %Q     <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %R, i64 12, i1 false)
-; CHECK: Just Ref:  Ptr: i8* %R     <->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %R, i64 12, i1 false)
-; CHECK: Just Mod:   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false) <->   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %R, i64 12, i1 false)
-; CHECK: Just Mod:   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %R, i64 12, i1 false) <->   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
+; CHECK: Just Mod:  Ptr: i8* %P     <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+; CHECK: Just Ref:  Ptr: i8* %Q     <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+; CHECK: NoModRef:  Ptr: i8* %R     <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+; CHECK: Just Mod:  Ptr: i8* %P     <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %R, i64 12, i1 false)
+; CHECK: NoModRef:  Ptr: i8* %Q     <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %R, i64 12, i1 false)
+; CHECK: Just Ref:  Ptr: i8* %R     <->  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %R, i64 12, i1 false)
+; CHECK: Just Mod:   tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false) <->   tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %R, i64 12, i1 false)
+; CHECK: Just Mod:   tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %R, i64 12, i1 false) <->   tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
 }
 
-define void @test6(i8* %P) #3 {
-  load i8, i8* %P
-  call void @llvm.memset.p0i8.i64(i8* align 8 %P, i8 -51, i64 32, i1 false)
-  call void @a_readonly_func(i8* %P)
+define void @test6(ptr %P) #3 {
+  load i8, ptr %P
+  call void @llvm.memset.p0.i64(ptr align 8 %P, i8 -51, i64 32, i1 false)
+  call void @a_readonly_func(ptr %P)
   ret void
 
 ; CHECK-LABEL: Function: test6:
 
-; CHECK: Just Mod:  Ptr: i8* %P        <->  call void @llvm.memset.p0i8.i64(i8* align 8 %P, i8 -51, i64 32, i1 false)
-; CHECK: Just Ref:  Ptr: i8* %P        <->  call void @a_readonly_func(i8* %P)
-; CHECK: Just Mod:   call void @llvm.memset.p0i8.i64(i8* align 8 %P, i8 -51, i64 32, i1 false) <->   call void @a_readonly_func(i8* %P)
-; CHECK: Just Ref:   call void @a_readonly_func(i8* %P) <->   call void @llvm.memset.p0i8.i64(i8* align 8 %P, i8 -51, i64 32, i1 false)
+; CHECK: Just Mod:  Ptr: i8* %P        <->  call void @llvm.memset.p0.i64(ptr align 8 %P, i8 -51, i64 32, i1 false)
+; CHECK: Just Ref:  Ptr: i8* %P        <->  call void @a_readonly_func(ptr %P)
+; CHECK: Just Mod:   call void @llvm.memset.p0.i64(ptr align 8 %P, i8 -51, i64 32, i1 false) <->   call void @a_readonly_func(ptr %P)
+; CHECK: Just Ref:   call void @a_readonly_func(ptr %P) <->   call void @llvm.memset.p0.i64(ptr align 8 %P, i8 -51, i64 32, i1 false)
 }
 
-define void @test7(i8* %P) #3 {
-  load i8, i8* %P
-  call void @a_writeonly_func(i8* %P)
-  call void @a_readonly_func(i8* %P)
+define void @test7(ptr %P) #3 {
+  load i8, ptr %P
+  call void @a_writeonly_func(ptr %P)
+  call void @a_readonly_func(ptr %P)
   ret void
 
 ; CHECK-LABEL: Function: test7:
 
-; CHECK: Just Mod:  Ptr: i8* %P        <->  call void @a_writeonly_func(i8* %P)
-; CHECK: Just Ref:  Ptr: i8* %P        <->  call void @a_readonly_func(i8* %P)
-; CHECK: Just Mod:   call void @a_writeonly_func(i8* %P) <->   call void @a_readonly_func(i8* %P)
-; CHECK: Just Ref:   call void @a_readonly_func(i8* %P) <->   call void @a_writeonly_func(i8* %P)
+; CHECK: Just Mod:  Ptr: i8* %P        <->  call void @a_writeonly_func(ptr %P)
+; CHECK: Just Ref:  Ptr: i8* %P        <->  call void @a_readonly_func(ptr %P)
+; CHECK: Just Mod:   call void @a_writeonly_func(ptr %P) <->   call void @a_readonly_func(ptr %P)
+; CHECK: Just Ref:   call void @a_readonly_func(ptr %P) <->   call void @a_writeonly_func(ptr %P)
 }
 
 declare void @an_inaccessiblememonly_func() #4
-declare void @an_inaccessibleorargmemonly_func(i8*) #5
-declare void @an_argmemonly_func(i8*) #0
+declare void @an_inaccessibleorargmemonly_func(ptr) #5
+declare void @an_argmemonly_func(ptr) #0
 
-define void @test8(i8* %p) {
+define void @test8(ptr %p) {
 entry:
-  %q = getelementptr i8, i8* %p, i64 16
-  load i8, i8* %p
-  load i8, i8* %q
-  call void @a_readonly_func(i8* %p)
+  %q = getelementptr i8, ptr %p, i64 16
+  load i8, ptr %p
+  load i8, ptr %q
+  call void @a_readonly_func(ptr %p)
   call void @an_inaccessiblememonly_func()
-  call void @a_writeonly_func(i8* %q)
+  call void @a_writeonly_func(ptr %q)
   call void @an_inaccessiblememonly_func()
-  call void @an_inaccessibleorargmemonly_func(i8* %q)
-  call void @an_argmemonly_func(i8* %q)
+  call void @an_inaccessibleorargmemonly_func(ptr %q)
+  call void @an_argmemonly_func(ptr %q)
   ret void
 
 ; CHECK-LABEL: Function: test8
 ; CHECK: NoModRef:  Ptr: i8* %p <->  call void @an_inaccessiblememonly_func()
 ; CHECK: NoModRef:  Ptr: i8* %q <->  call void @an_inaccessiblememonly_func()
-; CHECK: Both ModRef:  Ptr: i8* %p <->  call void @an_inaccessibleorargmemonly_func(i8* %q)
-; CHECK: Both ModRef:  Ptr: i8* %q <->  call void @an_inaccessibleorargmemonly_func(i8* %q)
-; CHECK: Both ModRef:  Ptr: i8* %p <->  call void @an_argmemonly_func(i8* %q)
-; CHECK: Both ModRef:  Ptr: i8* %q <->  call void @an_argmemonly_func(i8* %q)
-; CHECK: Just Ref: call void @a_readonly_func(i8* %p) <-> call void @an_inaccessiblememonly_func()
-; CHECK: Just Ref: call void @a_readonly_func(i8* %p) <-> call void @an_inaccessibleorargmemonly_func(i8* %q)
-; CHECK: Just Ref: call void @a_readonly_func(i8* %p) <-> call void @an_argmemonly_func(i8* %q)
-; CHECK: Both ModRef: call void @an_inaccessiblememonly_func() <-> call void @a_readonly_func(i8* %p)
-; CHECK: Both ModRef: call void @an_inaccessiblememonly_func() <-> call void @a_writeonly_func(i8* %q)
+; CHECK: Both ModRef:  Ptr: i8* %p <->  call void @an_inaccessibleorargmemonly_func(ptr %q)
+; CHECK: Both ModRef:  Ptr: i8* %q <->  call void @an_inaccessibleorargmemonly_func(ptr %q)
+; CHECK: Both ModRef:  Ptr: i8* %p <->  call void @an_argmemonly_func(ptr %q)
+; CHECK: Both ModRef:  Ptr: i8* %q <->  call void @an_argmemonly_func(ptr %q)
+; CHECK: Just Ref: call void @a_readonly_func(ptr %p) <-> call void @an_inaccessiblememonly_func()
+; CHECK: Just Ref: call void @a_readonly_func(ptr %p) <-> call void @an_inaccessibleorargmemonly_func(ptr %q)
+; CHECK: Just Ref: call void @a_readonly_func(ptr %p) <-> call void @an_argmemonly_func(ptr %q)
+; CHECK: Both ModRef: call void @an_inaccessiblememonly_func() <-> call void @a_readonly_func(ptr %p)
+; CHECK: Both ModRef: call void @an_inaccessiblememonly_func() <-> call void @a_writeonly_func(ptr %q)
 ; CHECK: Both ModRef: call void @an_inaccessiblememonly_func() <-> call void @an_inaccessiblememonly_func()
-; CHECK: Both ModRef: call void @an_inaccessiblememonly_func() <-> call void @an_inaccessibleorargmemonly_func(i8* %q)
-; CHECK: NoModRef: call void @an_inaccessiblememonly_func() <-> call void @an_argmemonly_func(i8* %q)
-; CHECK: Just Mod: call void @a_writeonly_func(i8* %q) <-> call void @an_inaccessiblememonly_func()
-; CHECK: Just Mod: call void @a_writeonly_func(i8* %q) <-> call void @an_inaccessibleorargmemonly_func(i8* %q)
-; CHECK: Just Mod: call void @a_writeonly_func(i8* %q) <-> call void @an_argmemonly_func(i8* %q)
-; CHECK: Both ModRef: call void @an_inaccessibleorargmemonly_func(i8* %q) <-> call void @a_readonly_func(i8* %p)
-; CHECK: Both ModRef: call void @an_inaccessibleorargmemonly_func(i8* %q) <-> call void @a_writeonly_func(i8* %q)
-; CHECK: Both ModRef: call void @an_inaccessibleorargmemonly_func(i8* %q) <-> call void @an_inaccessiblememonly_func()
-; CHECK: Both ModRef: call void @an_inaccessibleorargmemonly_func(i8* %q) <-> call void @an_argmemonly_func(i8* %q)
-; CHECK: Both ModRef: call void @an_argmemonly_func(i8* %q) <-> call void @a_readonly_func(i8* %p)
-; CHECK: Both ModRef: call void @an_argmemonly_func(i8* %q) <-> call void @a_writeonly_func(i8* %q)
-; CHECK: NoModRef: call void @an_argmemonly_func(i8* %q) <-> call void @an_inaccessiblememonly_func()
-; CHECK: Both ModRef: call void @an_argmemonly_func(i8* %q) <-> call void @an_inaccessibleorargmemonly_func(i8* %q)
+; CHECK: Both ModRef: call void @an_inaccessiblememonly_func() <-> call void @an_inaccessibleorargmemonly_func(ptr %q)
+; CHECK: NoModRef: call void @an_inaccessiblememonly_func() <-> call void @an_argmemonly_func(ptr %q)
+; CHECK: Just Mod: call void @a_writeonly_func(ptr %q) <-> call void @an_inaccessiblememonly_func()
+; CHECK: Just Mod: call void @a_writeonly_func(ptr %q) <-> call void @an_inaccessibleorargmemonly_func(ptr %q)
+; CHECK: Just Mod: call void @a_writeonly_func(ptr %q) <-> call void @an_argmemonly_func(ptr %q)
+; CHECK: Both ModRef: call void @an_inaccessibleorargmemonly_func(ptr %q) <-> call void @a_readonly_func(ptr %p)
+; CHECK: Both ModRef: call void @an_inaccessibleorargmemonly_func(ptr %q) <-> call void @a_writeonly_func(ptr %q)
+; CHECK: Both ModRef: call void @an_inaccessibleorargmemonly_func(ptr %q) <-> call void @an_inaccessiblememonly_func()
+; CHECK: Both ModRef: call void @an_inaccessibleorargmemonly_func(ptr %q) <-> call void @an_argmemonly_func(ptr %q)
+; CHECK: Both ModRef: call void @an_argmemonly_func(ptr %q) <-> call void @a_readonly_func(ptr %p)
+; CHECK: Both ModRef: call void @an_argmemonly_func(ptr %q) <-> call void @a_writeonly_func(ptr %q)
+; CHECK: NoModRef: call void @an_argmemonly_func(ptr %q) <-> call void @an_inaccessiblememonly_func()
+; CHECK: Both ModRef: call void @an_argmemonly_func(ptr %q) <-> call void @an_inaccessibleorargmemonly_func(ptr %q)
 }
 
 ;; test that MustAlias is set for calls when no MayAlias is found.
-declare void @another_argmemonly_func(i8*, i8*) #0
-define void @test8a(i8* noalias %p, i8* noalias %q) {
+declare void @another_argmemonly_func(ptr, ptr) #0
+define void @test8a(ptr noalias %p, ptr noalias %q) {
 entry:
-  load i8, i8* %p
-  load i8, i8* %q
-  call void @another_argmemonly_func(i8* %p, i8* %q)
+  load i8, ptr %p
+  load i8, ptr %q
+  call void @another_argmemonly_func(ptr %p, ptr %q)
   ret void
 
 ; CHECK-LABEL: Function: test8a
-; CHECK: Both ModRef:  Ptr: i8* %p <->  call void @another_argmemonly_func(i8* %p, i8* %q)
-; CHECK: Both ModRef:  Ptr: i8* %q <->  call void @another_argmemonly_func(i8* %p, i8* %q)
+; CHECK: Both ModRef:  Ptr: i8* %p <->  call void @another_argmemonly_func(ptr %p, ptr %q)
+; CHECK: Both ModRef:  Ptr: i8* %q <->  call void @another_argmemonly_func(ptr %p, ptr %q)
 }
-define void @test8b(i8* %p, i8* %q) {
+define void @test8b(ptr %p, ptr %q) {
 entry:
-  load i8, i8* %p
-  load i8, i8* %q
-  call void @another_argmemonly_func(i8* %p, i8* %q)
+  load i8, ptr %p
+  load i8, ptr %q
+  call void @another_argmemonly_func(ptr %p, ptr %q)
   ret void
 
 ; CHECK-LABEL: Function: test8b
-; CHECK: Both ModRef:  Ptr: i8* %p <->  call void @another_argmemonly_func(i8* %p, i8* %q)
-; CHECK: Both ModRef:  Ptr: i8* %q <->  call void @another_argmemonly_func(i8* %p, i8* %q)
+; CHECK: Both ModRef:  Ptr: i8* %p <->  call void @another_argmemonly_func(ptr %p, ptr %q)
+; CHECK: Both ModRef:  Ptr: i8* %q <->  call void @another_argmemonly_func(ptr %p, ptr %q)
 }
 
 
 ;; test that unknown operand bundle has unknown effect to the heap
-define void @test9(i8* %p) {
+define void @test9(ptr %p) {
 ; CHECK-LABEL: Function: test9
 entry:
-  %q = getelementptr i8, i8* %p, i64 16
-  load i8, i8* %p
-  load i8, i8* %q
-  call void @a_readonly_func(i8* %p) [ "unknown"() ]
+  %q = getelementptr i8, ptr %p, i64 16
+  load i8, ptr %p
+  load i8, ptr %q
+  call void @a_readonly_func(ptr %p) [ "unknown"() ]
   call void @an_inaccessiblememonly_func() [ "unknown"() ]
-  call void @an_inaccessibleorargmemonly_func(i8* %q) [ "unknown"() ]
-  call void @an_argmemonly_func(i8* %q) [ "unknown"() ]
+  call void @an_inaccessibleorargmemonly_func(ptr %q) [ "unknown"() ]
+  call void @an_argmemonly_func(ptr %q) [ "unknown"() ]
   ret void
 
-; CHECK: Both ModRef:  Ptr: i8* %p     <->  call void @a_readonly_func(i8* %p) [ "unknown"() ]
-; CHECK: Both ModRef:  Ptr: i8* %q     <->  call void @a_readonly_func(i8* %p) [ "unknown"() ]
+; CHECK: Both ModRef:  Ptr: i8* %p     <->  call void @a_readonly_func(ptr %p) [ "unknown"() ]
+; CHECK: Both ModRef:  Ptr: i8* %q     <->  call void @a_readonly_func(ptr %p) [ "unknown"() ]
 ; CHECK: Both ModRef:  Ptr: i8* %p     <->  call void @an_inaccessiblememonly_func() [ "unknown"() ]
 ; CHECK: Both ModRef:  Ptr: i8* %q     <->  call void @an_inaccessiblememonly_func() [ "unknown"() ]
-; CHECK: Both ModRef:  Ptr: i8* %p     <->  call void @an_inaccessibleorargmemonly_func(i8* %q) [ "unknown"() ]
-; CHECK: Both ModRef:  Ptr: i8* %q     <->  call void @an_inaccessibleorargmemonly_func(i8* %q) [ "unknown"() ]
-; CHECK: Both ModRef:  Ptr: i8* %p     <->  call void @an_argmemonly_func(i8* %q) [ "unknown"() ]
-; CHECK: Both ModRef:  Ptr: i8* %q     <->  call void @an_argmemonly_func(i8* %q) [ "unknown"() ]
-; CHECK: Both ModRef:   call void @a_readonly_func(i8* %p) [ "unknown"() ] <->   call void @an_inaccessiblememonly_func() [ "unknown"() ]
-; CHECK: Both ModRef:   call void @a_readonly_func(i8* %p) [ "unknown"() ] <->   call void @an_inaccessibleorargmemonly_func(i8* %q) [ "unknown"() ]
-; CHECK: Both ModRef:   call void @a_readonly_func(i8* %p) [ "unknown"() ] <->   call void @an_argmemonly_func(i8* %q) [ "unknown"() ]
-; CHECK: Both ModRef:   call void @an_inaccessiblememonly_func() [ "unknown"() ] <->   call void @a_readonly_func(i8* %p) [ "unknown"() ]
-; CHECK: Both ModRef:   call void @an_inaccessiblememonly_func() [ "unknown"() ] <->   call void @an_inaccessibleorargmemonly_func(i8* %q) [ "unknown"() ]
-; CHECK: Both ModRef:   call void @an_inaccessiblememonly_func() [ "unknown"() ] <->   call void @an_argmemonly_func(i8* %q) [ "unknown"() ]
-; CHECK: Both ModRef:   call void @an_inaccessibleorargmemonly_func(i8* %q) [ "unknown"() ] <->   call void @a_readonly_func(i8* %p) [ "unknown"() ]
-; CHECK: Both ModRef:   call void @an_inaccessibleorargmemonly_func(i8* %q) [ "unknown"() ] <->   call void @an_inaccessiblememonly_func() [ "unknown"() ]
-; CHECK: Both ModRef:   call void @an_inaccessibleorargmemonly_func(i8* %q) [ "unknown"() ] <->   call void @an_argmemonly_func(i8* %q) [ "unknown"() ]
-; CHECK: Both ModRef:   call void @an_argmemonly_func(i8* %q) [ "unknown"() ] <->   call void @a_readonly_func(i8* %p) [ "unknown"() ]
-; CHECK: Both ModRef:   call void @an_argmemonly_func(i8* %q) [ "unknown"() ] <->   call void @an_inaccessiblememonly_func() [ "unknown"() ]
-; CHECK: Both ModRef:   call void @an_argmemonly_func(i8* %q) [ "unknown"() ] <->   call void @an_inaccessibleorargmemonly_func(i8* %q) [ "unknown"() ]
+; CHECK: Both ModRef:  Ptr: i8* %p     <->  call void @an_inaccessibleorargmemonly_func(ptr %q) [ "unknown"() ]
+; CHECK: Both ModRef:  Ptr: i8* %q     <->  call void @an_inaccessibleorargmemonly_func(ptr %q) [ "unknown"() ]
+; CHECK: Both ModRef:  Ptr: i8* %p     <->  call void @an_argmemonly_func(ptr %q) [ "unknown"() ]
+; CHECK: Both ModRef:  Ptr: i8* %q     <->  call void @an_argmemonly_func(ptr %q) [ "unknown"() ]
+; CHECK: Both ModRef:   call void @a_readonly_func(ptr %p) [ "unknown"() ] <->   call void @an_inaccessiblememonly_func() [ "unknown"() ]
+; CHECK: Both ModRef:   call void @a_readonly_func(ptr %p) [ "unknown"() ] <->   call void @an_inaccessibleorargmemonly_func(ptr %q) [ "unknown"() ]
+; CHECK: Both ModRef:   call void @a_readonly_func(ptr %p) [ "unknown"() ] <->   call void @an_argmemonly_func(ptr %q) [ "unknown"() ]
+; CHECK: Both ModRef:   call void @an_inaccessiblememonly_func() [ "unknown"() ] <->   call void @a_readonly_func(ptr %p) [ "unknown"() ]
+; CHECK: Both ModRef:   call void @an_inaccessiblememonly_func() [ "unknown"() ] <->   call void @an_inaccessibleorargmemonly_func(ptr %q) [ "unknown"() ]
+; CHECK: Both ModRef:   call void @an_inaccessiblememonly_func() [ "unknown"() ] <->   call void @an_argmemonly_func(ptr %q) [ "unknown"() ]
+; CHECK: Both ModRef:   call void @an_inaccessibleorargmemonly_func(ptr %q) [ "unknown"() ] <->   call void @a_readonly_func(ptr %p) [ "unknown"() ]
+; CHECK: Both ModRef:   call void @an_inaccessibleorargmemonly_func(ptr %q) [ "unknown"() ] <->   call void @an_inaccessiblememonly_func() [ "unknown"() ]
+; CHECK: Both ModRef:   call void @an_inaccessibleorargmemonly_func(ptr %q) [ "unknown"() ] <->   call void @an_argmemonly_func(ptr %q) [ "unknown"() ]
+; CHECK: Both ModRef:   call void @an_argmemonly_func(ptr %q) [ "unknown"() ] <->   call void @a_readonly_func(ptr %p) [ "unknown"() ]
+; CHECK: Both ModRef:   call void @an_argmemonly_func(ptr %q) [ "unknown"() ] <->   call void @an_inaccessiblememonly_func() [ "unknown"() ]
+; CHECK: Both ModRef:   call void @an_argmemonly_func(ptr %q) [ "unknown"() ] <->   call void @an_inaccessibleorargmemonly_func(ptr %q) [ "unknown"() ]
 }
 
 ;; test callsite overwrite of unknown operand bundle
-define void @test10(i8* %p) {
+define void @test10(ptr %p) {
 ; CHECK-LABEL: Function: test10
 entry:
-  %q = getelementptr i8, i8* %p, i64 16
-  load i8, i8* %p
-  load i8, i8* %q
-  call void @a_readonly_func(i8* %p) #6 [ "unknown"() ]
+  %q = getelementptr i8, ptr %p, i64 16
+  load i8, ptr %p
+  load i8, ptr %q
+  call void @a_readonly_func(ptr %p) #6 [ "unknown"() ]
   call void @an_inaccessiblememonly_func() #7 [ "unknown"() ]
-  call void @an_inaccessibleorargmemonly_func(i8* %q) #8 [ "unknown"() ]
-  call void @an_argmemonly_func(i8* %q) #9 [ "unknown"() ]
+  call void @an_inaccessibleorargmemonly_func(ptr %q) #8 [ "unknown"() ]
+  call void @an_argmemonly_func(ptr %q) #9 [ "unknown"() ]
   ret void
 
-; CHECK: Just Ref:  Ptr: i8* %p        <->  call void @a_readonly_func(i8* %p) #9 [ "unknown"() ]
-; CHECK: Just Ref:  Ptr: i8* %q        <->  call void @a_readonly_func(i8* %p) #9 [ "unknown"() ]
+; CHECK: Just Ref:  Ptr: i8* %p        <->  call void @a_readonly_func(ptr %p) #9 [ "unknown"() ]
+; CHECK: Just Ref:  Ptr: i8* %q        <->  call void @a_readonly_func(ptr %p) #9 [ "unknown"() ]
 ; CHECK: NoModRef:  Ptr: i8* %p        <->  call void @an_inaccessiblememonly_func() #10 [ "unknown"() ]
 ; CHECK: NoModRef:  Ptr: i8* %q        <->  call void @an_inaccessiblememonly_func() #10 [ "unknown"() ]
-; CHECK: Both ModRef:  Ptr: i8* %p        <->  call void @an_inaccessibleorargmemonly_func(i8* %q) #11 [ "unknown"() ]
-; CHECK: Both ModRef:  Ptr: i8* %q     <->  call void @an_inaccessibleorargmemonly_func(i8* %q) #11 [ "unknown"() ]
-; CHECK: Both ModRef:  Ptr: i8* %p        <->  call void @an_argmemonly_func(i8* %q) #12 [ "unknown"() ]
-; CHECK: Both ModRef:  Ptr: i8* %q     <->  call void @an_argmemonly_func(i8* %q) #12 [ "unknown"() ]
-; CHECK: Just Ref:   call void @a_readonly_func(i8* %p) #9 [ "unknown"() ] <->   call void @an_inaccessiblememonly_func() #10 [ "unknown"() ]
-; CHECK: Just Ref:   call void @a_readonly_func(i8* %p) #9 [ "unknown"() ] <->   call void @an_inaccessibleorargmemonly_func(i8* %q) #11 [ "unknown"() ]
-; CHECK: Just Ref:   call void @a_readonly_func(i8* %p) #9 [ "unknown"() ] <->   call void @an_argmemonly_func(i8* %q) #12 [ "unknown"() ]
-; CHECK: Both ModRef:   call void @an_inaccessiblememonly_func() #10 [ "unknown"() ] <->   call void @a_readonly_func(i8* %p) #9 [ "unknown"() ]
-; CHECK: Both ModRef:   call void @an_inaccessiblememonly_func() #10 [ "unknown"() ] <->   call void @an_inaccessibleorargmemonly_func(i8* %q) #11 [ "unknown"() ]
-; CHECK: NoModRef:   call void @an_inaccessiblememonly_func() #10 [ "unknown"() ] <->   call void @an_argmemonly_func(i8* %q) #12 [ "unknown"() ]
-; CHECK: Both ModRef:   call void @an_inaccessibleorargmemonly_func(i8* %q) #11 [ "unknown"() ] <->   call void @a_readonly_func(i8* %p) #9 [ "unknown"() ]
-; CHECK: Both ModRef:   call void @an_inaccessibleorargmemonly_func(i8* %q) #11 [ "unknown"() ] <->   call void @an_inaccessiblememonly_func() #10 [ "unknown"() ]
-; CHECK: Both ModRef:   call void @an_inaccessibleorargmemonly_func(i8* %q) #11 [ "unknown"() ] <->   call void @an_argmemonly_func(i8* %q) #12 [ "unknown"() ]
-; CHECK: Both ModRef:   call void @an_argmemonly_func(i8* %q) #12 [ "unknown"() ] <->   call void @a_readonly_func(i8* %p) #9 [ "unknown"() ]
-; CHECK: NoModRef:   call void @an_argmemonly_func(i8* %q) #12 [ "unknown"() ] <->   call void @an_inaccessiblememonly_func() #10 [ "unknown"() ]
-; CHECK: Both ModRef:   call void @an_argmemonly_func(i8* %q) #12 [ "unknown"() ] <->   call void @an_inaccessibleorargmemonly_func(i8* %q) #11 [ "unknown"() ]
+; CHECK: Both ModRef:  Ptr: i8* %p        <->  call void @an_inaccessibleorargmemonly_func(ptr %q) #11 [ "unknown"() ]
+; CHECK: Both ModRef:  Ptr: i8* %q     <->  call void @an_inaccessibleorargmemonly_func(ptr %q) #11 [ "unknown"() ]
+; CHECK: Both ModRef:  Ptr: i8* %p        <->  call void @an_argmemonly_func(ptr %q) #12 [ "unknown"() ]
+; CHECK: Both ModRef:  Ptr: i8* %q     <->  call void @an_argmemonly_func(ptr %q) #12 [ "unknown"() ]
+; CHECK: Just Ref:   call void @a_readonly_func(ptr %p) #9 [ "unknown"() ] <->   call void @an_inaccessiblememonly_func() #10 [ "unknown"() ]
+; CHECK: Just Ref:   call void @a_readonly_func(ptr %p) #9 [ "unknown"() ] <->   call void @an_inaccessibleorargmemonly_func(ptr %q) #11 [ "unknown"() ]
+; CHECK: Just Ref:   call void @a_readonly_func(ptr %p) #9 [ "unknown"() ] <->   call void @an_argmemonly_func(ptr %q) #12 [ "unknown"() ]
+; CHECK: Both ModRef:   call void @an_inaccessiblememonly_func() #10 [ "unknown"() ] <->   call void @a_readonly_func(ptr %p) #9 [ "unknown"() ]
+; CHECK: Both ModRef:   call void @an_inaccessiblememonly_func() #10 [ "unknown"() ] <->   call void @an_inaccessibleorargmemonly_func(ptr %q) #11 [ "unknown"() ]
+; CHECK: NoModRef:   call void @an_inaccessiblememonly_func() #10 [ "unknown"() ] <->   call void @an_argmemonly_func(ptr %q) #12 [ "unknown"() ]
+; CHECK: Both ModRef:   call void @an_inaccessibleorargmemonly_func(ptr %q) #11 [ "unknown"() ] <->   call void @a_readonly_func(ptr %p) #9 [ "unknown"() ]
+; CHECK: Both ModRef:   call void @an_inaccessibleorargmemonly_func(ptr %q) #11 [ "unknown"() ] <->   call void @an_inaccessiblememonly_func() #10 [ "unknown"() ]
+; CHECK: Both ModRef:   call void @an_inaccessibleorargmemonly_func(ptr %q) #11 [ "unknown"() ] <->   call void @an_argmemonly_func(ptr %q) #12 [ "unknown"() ]
+; CHECK: Both ModRef:   call void @an_argmemonly_func(ptr %q) #12 [ "unknown"() ] <->   call void @a_readonly_func(ptr %p) #9 [ "unknown"() ]
+; CHECK: NoModRef:   call void @an_argmemonly_func(ptr %q) #12 [ "unknown"() ] <->   call void @an_inaccessiblememonly_func() #10 [ "unknown"() ]
+; CHECK: Both ModRef:   call void @an_argmemonly_func(ptr %q) #12 [ "unknown"() ] <->   call void @an_inaccessibleorargmemonly_func(ptr %q) #11 [ "unknown"() ]
 }
 
 

diff  --git a/llvm/test/Analysis/BasicAA/dag.ll b/llvm/test/Analysis/BasicAA/dag.ll
index bf1397c6df42..2eded0e5a73b 100644
--- a/llvm/test/Analysis/BasicAA/dag.ll
+++ b/llvm/test/Analysis/BasicAA/dag.ll
@@ -6,39 +6,32 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f3
 ; analyzing use-def dags.
 
 ; CHECK: MustAlias:  i8* %base, i8* %phi
-; CHECK: MustAlias: i8* %phi, i8* %wwa
-; CHECK: MustAlias: i8* %phi, i8* %wwb
-; CHECK: MustAlias: i16* %bigbase, i8* %phi
-define i8 @foo(i8* %base, i1 %x, i1 %w) {
+; CHECK: MustAlias: i16* %base, i8* %base
+; CHECK: MustAlias: i16* %base, i8* %phi
+define i8 @foo(ptr %base, i1 %x, i1 %w) {
 entry:
-  load i8, i8* %base
+  load i8, ptr %base
   br i1 %w, label %wa, label %wb
 wa:
-  %wwa = bitcast i8* %base to i8*
-  load i8, i8* %wwa
+  load i8, ptr %base
   br label %wc
 wb:
-  %wwb = bitcast i8* %base to i8*
-  load i8, i8* %wwb
+  load i8, ptr %base
   br label %wc
 wc:
-  %first = phi i8* [ %wwa, %wa ], [ %wwb, %wb ]
-  %fc = bitcast i8* %first to i8*
+  %first = phi ptr [ %base, %wa ], [ %base, %wb ]
   br i1 %x, label %xa, label %xb
 xa:
-  %xxa = bitcast i8* %fc to i8*
   br label %xc
 xb:
-  %xxb = bitcast i8* %fc to i8*
   br label %xc
 xc:
-  %phi = phi i8* [ %xxa, %xa ], [ %xxb, %xb ]
+  %phi = phi ptr [ %first, %xa ], [ %first, %xb ]
 
-  store i8 0, i8* %phi
+  store i8 0, ptr %phi
 
-  %bigbase = bitcast i8* %base to i16*
-  store i16 -1, i16* %bigbase
+  store i16 -1, ptr %base
 
-  %loaded = load i8, i8* %phi
+  %loaded = load i8, ptr %phi
   ret i8 %loaded
 }

diff  --git a/llvm/test/Analysis/BasicAA/deoptimize.ll b/llvm/test/Analysis/BasicAA/deoptimize.ll
index 6836cc4621e4..764927439bc6 100644
--- a/llvm/test/Analysis/BasicAA/deoptimize.ll
+++ b/llvm/test/Analysis/BasicAA/deoptimize.ll
@@ -3,13 +3,13 @@ target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-
 
 @G1 = external global i32
 
-declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i1)
-declare void @llvm.memmove.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i1)
+declare void @llvm.memcpy.p0.p0.i64(ptr nocapture, ptr nocapture, i64, i1)
+declare void @llvm.memmove.p0.p0.i64(ptr nocapture, ptr nocapture, i64, i1)
 declare void @llvm.experimental.deoptimize.void(...)
 declare void @unknown_but_readonly() readonly
 
-define void @test1(i8* %p) {
-  load i8, i8* %p
+define void @test1(ptr %p) {
+  load i8, ptr %p
   call void(...) @llvm.experimental.deoptimize.void() [ "deopt"() ]
   ret void
 
@@ -21,38 +21,38 @@ define void @test1(i8* %p) {
 ; Check that global G1 is reported as Ref by memcpy/memmove calls.
 define i32 @test_memcpy_with_deopt() {
 ; CHECK-LABEL: Function: test_memcpy_with_deopt:
-; CHECK: Both ModRef:  Ptr: i8* %A	<->  call void @llvm.memcpy.p0i8.p0i8.i64(i8* %A, i8* %B, i64 -1, i1 false) [ "deopt"() ]
-; CHECK: Just Ref:  Ptr: i8* %B	<->  call void @llvm.memcpy.p0i8.p0i8.i64(i8* %A, i8* %B, i64 -1, i1 false) [ "deopt"() ]
-; CHECK: Just Ref:  Ptr: i32* @G1	<->  call void @llvm.memcpy.p0i8.p0i8.i64(i8* %A, i8* %B, i64 -1, i1 false) [ "deopt"() ]
+; CHECK: Both ModRef:  Ptr: i8* %A	<->  call void @llvm.memcpy.p0.p0.i64(ptr %A, ptr %B, i64 -1, i1 false) [ "deopt"() ]
+; CHECK: Just Ref:  Ptr: i8* %B	<->  call void @llvm.memcpy.p0.p0.i64(ptr %A, ptr %B, i64 -1, i1 false) [ "deopt"() ]
+; CHECK: Just Ref:  Ptr: i32* @G1	<->  call void @llvm.memcpy.p0.p0.i64(ptr %A, ptr %B, i64 -1, i1 false) [ "deopt"() ]
 
   %A = alloca i8
   %B = alloca i8
-  load i8, i8* %A
-  load i8, i8* %B
+  load i8, ptr %A
+  load i8, ptr %B
 
-  store i32 2, i32* @G1  ;; Not referenced by semantics of memcpy but still may be read due to "deopt"
+  store i32 2, ptr @G1  ;; Not referenced by semantics of memcpy but still may be read due to "deopt"
 
-  call void @llvm.memcpy.p0i8.p0i8.i64(i8* %A, i8* %B, i64 -1, i1 false) [ "deopt"() ]
+  call void @llvm.memcpy.p0.p0.i64(ptr %A, ptr %B, i64 -1, i1 false) [ "deopt"() ]
 
-  %C = load i32, i32* @G1
+  %C = load i32, ptr @G1
   ret i32 %C
 }
 
 define i32 @test_memmove_with_deopt() {
 ; CHECK-LABEL: Function: test_memmove_with_deopt:
-; CHECK: Both ModRef:  Ptr: i8* %A	<->  call void @llvm.memmove.p0i8.p0i8.i64(i8* %A, i8* %B, i64 -1, i1 false) [ "deopt"() ]
-; CHECK: Just Ref:  Ptr: i8* %B	<->  call void @llvm.memmove.p0i8.p0i8.i64(i8* %A, i8* %B, i64 -1, i1 false) [ "deopt"() ]
-; CHECK: Just Ref:  Ptr: i32* @G1	<->  call void @llvm.memmove.p0i8.p0i8.i64(i8* %A, i8* %B, i64 -1, i1 false) [ "deopt"() ]
+; CHECK: Both ModRef:  Ptr: i8* %A	<->  call void @llvm.memmove.p0.p0.i64(ptr %A, ptr %B, i64 -1, i1 false) [ "deopt"() ]
+; CHECK: Just Ref:  Ptr: i8* %B	<->  call void @llvm.memmove.p0.p0.i64(ptr %A, ptr %B, i64 -1, i1 false) [ "deopt"() ]
+; CHECK: Just Ref:  Ptr: i32* @G1	<->  call void @llvm.memmove.p0.p0.i64(ptr %A, ptr %B, i64 -1, i1 false) [ "deopt"() ]
 
   %A = alloca i8
   %B = alloca i8
-  load i8, i8* %A
-  load i8, i8* %B
+  load i8, ptr %A
+  load i8, ptr %B
 
-  store i32 2, i32* @G1  ;; Not referenced by semantics of memcpy but still may be read due to "deopt"
+  store i32 2, ptr @G1  ;; Not referenced by semantics of memcpy but still may be read due to "deopt"
 
-  call void @llvm.memmove.p0i8.p0i8.i64(i8* %A, i8* %B, i64 -1, i1 false) [ "deopt"() ]
+  call void @llvm.memmove.p0.p0.i64(ptr %A, ptr %B, i64 -1, i1 false) [ "deopt"() ]
 
-  %C = load i32, i32* @G1
+  %C = load i32, ptr @G1
   ret i32 %C
 }

diff  --git a/llvm/test/Analysis/BasicAA/featuretest.ll b/llvm/test/Analysis/BasicAA/featuretest.ll
index 5e2519c8ff77..f78fa7cf44ed 100644
--- a/llvm/test/Analysis/BasicAA/featuretest.ll
+++ b/llvm/test/Analysis/BasicAA/featuretest.ll
@@ -8,7 +8,7 @@ target datalayout = "E-p:64:64:64-a0:0:8-f32:32:32-f64:64:64-i1:8:8-i8:8:8-i16:1
 
 @Global = external global { i32 }
 
-declare void @external(i32*)
+declare void @external(ptr)
 declare void @llvm.assume(i1)
 
 ; Array test:  Test that operations on one local array do not invalidate
@@ -18,40 +18,36 @@ define i32 @
diff erent_array_test(i64 %A, i64 %B) {
 ; NO_ASSUME-LABEL: @
diff erent_array_test(
 ; NO_ASSUME-NEXT:    [[ARRAY11:%.*]] = alloca [100 x i32], align 4
 ; NO_ASSUME-NEXT:    [[ARRAY22:%.*]] = alloca [200 x i32], align 4
-; NO_ASSUME-NEXT:    [[ARRAY22_SUB:%.*]] = getelementptr inbounds [200 x i32], [200 x i32]* [[ARRAY22]], i64 0, i64 0
-; NO_ASSUME-NEXT:    [[ARRAY11_SUB:%.*]] = getelementptr inbounds [100 x i32], [100 x i32]* [[ARRAY11]], i64 0, i64 0
-; NO_ASSUME-NEXT:    call void @llvm.assume(i1 true) [ "align"(i32* [[ARRAY11_SUB]], i32 4) ]
-; NO_ASSUME-NEXT:    call void @external(i32* nonnull [[ARRAY11_SUB]])
-; NO_ASSUME-NEXT:    call void @external(i32* nonnull [[ARRAY22_SUB]])
-; NO_ASSUME-NEXT:    [[POINTER2:%.*]] = getelementptr [200 x i32], [200 x i32]* [[ARRAY22]], i64 0, i64 [[B:%.*]]
-; NO_ASSUME-NEXT:    store i32 7, i32* [[POINTER2]], align 4
+; NO_ASSUME-NEXT:    call void @llvm.assume(i1 true) [ "align"(ptr [[ARRAY11]], i32 4) ]
+; NO_ASSUME-NEXT:    call void @external(ptr nonnull [[ARRAY11]])
+; NO_ASSUME-NEXT:    call void @external(ptr nonnull [[ARRAY22]])
+; NO_ASSUME-NEXT:    [[POINTER2:%.*]] = getelementptr i32, ptr [[ARRAY22]], i64 [[B:%.*]]
+; NO_ASSUME-NEXT:    store i32 7, ptr [[POINTER2]], align 4
 ; NO_ASSUME-NEXT:    ret i32 0
 ;
 ; USE_ASSUME-LABEL: @
diff erent_array_test(
 ; USE_ASSUME-NEXT:    [[ARRAY11:%.*]] = alloca [100 x i32], align 4
 ; USE_ASSUME-NEXT:    [[ARRAY22:%.*]] = alloca [200 x i32], align 4
-; USE_ASSUME-NEXT:    [[ARRAY22_SUB:%.*]] = getelementptr inbounds [200 x i32], [200 x i32]* [[ARRAY22]], i64 0, i64 0
-; USE_ASSUME-NEXT:    [[ARRAY11_SUB:%.*]] = getelementptr inbounds [100 x i32], [100 x i32]* [[ARRAY11]], i64 0, i64 0
-; USE_ASSUME-NEXT:    call void @external(i32* nonnull [[ARRAY11_SUB]])
-; USE_ASSUME-NEXT:    call void @external(i32* nonnull [[ARRAY22_SUB]])
-; USE_ASSUME-NEXT:    [[POINTER2:%.*]] = getelementptr [200 x i32], [200 x i32]* [[ARRAY22]], i64 0, i64 [[B:%.*]]
-; USE_ASSUME-NEXT:    store i32 7, i32* [[POINTER2]], align 4
+; USE_ASSUME-NEXT:    call void @external(ptr nonnull [[ARRAY11]])
+; USE_ASSUME-NEXT:    call void @external(ptr nonnull [[ARRAY22]])
+; USE_ASSUME-NEXT:    [[POINTER2:%.*]] = getelementptr i32, ptr [[ARRAY22]], i64 [[B:%.*]]
+; USE_ASSUME-NEXT:    store i32 7, ptr [[POINTER2]], align 4
 ; USE_ASSUME-NEXT:    ret i32 0
 ;
   %Array1 = alloca i32, i32 100
   %Array2 = alloca i32, i32 200
-  call void @llvm.assume(i1 true) ["align"(i32* %Array1, i32 4)]
+  call void @llvm.assume(i1 true) ["align"(ptr %Array1, i32 4)]
 
-  call void @external(i32* %Array1)
-  call void @external(i32* %Array2)
+  call void @external(ptr %Array1)
+  call void @external(ptr %Array2)
 
-  %pointer = getelementptr i32, i32* %Array1, i64 %A
-  %val = load i32, i32* %pointer
+  %pointer = getelementptr i32, ptr %Array1, i64 %A
+  %val = load i32, ptr %pointer
 
-  %pointer2 = getelementptr i32, i32* %Array2, i64 %B
-  store i32 7, i32* %pointer2
+  %pointer2 = getelementptr i32, ptr %Array2, i64 %B
+  store i32 7, ptr %pointer2
 
-  %REMOVE = load i32, i32* %pointer ; redundant with above load
+  %REMOVE = load i32, ptr %pointer ; redundant with above load
   %retval = sub i32 %REMOVE, %val
   ret i32 %retval
 }
@@ -62,92 +58,87 @@ define i32 @
diff erent_array_test(i64 %A, i64 %B) {
 define i32 @constant_array_index_test() {
 ; CHECK-LABEL: @constant_array_index_test(
 ; CHECK-NEXT:    [[ARRAY1:%.*]] = alloca [100 x i32], align 4
-; CHECK-NEXT:    [[ARRAY1_SUB:%.*]] = getelementptr inbounds [100 x i32], [100 x i32]* [[ARRAY1]], i64 0, i64 0
-; CHECK-NEXT:    call void @external(i32* nonnull [[ARRAY1_SUB]])
-; CHECK-NEXT:    [[P2:%.*]] = getelementptr inbounds [100 x i32], [100 x i32]* [[ARRAY1]], i64 0, i64 6
-; CHECK-NEXT:    store i32 1, i32* [[P2]], align 4
+; CHECK-NEXT:    call void @external(ptr nonnull [[ARRAY1]])
+; CHECK-NEXT:    [[P2:%.*]] = getelementptr inbounds i32, ptr [[ARRAY1]], i64 6
+; CHECK-NEXT:    store i32 1, ptr [[P2]], align 4
 ; CHECK-NEXT:    ret i32 0
 ;
   %Array = alloca i32, i32 100
-  call void @external(i32* %Array)
+  call void @external(ptr %Array)
 
-  %P1 = getelementptr i32, i32* %Array, i64 7
-  %P2 = getelementptr i32, i32* %Array, i64 6
+  %P1 = getelementptr i32, ptr %Array, i64 7
+  %P2 = getelementptr i32, ptr %Array, i64 6
 
-  %A = load i32, i32* %P1
-  store i32 1, i32* %P2   ; Should not invalidate load
-  %BREMOVE = load i32, i32* %P1
+  %A = load i32, ptr %P1
+  store i32 1, ptr %P2   ; Should not invalidate load
+  %BREMOVE = load i32, ptr %P1
   %Val = sub i32 %A, %BREMOVE
   ret i32 %Val
 }
 
 ; Test that if two pointers are spaced out by a constant getelementptr, that
 ; they cannot alias.
-define i32 @gep_distance_test(i32* %A) {
+define i32 @gep_distance_test(ptr %A) {
 ; NO_ASSUME-LABEL: @gep_distance_test(
-; NO_ASSUME-NEXT:    [[B:%.*]] = getelementptr i32, i32* [[A:%.*]], i64 2
-; NO_ASSUME-NEXT:    store i32 7, i32* [[B]], align 4
+; NO_ASSUME-NEXT:    [[B:%.*]] = getelementptr i32, ptr [[A:%.*]], i64 2
+; NO_ASSUME-NEXT:    store i32 7, ptr [[B]], align 4
 ; NO_ASSUME-NEXT:    ret i32 0
 ;
 ; USE_ASSUME-LABEL: @gep_distance_test(
-; USE_ASSUME-NEXT:    [[B:%.*]] = getelementptr i32, i32* [[A:%.*]], i64 2
-; USE_ASSUME-NEXT:    store i32 7, i32* [[B]], align 4
-; USE_ASSUME-NEXT:    call void @llvm.assume(i1 true) [ "dereferenceable"(i32* [[A]], i64 4), "nonnull"(i32* [[A]]), "align"(i32* [[A]], i64 4) ]
+; USE_ASSUME-NEXT:    [[B:%.*]] = getelementptr i32, ptr [[A:%.*]], i64 2
+; USE_ASSUME-NEXT:    store i32 7, ptr [[B]], align 4
+; USE_ASSUME-NEXT:    call void @llvm.assume(i1 true) [ "dereferenceable"(ptr [[A]], i64 4), "nonnull"(ptr [[A]]), "align"(ptr [[A]], i64 4) ]
 ; USE_ASSUME-NEXT:    ret i32 0
 ;
-  %REMOVEu = load i32, i32* %A
-  %B = getelementptr i32, i32* %A, i64 2  ; Cannot alias A
-  store i32 7, i32* %B
-  %REMOVEv = load i32, i32* %A
+  %REMOVEu = load i32, ptr %A
+  %B = getelementptr i32, ptr %A, i64 2  ; Cannot alias A
+  store i32 7, ptr %B
+  %REMOVEv = load i32, ptr %A
   %r = sub i32 %REMOVEu, %REMOVEv
   ret i32 %r
 }
 
 ; Test that if two pointers are spaced out by a constant offset, that they
 ; cannot alias, even if there is a variable offset between them...
-define i32 @gep_distance_test2({i32,i32}* %A, i64 %distance) {
+define i32 @gep_distance_test2(ptr %A, i64 %distance) {
 ; NO_ASSUME-LABEL: @gep_distance_test2(
-; NO_ASSUME-NEXT:    [[B:%.*]] = getelementptr { i32, i32 }, { i32, i32 }* [[A:%.*]], i64 [[DISTANCE:%.*]], i32 1
-; NO_ASSUME-NEXT:    store i32 7, i32* [[B]], align 4
+; NO_ASSUME-NEXT:    [[B:%.*]] = getelementptr { i32, i32 }, ptr [[A:%.*]], i64 [[DISTANCE:%.*]], i32 1
+; NO_ASSUME-NEXT:    store i32 7, ptr [[B]], align 4
 ; NO_ASSUME-NEXT:    ret i32 0
 ;
 ; USE_ASSUME-LABEL: @gep_distance_test2(
-; USE_ASSUME-NEXT:    [[A1:%.*]] = getelementptr { i32, i32 }, { i32, i32 }* [[A:%.*]], i64 0, i32 0
-; USE_ASSUME-NEXT:    [[B:%.*]] = getelementptr { i32, i32 }, { i32, i32 }* [[A]], i64 [[DISTANCE:%.*]], i32 1
-; USE_ASSUME-NEXT:    store i32 7, i32* [[B]], align 4
-; USE_ASSUME-NEXT:    call void @llvm.assume(i1 true) [ "dereferenceable"(i32* [[A1]], i64 4), "nonnull"({ i32, i32 }* [[A]]), "align"(i32* [[A1]], i64 4) ]
+; USE_ASSUME-NEXT:    [[B:%.*]] = getelementptr { i32, i32 }, ptr [[A:%.*]], i64 [[DISTANCE:%.*]], i32 1
+; USE_ASSUME-NEXT:    store i32 7, ptr [[B]], align 4
+; USE_ASSUME-NEXT:    call void @llvm.assume(i1 true) [ "dereferenceable"(ptr [[A]], i64 4), "nonnull"(ptr [[A]]), "align"(ptr [[A]], i64 4) ]
 ; USE_ASSUME-NEXT:    ret i32 0
 ;
-  %A1 = getelementptr {i32,i32}, {i32,i32}* %A, i64 0, i32 0
-  %REMOVEu = load i32, i32* %A1
-  %B = getelementptr {i32,i32}, {i32,i32}* %A, i64 %distance, i32 1
-  store i32 7, i32* %B    ; B cannot alias A, it's at least 4 bytes away
-  %REMOVEv = load i32, i32* %A1
+  %A1 = getelementptr {i32,i32}, ptr %A, i64 0, i32 0
+  %REMOVEu = load i32, ptr %A1
+  %B = getelementptr {i32,i32}, ptr %A, i64 %distance, i32 1
+  store i32 7, ptr %B    ; B cannot alias A, it's at least 4 bytes away
+  %REMOVEv = load i32, ptr %A1
   %r = sub i32 %REMOVEu, %REMOVEv
   ret i32 %r
 }
 
 ; Test that we can do funny pointer things and that distance calc will still
 ; work.
-define i32 @gep_distance_test3(i32 * %A) {
+define i32 @gep_distance_test3(ptr %A) {
 ; NO_ASSUME-LABEL: @gep_distance_test3(
-; NO_ASSUME-NEXT:    [[C1:%.*]] = getelementptr i32, i32* [[A:%.*]], i64 1
-; NO_ASSUME-NEXT:    [[C:%.*]] = bitcast i32* [[C1]] to i8*
-; NO_ASSUME-NEXT:    store i8 42, i8* [[C]], align 1
+; NO_ASSUME-NEXT:    [[C:%.*]] = getelementptr i8, ptr [[A:%.*]], i64 4
+; NO_ASSUME-NEXT:    store i8 42, ptr [[C]], align 1
 ; NO_ASSUME-NEXT:    ret i32 0
 ;
 ; USE_ASSUME-LABEL: @gep_distance_test3(
-; USE_ASSUME-NEXT:    [[C1:%.*]] = getelementptr i32, i32* [[A:%.*]], i64 1
-; USE_ASSUME-NEXT:    [[C:%.*]] = bitcast i32* [[C1]] to i8*
-; USE_ASSUME-NEXT:    store i8 42, i8* [[C]], align 4
-; USE_ASSUME-NEXT:    call void @llvm.assume(i1 true) [ "dereferenceable"(i32* [[A]], i64 4), "nonnull"(i32* [[A]]), "align"(i32* [[A]], i64 4) ]
+; USE_ASSUME-NEXT:    [[C:%.*]] = getelementptr i8, ptr [[A:%.*]], i64 4
+; USE_ASSUME-NEXT:    store i8 42, ptr [[C]], align 4
+; USE_ASSUME-NEXT:    call void @llvm.assume(i1 true) [ "dereferenceable"(ptr [[A]], i64 4), "nonnull"(ptr [[A]]), "align"(ptr [[A]], i64 4) ]
 ; USE_ASSUME-NEXT:    ret i32 0
 ;
-  %X = load i32, i32* %A
-  %B = bitcast i32* %A to i8*
-  %C = getelementptr i8, i8* %B, i64 4
-  store i8 42, i8* %C
-  %Y = load i32, i32* %A
+  %X = load i32, ptr %A
+  %C = getelementptr i8, ptr %A, i64 4
+  store i8 42, ptr %C
+  %Y = load i32, ptr %A
   %R = sub i32 %X, %Y
   ret i32 %R
 }
@@ -156,16 +147,16 @@ define i32 @gep_distance_test3(i32 * %A) {
 define i32 @constexpr_test() {
 ; CHECK-LABEL: @constexpr_test(
 ; CHECK-NEXT:    [[X:%.*]] = alloca i32, align 4
-; CHECK-NEXT:    call void @external(i32* nonnull [[X]])
-; CHECK-NEXT:    store i32 5, i32* getelementptr inbounds ({ i32 }, { i32 }* @Global, i64 0, i32 0), align 4
+; CHECK-NEXT:    call void @external(ptr nonnull [[X]])
+; CHECK-NEXT:    store i32 5, ptr @Global, align 4
 ; CHECK-NEXT:    ret i32 0
 ;
   %X = alloca i32
-  call void @external(i32* %X)
+  call void @external(ptr %X)
 
-  %Y = load i32, i32* %X
-  store i32 5, i32* getelementptr ({ i32 }, { i32 }* @Global, i64 0, i32 0)
-  %REMOVE = load i32, i32* %X
+  %Y = load i32, ptr %X
+  store i32 5, ptr @Global
+  %REMOVE = load i32, ptr %X
   %retval = sub i32 %Y, %REMOVE
   ret i32 %retval
 }
@@ -174,28 +165,28 @@ define i32 @constexpr_test() {
 
 ; PR7589
 ; These two index expressions are 
diff erent, this cannot be CSE'd.
-define i16 @zext_sext_confusion(i16* %row2col, i5 %j) nounwind{
+define i16 @zext_sext_confusion(ptr %row2col, i5 %j) nounwind{
 ; CHECK-LABEL: @zext_sext_confusion(
 ; CHECK-NEXT:  entry:
 ; CHECK-NEXT:    [[SUM5_CAST:%.*]] = zext i5 [[J:%.*]] to i64
-; CHECK-NEXT:    [[P1:%.*]] = getelementptr i16, i16* [[ROW2COL:%.*]], i64 [[SUM5_CAST]]
-; CHECK-NEXT:    [[ROW2COL_LOAD_1_2:%.*]] = load i16, i16* [[P1]], align 1
+; CHECK-NEXT:    [[P1:%.*]] = getelementptr i16, ptr [[ROW2COL:%.*]], i64 [[SUM5_CAST]]
+; CHECK-NEXT:    [[ROW2COL_LOAD_1_2:%.*]] = load i16, ptr [[P1]], align 1
 ; CHECK-NEXT:    [[SUM13_CAST31:%.*]] = sext i5 [[J]] to i6
 ; CHECK-NEXT:    [[SUM13_CAST:%.*]] = zext i6 [[SUM13_CAST31]] to i64
-; CHECK-NEXT:    [[P2:%.*]] = getelementptr i16, i16* [[ROW2COL]], i64 [[SUM13_CAST]]
-; CHECK-NEXT:    [[ROW2COL_LOAD_1_6:%.*]] = load i16, i16* [[P2]], align 1
+; CHECK-NEXT:    [[P2:%.*]] = getelementptr i16, ptr [[ROW2COL]], i64 [[SUM13_CAST]]
+; CHECK-NEXT:    [[ROW2COL_LOAD_1_6:%.*]] = load i16, ptr [[P2]], align 1
 ; CHECK-NEXT:    [[DOTRET:%.*]] = sub i16 [[ROW2COL_LOAD_1_6]], [[ROW2COL_LOAD_1_2]]
 ; CHECK-NEXT:    ret i16 [[DOTRET]]
 ;
 entry:
   %sum5.cast = zext i5 %j to i64             ; <i64> [#uses=1]
-  %P1 = getelementptr i16, i16* %row2col, i64 %sum5.cast
-  %row2col.load.1.2 = load i16, i16* %P1, align 1 ; <i16> [#uses=1]
+  %P1 = getelementptr i16, ptr %row2col, i64 %sum5.cast
+  %row2col.load.1.2 = load i16, ptr %P1, align 1 ; <i16> [#uses=1]
 
   %sum13.cast31 = sext i5 %j to i6          ; <i6> [#uses=1]
   %sum13.cast = zext i6 %sum13.cast31 to i64      ; <i64> [#uses=1]
-  %P2 = getelementptr i16, i16* %row2col, i64 %sum13.cast
-  %row2col.load.1.6 = load i16, i16* %P2, align 1 ; <i16> [#uses=1]
+  %P2 = getelementptr i16, ptr %row2col, i64 %sum13.cast
+  %row2col.load.1.6 = load i16, ptr %P2, align 1 ; <i16> [#uses=1]
 
   %.ret = sub i16 %row2col.load.1.6, %row2col.load.1.2 ; <i16> [#uses=1]
   ret i16 %.ret

diff  --git a/llvm/test/Analysis/BasicAA/gep-implicit-trunc-32-bit-pointers.ll b/llvm/test/Analysis/BasicAA/gep-implicit-trunc-32-bit-pointers.ll
index 8c79275b6950..15f001e9aff1 100644
--- a/llvm/test/Analysis/BasicAA/gep-implicit-trunc-32-bit-pointers.ll
+++ b/llvm/test/Analysis/BasicAA/gep-implicit-trunc-32-bit-pointers.ll
@@ -7,93 +7,89 @@ target datalayout = "p:32:32:32"
 
 declare void @llvm.assume(i1)
 
-define void @mustalias_overflow_in_32_bit_constants(i8* %ptr) {
-; CHECK-LABEL: Function: mustalias_overflow_in_32_bit_constants: 3 pointers, 0 call sites
+define void @mustalias_overflow_in_32_bit_constants(ptr %ptr) {
+; CHECK-LABEL: Function: mustalias_overflow_in_32_bit_constants: 2 pointers, 0 call sites
 ; CHECK-NEXT:    MustAlias: i8* %gep.1, i8* %ptr
-; CHECK-NEXT:    MustAlias:    i8* %gep.2, i8* %ptr
-; CHECK-NEXT:    MustAlias:    i8* %gep.1, i8* %gep.2
 ;
-  load i8, i8* %ptr
-  %gep.1 = getelementptr i8, i8* %ptr, i64 4294967296
-  store i8 0, i8* %gep.1
-  %gep.2 = getelementptr i8, i8* %ptr, i64 0
-  store i8 1, i8* %gep.2
+  load i8, ptr %ptr
+  %gep.1 = getelementptr i8, ptr %ptr, i64 4294967296
+  store i8 0, ptr %gep.1
   ret void
 }
 
-define void @mustalias_overflow_in_32_with_var_index([1 x i8]* %ptr, i64 %n) {
+define void @mustalias_overflow_in_32_with_var_index(ptr %ptr, i64 %n) {
 ; CHECK-LABEL: Function: mustalias_overflow_in_32_with_var_index
 ; CHECK:       MustAlias: i8* %gep.1, i8* %gep.2
 ;
-  load [1 x i8], [1 x i8]* %ptr
-  %gep.1 = getelementptr [1 x i8], [1 x i8]* %ptr, i64 %n, i64 4294967296
-  store i8 0, i8* %gep.1
-  %gep.2 = getelementptr [1 x i8], [1 x i8]* %ptr, i64 %n, i64 0
-  store i8 1, i8* %gep.2
+  load [1 x i8], ptr %ptr
+  %gep.1 = getelementptr [1 x i8], ptr %ptr, i64 %n, i64 4294967296
+  store i8 0, ptr %gep.1
+  %gep.2 = getelementptr [1 x i8], ptr %ptr, i64 %n, i64 0
+  store i8 1, ptr %gep.2
   ret void
 }
 
-define void @noalias_overflow_in_32_bit_constants(i8* %ptr) {
+define void @noalias_overflow_in_32_bit_constants(ptr %ptr) {
 ; CHECK-LABEL: Function: noalias_overflow_in_32_bit_constants: 3 pointers, 0 call sites
 ; CHECK-NEXT:    MustAlias: i8* %gep.1, i8* %ptr
 ; CHECK-NEXT:    NoAlias:  i8* %gep.2, i8* %ptr
 ; CHECK-NEXT:    NoAlias:  i8* %gep.1, i8* %gep.2
 ;
-  load i8, i8* %ptr
-  %gep.1 = getelementptr i8, i8* %ptr, i64 4294967296
-  store i8 0, i8* %gep.1
-  %gep.2 = getelementptr i8, i8* %ptr, i64 1
-  store i8 1, i8* %gep.2
+  load i8, ptr %ptr
+  %gep.1 = getelementptr i8, ptr %ptr, i64 4294967296
+  store i8 0, ptr %gep.1
+  %gep.2 = getelementptr i8, ptr %ptr, i64 1
+  store i8 1, ptr %gep.2
   ret void
 }
 
 ; The GEP indices get implicitly truncated to 32 bit, so multiples of 2^32
 ; (=4294967296) will be 0.
 ; See https://alive2.llvm.org/ce/z/HHjQgb.
-define void @mustalias_overflow_in_32_bit_add_mul_gep(i8* %ptr, i64 %i) {
+define void @mustalias_overflow_in_32_bit_add_mul_gep(ptr %ptr, i64 %i) {
 ; CHECK-LABEL: Function: mustalias_overflow_in_32_bit_add_mul_gep: 3 pointers, 1 call sites
 ; CHECK-NEXT:    MayAlias: i8* %gep.1, i8* %ptr
 ; CHECK-NEXT:    MayAlias: i8* %gep.2, i8* %ptr
 ; CHECK-NEXT:    MayAlias: i8* %gep.1, i8* %gep.2
 ;
-  load i8, i8* %ptr
+  load i8, ptr %ptr
   %s.1 = icmp sgt i64 %i, 0
   call void @llvm.assume(i1 %s.1)
 
   %mul = mul nuw nsw i64 %i, 4294967296
   %add = add nuw nsw i64 %mul, %i
-  %gep.1 = getelementptr i8, i8* %ptr, i64 %add
-  store i8 0, i8* %gep.1
-  %gep.2 = getelementptr i8, i8* %ptr, i64 %i
-  store i8 1, i8* %gep.2
+  %gep.1 = getelementptr i8, ptr %ptr, i64 %add
+  store i8 0, ptr %gep.1
+  %gep.2 = getelementptr i8, ptr %ptr, i64 %i
+  store i8 1, ptr %gep.2
   ret void
 }
 
-define void @mayalias_overflow_in_32_bit_non_zero(i8* %ptr, i64 %n) {
+define void @mayalias_overflow_in_32_bit_non_zero(ptr %ptr, i64 %n) {
 ; CHECK-LABEL: Function: mayalias_overflow_in_32_bit_non_zero
 ; CHECK:    MayAlias: i8* %gep, i8* %ptr
 ;
-  load i8, i8* %ptr
+  load i8, ptr %ptr
   %c = icmp ne i64 %n, 0
   call void @llvm.assume(i1 %c)
-  store i8 0, i8* %ptr
-  %gep = getelementptr i8, i8* %ptr, i64 %n
-  store i8 1, i8* %gep
+  store i8 0, ptr %ptr
+  %gep = getelementptr i8, ptr %ptr, i64 %n
+  store i8 1, ptr %gep
   ret void
 }
 
-define void @mayalias_overflow_in_32_bit_positive(i8* %ptr, i64 %n) {
+define void @mayalias_overflow_in_32_bit_positive(ptr %ptr, i64 %n) {
 ; CHECK-LABEL: Function: mayalias_overflow_in_32_bit_positive
 ; CHECK:    NoAlias: i8* %gep.1, i8* %ptr
 ; CHECK:    MayAlias: i8* %gep.2, i8* %ptr
 ; CHECK:    MayAlias: i8* %gep.1, i8* %gep.2
 ;
-  load i8, i8* %ptr
+  load i8, ptr %ptr
   %c = icmp sgt i64 %n, 0
   call void @llvm.assume(i1 %c)
-  %gep.1 = getelementptr i8, i8* %ptr, i64 -1
-  store i8 0, i8* %gep.1
-  %gep.2 = getelementptr i8, i8* %ptr, i64 %n
-  store i8 1, i8* %gep.2
+  %gep.1 = getelementptr i8, ptr %ptr, i64 -1
+  store i8 0, ptr %gep.1
+  %gep.2 = getelementptr i8, ptr %ptr, i64 %n
+  store i8 1, ptr %gep.2
   ret void
 }

diff  --git a/llvm/test/Analysis/BasicAA/gep-modulo.ll b/llvm/test/Analysis/BasicAA/gep-modulo.ll
index 7e62a15aac47..dcbc0a909085 100644
--- a/llvm/test/Analysis/BasicAA/gep-modulo.ll
+++ b/llvm/test/Analysis/BasicAA/gep-modulo.ll
@@ -3,325 +3,324 @@
 target datalayout = "p:64:64:64"
 
 ; %gep.idx and %gep.6 must-alias if %mul overflows (e.g. %idx == 52).
-define void @may_overflow_mul_add_i8([16 x i8]* %ptr, i8 %idx) {
+define void @may_overflow_mul_add_i8(ptr %ptr, i8 %idx) {
 ; CHECK-LABEL: Function: may_overflow_mul_add_i8: 3 pointers, 0 call sites
 ; CHECK-NEXT:    MayAlias:  i8* %gep.idx, [16 x i8]* %ptr
 ; CHECK-NEXT:    PartialAlias (off -6): i8* %gep.6, [16 x i8]* %ptr
 ; CHECK-NEXT:    MayAlias:  i8* %gep.6, i8* %gep.idx
 ;
-  load [16 x i8], [16 x i8]* %ptr
+  load [16 x i8], ptr %ptr
   %mul = mul i8 %idx, 5
   %add = add i8 %mul, 2
-  %gep.idx = getelementptr [16 x i8], [16 x i8]* %ptr, i32 0, i8 %add
-  store i8 0, i8* %gep.idx, align 1
-  %gep.6 = getelementptr [16 x i8], [16 x i8]* %ptr, i32 0, i32 6
-  store i8 1, i8* %gep.6, align 1
+  %gep.idx = getelementptr [16 x i8], ptr %ptr, i32 0, i8 %add
+  store i8 0, ptr %gep.idx, align 1
+  %gep.6 = getelementptr [16 x i8], ptr %ptr, i32 0, i32 6
+  store i8 1, ptr %gep.6, align 1
   ret void
 }
 
-define void @nuw_nsw_mul_add_i8([16 x i8]* %ptr, i8 %idx) {
+define void @nuw_nsw_mul_add_i8(ptr %ptr, i8 %idx) {
 ; CHECK-LABEL: Function: nuw_nsw_mul_add_i8: 3 pointers, 0 call sites
 ; CHECK-NEXT:    MayAlias: i8* %gep.idx, [16 x i8]* %ptr
 ; CHECK-NEXT:    PartialAlias (off -6): i8* %gep.6, [16 x i8]* %ptr
 ; CHECK-NEXT:    NoAlias:  i8* %gep.6, i8* %gep.idx
 ;
-  load [16 x i8], [16 x i8]* %ptr
+  load [16 x i8], ptr %ptr
   %mul = mul nuw nsw i8 %idx, 5
   %add = add nuw nsw i8 %mul, 2
-  %gep.idx = getelementptr [16 x i8], [16 x i8]* %ptr, i32 0, i8 %add
-  store i8 0, i8* %gep.idx, align 1
-  %gep.6 = getelementptr [16 x i8], [16 x i8]* %ptr, i32 0, i32 6
-  store i8 1, i8* %gep.6, align 1
+  %gep.idx = getelementptr [16 x i8], ptr %ptr, i32 0, i8 %add
+  store i8 0, ptr %gep.idx, align 1
+  %gep.6 = getelementptr [16 x i8], ptr %ptr, i32 0, i32 6
+  store i8 1, ptr %gep.6, align 1
   ret void
 }
 
 ; %gep.idx and %gep.3 must-alias if %mul overflows (e.g. %idx == 52).
-define void @may_overflow_mul_sub_i8([16 x i8]* %ptr, i8 %idx) {
+define void @may_overflow_mul_sub_i8(ptr %ptr, i8 %idx) {
 ; CHECK-LABEL: Function: may_overflow_mul_sub_i8: 3 pointers, 0 call sites
 ; CHECK-NEXT:    MayAlias:  i8* %gep.idx, [16 x i8]* %ptr
 ; CHECK-NEXT:    PartialAlias (off -3): i8* %gep.3, [16 x i8]* %ptr
 ; CHECK-NEXT:    MayAlias:  i8* %gep.3, i8* %gep.idx
 ;
-  load [16 x i8], [16 x i8]* %ptr
+  load [16 x i8], ptr %ptr
   %mul = mul i8 %idx, 5
   %sub = sub i8 %mul, 1
-  %gep.idx = getelementptr [16 x i8], [16 x i8]* %ptr, i32 0, i8 %sub
-  store i8 0, i8* %gep.idx, align 1
-  %gep.3 = getelementptr [16 x i8], [16 x i8]* %ptr, i32 0, i32 3
-  store i8 1, i8* %gep.3, align 1
+  %gep.idx = getelementptr [16 x i8], ptr %ptr, i32 0, i8 %sub
+  store i8 0, ptr %gep.idx, align 1
+  %gep.3 = getelementptr [16 x i8], ptr %ptr, i32 0, i32 3
+  store i8 1, ptr %gep.3, align 1
   ret void
 }
 
-define void @nuw_nsw_mul_sub_i8([16 x i8]* %ptr, i8 %idx) {
+define void @nuw_nsw_mul_sub_i8(ptr %ptr, i8 %idx) {
 ; CHECK-LABEL: Function: nuw_nsw_mul_sub_i8: 3 pointers, 0 call sites
 ; CHECK-NEXT:    MayAlias:  i8* %gep.idx, [16 x i8]* %ptr
 ; CHECK-NEXT:    PartialAlias (off -3): i8* %gep.3, [16 x i8]* %ptr
 ; CHECK-NEXT:    NoAlias:  i8* %gep.3, i8* %gep.idx
 ;
-  load [16 x i8], [16 x i8]* %ptr
+  load [16 x i8], ptr %ptr
   %mul = mul nuw nsw i8 %idx, 5
   %sub = sub nuw nsw i8 %mul, 1
-  %gep.idx = getelementptr [16 x i8], [16 x i8]* %ptr, i32 0, i8 %sub
-  store i8 0, i8* %gep.idx, align 1
-  %gep.3 = getelementptr [16 x i8], [16 x i8]* %ptr, i32 0, i32 3
-  store i8 1, i8* %gep.3, align 1
+  %gep.idx = getelementptr [16 x i8], ptr %ptr, i32 0, i8 %sub
+  store i8 0, ptr %gep.idx, align 1
+  %gep.3 = getelementptr [16 x i8], ptr %ptr, i32 0, i32 3
+  store i8 1, ptr %gep.3, align 1
   ret void
 }
 
 ; %gep.idx and %gep.3 must-alias if %mul overflows
 ; (e.g. %idx == 3689348814741910323).
-define void @may_overflow_mul_sub_i64([16 x i8]* %ptr, i64 %idx) {
+define void @may_overflow_mul_sub_i64(ptr %ptr, i64 %idx) {
 ; CHECK-LABEL: Function: may_overflow_mul_sub_i64: 3 pointers, 0 call sites
 ; CHECK-NEXT:    MayAlias:  i8* %gep.idx, [16 x i8]* %ptr
 ; CHECK-NEXT:    PartialAlias (off -3): i8* %gep.3, [16 x i8]* %ptr
 ; CHECK-NEXT:    MayAlias:  i8* %gep.3, i8* %gep.idx
 ;
-  load [16 x i8], [16 x i8]* %ptr
+  load [16 x i8], ptr %ptr
   %mul = mul i64 %idx, 5
   %sub = sub i64 %mul, 1
-  %gep.idx = getelementptr [16 x i8], [16 x i8]* %ptr, i32 0, i64 %sub
-  store i8 0, i8* %gep.idx, align 1
-  %gep.3 = getelementptr [16 x i8], [16 x i8]* %ptr, i32 0, i64 3
-  store i8 1, i8* %gep.3, align 1
+  %gep.idx = getelementptr [16 x i8], ptr %ptr, i32 0, i64 %sub
+  store i8 0, ptr %gep.idx, align 1
+  %gep.3 = getelementptr [16 x i8], ptr %ptr, i32 0, i64 3
+  store i8 1, ptr %gep.3, align 1
   ret void
 }
 
-define void @nuw_nsw_mul_sub_i64([16 x i8]* %ptr, i64 %idx) {
+define void @nuw_nsw_mul_sub_i64(ptr %ptr, i64 %idx) {
 ; CHECK-LABEL: Function: nuw_nsw_mul_sub_i64: 3 pointers, 0 call sites
 ; CHECK-NEXT:    MayAlias:  i8* %gep.idx, [16 x i8]* %ptr
 ; CHECK-NEXT:    PartialAlias (off -3): i8* %gep.3, [16 x i8]* %ptr
 ; CHECK-NEXT:    NoAlias:  i8* %gep.3, i8* %gep.idx
 ;
-  load [16 x i8], [16 x i8]* %ptr
+  load [16 x i8], ptr %ptr
   %mul = mul nuw nsw i64 %idx, 5
   %sub = sub nuw nsw i64 %mul, 1
-  %gep.idx = getelementptr [16 x i8], [16 x i8]* %ptr, i32 0, i64 %sub
-  store i8 0, i8* %gep.idx, align 1
-  %gep.3 = getelementptr [16 x i8], [16 x i8]* %ptr, i32 0, i64 3
-  store i8 1, i8* %gep.3, align 1
+  %gep.idx = getelementptr [16 x i8], ptr %ptr, i32 0, i64 %sub
+  store i8 0, ptr %gep.idx, align 1
+  %gep.3 = getelementptr [16 x i8], ptr %ptr, i32 0, i64 3
+  store i8 1, ptr %gep.3, align 1
   ret void
 }
 
-define void @only_nsw_mul_sub_i64([16 x i8]* %ptr, i64 %idx) {
+define void @only_nsw_mul_sub_i64(ptr %ptr, i64 %idx) {
 ; CHECK-LABEL: Function: only_nsw_mul_sub_i64: 3 pointers, 0 call sites
 ; CHECK-NEXT:    MayAlias:  i8* %gep.idx, [16 x i8]* %ptr
 ; CHECK-NEXT:    PartialAlias (off -3): i8* %gep.3, [16 x i8]* %ptr
 ; CHECK-NEXT:    NoAlias:  i8* %gep.3, i8* %gep.idx
 ;
-  load [16 x i8], [16 x i8]* %ptr
+  load [16 x i8], ptr %ptr
   %mul = mul nsw i64 %idx, 5
   %sub = sub nsw i64 %mul, 1
-  %gep.idx = getelementptr [16 x i8], [16 x i8]* %ptr, i32 0, i64 %sub
-  store i8 0, i8* %gep.idx, align 1
-  %gep.3 = getelementptr [16 x i8], [16 x i8]* %ptr, i32 0, i64 3
-  store i8 1, i8* %gep.3, align 1
+  %gep.idx = getelementptr [16 x i8], ptr %ptr, i32 0, i64 %sub
+  store i8 0, ptr %gep.idx, align 1
+  %gep.3 = getelementptr [16 x i8], ptr %ptr, i32 0, i64 3
+  store i8 1, ptr %gep.3, align 1
   ret void
 }
 
-define void @only_nuw_mul_sub_i64([16 x i8]* %ptr, i64 %idx) {
+define void @only_nuw_mul_sub_i64(ptr %ptr, i64 %idx) {
 ; CHECK-LABEL: Function: only_nuw_mul_sub_i64: 3 pointers, 0 call sites
 ; CHECK-NEXT:    MayAlias:  i8* %gep.idx, [16 x i8]* %ptr
 ; CHECK-NEXT:    PartialAlias (off -3): i8* %gep.3, [16 x i8]* %ptr
 ; CHECK-NEXT:    MayAlias:  i8* %gep.3, i8* %gep.idx
 ;
-  load [16 x i8], [16 x i8]* %ptr
+  load [16 x i8], ptr %ptr
   %mul = mul nuw i64 %idx, 5
   %sub = sub nuw i64 %mul, 1
-  %gep.idx = getelementptr [16 x i8], [16 x i8]* %ptr, i32 0, i64 %sub
-  store i8 0, i8* %gep.idx, align 1
-  %gep.3 = getelementptr [16 x i8], [16 x i8]* %ptr, i32 0, i64 3
-  store i8 1, i8* %gep.3, align 1
+  %gep.idx = getelementptr [16 x i8], ptr %ptr, i32 0, i64 %sub
+  store i8 0, ptr %gep.idx, align 1
+  %gep.3 = getelementptr [16 x i8], ptr %ptr, i32 0, i64 3
+  store i8 1, ptr %gep.3, align 1
   ret void
 }
 
 ; Even though the mul and sub may overflow %gep.idx and %gep.3 cannot alias
 ; because we multiply by a power-of-2.
-define void @may_overflow_mul_pow2_sub_i64([16 x i8]* %ptr, i64 %idx) {
+define void @may_overflow_mul_pow2_sub_i64(ptr %ptr, i64 %idx) {
 ; CHECK-LABEL: Function: may_overflow_mul_pow2_sub_i64: 3 pointers, 0 call sites
 ; CHECK-NEXT:    MayAlias:  i8* %gep.idx, [16 x i8]* %ptr
 ; CHECK-NEXT:    PartialAlias (off -3): i8* %gep.3, [16 x i8]* %ptr
 ; CHECK-NEXT:    NoAlias:  i8* %gep.3, i8* %gep.idx
 ;
-  load [16 x i8], [16 x i8]* %ptr
+  load [16 x i8], ptr %ptr
   %mul = mul i64 %idx, 8
   %sub = sub i64 %mul, 1
-  %gep.idx = getelementptr [16 x i8], [16 x i8]* %ptr, i32 0, i64 %sub
-  store i8 0, i8* %gep.idx, align 1
-  %gep.3 = getelementptr [16 x i8], [16 x i8]* %ptr, i32 0, i64 3
-  store i8 1, i8* %gep.3, align 1
+  %gep.idx = getelementptr [16 x i8], ptr %ptr, i32 0, i64 %sub
+  store i8 0, ptr %gep.idx, align 1
+  %gep.3 = getelementptr [16 x i8], ptr %ptr, i32 0, i64 3
+  store i8 1, ptr %gep.3, align 1
   ret void
 }
 
 ; Multiplies by power-of-2 preserves modulo and the sub does not wrap.
-define void @mul_pow2_sub_nsw_nuw_i64([16 x i8]* %ptr, i64 %idx) {
+define void @mul_pow2_sub_nsw_nuw_i64(ptr %ptr, i64 %idx) {
 ; CHECK-LABEL: Function: mul_pow2_sub_nsw_nuw_i64: 3 pointers, 0 call sites
 ; CHECK-NEXT:    MayAlias:  i8* %gep.idx, [16 x i8]* %ptr
 ; CHECK-NEXT:    PartialAlias (off -3): i8* %gep.3, [16 x i8]* %ptr
 ; CHECK-NEXT:    NoAlias:  i8* %gep.3, i8* %gep.idx
 ;
-  load [16 x i8], [16 x i8]* %ptr
+  load [16 x i8], ptr %ptr
   %mul = mul i64 %idx, 8
   %sub = sub nuw nsw i64 %mul, 1
-  %gep.idx = getelementptr [16 x i8], [16 x i8]* %ptr, i32 0, i64 %sub
-  store i8 0, i8* %gep.idx, align 1
-  %gep.3 = getelementptr [16 x i8], [16 x i8]* %ptr, i32 0, i64 3
-  store i8 1, i8* %gep.3, align 1
+  %gep.idx = getelementptr [16 x i8], ptr %ptr, i32 0, i64 %sub
+  store i8 0, ptr %gep.idx, align 1
+  %gep.3 = getelementptr [16 x i8], ptr %ptr, i32 0, i64 3
+  store i8 1, ptr %gep.3, align 1
   ret void
 }
 
-define void @may_overflow_shl_sub_i64([16 x i8]* %ptr, i64 %idx) {
+define void @may_overflow_shl_sub_i64(ptr %ptr, i64 %idx) {
 ; CHECK-LABEL: Function: may_overflow_shl_sub_i64: 3 pointers, 0 call sites
 ; CHECK-NEXT:    MayAlias:  i8* %gep.idx, [16 x i8]* %ptr
 ; CHECK-NEXT:    PartialAlias (off -3): i8* %gep.3, [16 x i8]* %ptr
 ; CHECK-NEXT:    MayAlias:  i8* %gep.3, i8* %gep.idx
 ;
-  load [16 x i8], [16 x i8]* %ptr
+  load [16 x i8], ptr %ptr
   %mul = shl i64 %idx, 2
   %sub = sub i64 %mul, 1
-  %gep.idx = getelementptr [16 x i8], [16 x i8]* %ptr, i32 0, i64 %sub
-  store i8 0, i8* %gep.idx, align 1
-  %gep.3 = getelementptr [16 x i8], [16 x i8]* %ptr, i32 0, i64 3
-  store i8 1, i8* %gep.3, align 1
+  %gep.idx = getelementptr [16 x i8], ptr %ptr, i32 0, i64 %sub
+  store i8 0, ptr %gep.idx, align 1
+  %gep.3 = getelementptr [16 x i8], ptr %ptr, i32 0, i64 3
+  store i8 1, ptr %gep.3, align 1
   ret void
 }
 
-define void @shl_sub_nsw_nuw_i64([16 x i8]* %ptr, i64 %idx) {
+define void @shl_sub_nsw_nuw_i64(ptr %ptr, i64 %idx) {
 ; CHECK-LABEL: Function: shl_sub_nsw_nuw_i64: 3 pointers, 0 call sites
 ; CHECK-NEXT:    MayAlias:  i8* %gep.idx, [16 x i8]* %ptr
 ; CHECK-NEXT:    PartialAlias (off -3): i8* %gep.3, [16 x i8]* %ptr
 ; CHECK-NEXT:    NoAlias:  i8* %gep.3, i8* %gep.idx
 ;
-  load [16 x i8], [16 x i8]* %ptr
+  load [16 x i8], ptr %ptr
   %mul = shl i64 %idx, 3
   %sub = sub nsw nuw i64 %mul, 1
-  %gep.idx = getelementptr [16 x i8], [16 x i8]* %ptr, i32 0, i64 %sub
-  store i8 0, i8* %gep.idx, align 1
-  %gep.3 = getelementptr [16 x i8], [16 x i8]* %ptr, i32 0, i64 3
-  store i8 1, i8* %gep.3, align 1
+  %gep.idx = getelementptr [16 x i8], ptr %ptr, i32 0, i64 %sub
+  store i8 0, ptr %gep.idx, align 1
+  %gep.3 = getelementptr [16 x i8], ptr %ptr, i32 0, i64 3
+  store i8 1, ptr %gep.3, align 1
   ret void
 }
 
 ; %gep.idx and %gep.3 must-alias if %mul overflows (e.g. %idx == 110).
-define void @may_overflow_i32_sext([16 x i8]* %ptr, i32 %idx) {
+define void @may_overflow_i32_sext(ptr %ptr, i32 %idx) {
 ; CHECK-LABEL: Function: may_overflow_i32_sext: 3 pointers, 0 call sites
 ; CHECK-NEXT:    MayAlias:  i8* %gep.idx, [16 x i8]* %ptr
 ; CHECK-NEXT:    PartialAlias (off -3):  i8* %gep.3, [16 x i8]* %ptr
 ; CHECK-NEXT:    MayAlias:  i8* %gep.3, i8* %gep.idx
 ;
-  load [16 x i8], [16 x i8]* %ptr
+  load [16 x i8], ptr %ptr
   %mul = mul i32 %idx, 678152731
   %sub = sub i32 %mul, 1582356375
   %sub.ext = sext i32 %sub to i64
-  %gep.idx = getelementptr [16 x i8], [16 x i8]* %ptr, i32 0, i64 %sub.ext
-  store i8 0, i8* %gep.idx, align 1
-  %gep.3 = getelementptr [16 x i8], [16 x i8]* %ptr, i32 0, i32 3
-  store i8 1, i8* %gep.3, align 1
+  %gep.idx = getelementptr [16 x i8], ptr %ptr, i32 0, i64 %sub.ext
+  store i8 0, ptr %gep.idx, align 1
+  %gep.3 = getelementptr [16 x i8], ptr %ptr, i32 0, i32 3
+  store i8 1, ptr %gep.3, align 1
   ret void
 }
 
-define void @nuw_nsw_i32_sext([16 x i8]* %ptr, i32 %idx) {
+define void @nuw_nsw_i32_sext(ptr %ptr, i32 %idx) {
 ; CHECK-LABEL: Function: nuw_nsw_i32_sext: 3 pointers, 0 call sites
 ; CHECK-NEXT:    NoAlias:  i8* %gep.idx, [16 x i8]* %ptr
 ; CHECK-NEXT:    PartialAlias (off -3):  i8* %gep.3, [16 x i8]* %ptr
 ; CHECK-NEXT:    NoAlias:   i8* %gep.3, i8* %gep.idx
 ;
-  load [16 x i8], [16 x i8]* %ptr
+  load [16 x i8], ptr %ptr
   %mul = mul nuw nsw i32 %idx, 678152731
   %sub = sub nuw nsw i32 %mul, 1582356375
   %sub.ext = sext i32 %sub to i64
-  %gep.idx = getelementptr [16 x i8], [16 x i8]* %ptr, i32 0, i64 %sub.ext
-  store i8 0, i8* %gep.idx, align 1
-  %gep.3 = getelementptr [16 x i8], [16 x i8]* %ptr, i32 0, i32 3
-  store i8 1, i8* %gep.3, align 1
+  %gep.idx = getelementptr [16 x i8], ptr %ptr, i32 0, i64 %sub.ext
+  store i8 0, ptr %gep.idx, align 1
+  %gep.3 = getelementptr [16 x i8], ptr %ptr, i32 0, i32 3
+  store i8 1, ptr %gep.3, align 1
   ret void
 }
 
 ; %gep.idx and %gep.3 must-alias if %mul overflows (e.g. %idx == 110).
-define void @may_overflow_i32_zext([16 x i8]* %ptr, i32 %idx) {
+define void @may_overflow_i32_zext(ptr %ptr, i32 %idx) {
 ; CHECK-LABEL: Function: may_overflow_i32_zext: 3 pointers, 0 call sites
 ; CHECK-NEXT:    MayAlias:  i8* %gep.idx, [16 x i8]* %ptr
 ; CHECK-NEXT:    PartialAlias (off -3):  i8* %gep.3, [16 x i8]* %ptr
 ; CHECK-NEXT:    MayAlias:  i8* %gep.3, i8* %gep.idx
 ;
-  load [16 x i8], [16 x i8]* %ptr
+  load [16 x i8], ptr %ptr
   %mul = mul i32 %idx, 678152731
   %sub = sub i32 %mul, 1582356375
   %sub.ext = zext i32 %sub to i64
-  %gep.idx = getelementptr [16 x i8], [16 x i8]* %ptr, i32 0, i64 %sub.ext
-  store i8 0, i8* %gep.idx, align 1
-  %gep.3 = getelementptr [16 x i8], [16 x i8]* %ptr, i32 0, i32 3
-  store i8 1, i8* %gep.3, align 1
+  %gep.idx = getelementptr [16 x i8], ptr %ptr, i32 0, i64 %sub.ext
+  store i8 0, ptr %gep.idx, align 1
+  %gep.3 = getelementptr [16 x i8], ptr %ptr, i32 0, i32 3
+  store i8 1, ptr %gep.3, align 1
   ret void
 }
 
-define void @nuw_nsw_i32_zext([16 x i8]* %ptr, i32 %idx) {
+define void @nuw_nsw_i32_zext(ptr %ptr, i32 %idx) {
 ; CHECK-LABEL: Function: nuw_nsw_i32_zext: 3 pointers, 0 call sites
 ; CHECK-NEXT:    NoAlias:  i8* %gep.idx, [16 x i8]* %ptr
 ; CHECK-NEXT:    PartialAlias (off -3):  i8* %gep.3, [16 x i8]* %ptr
 ; CHECK-NEXT:    NoAlias:   i8* %gep.3, i8* %gep.idx
 ;
-  load [16 x i8], [16 x i8]* %ptr
+  load [16 x i8], ptr %ptr
   %mul = mul nuw nsw i32 %idx, 678152731
   %sub = sub nuw nsw i32 %mul, 1582356375
   %sub.ext = zext i32 %sub to i64
-  %gep.idx = getelementptr [16 x i8], [16 x i8]* %ptr, i32 0, i64 %sub.ext
-  store i8 0, i8* %gep.idx, align 1
-  %gep.3 = getelementptr [16 x i8], [16 x i8]* %ptr, i32 0, i32 3
-  store i8 1, i8* %gep.3, align 1
+  %gep.idx = getelementptr [16 x i8], ptr %ptr, i32 0, i64 %sub.ext
+  store i8 0, ptr %gep.idx, align 1
+  %gep.3 = getelementptr [16 x i8], ptr %ptr, i32 0, i32 3
+  store i8 1, ptr %gep.3, align 1
   ret void
 }
 
 ; %mul.1 and %sub.2 are equal, if %idx = 9, because %mul.1 overflows. Hence
 ; %gep.mul.1 and %gep.sub.2 may alias.
-define void @may_overflow_pointer_
diff ([16 x i8]* %ptr, i64 %idx) {
+define void @may_overflow_pointer_
diff (ptr %ptr, i64 %idx) {
 ; CHECK-LABEL: Function: may_overflow_pointer_
diff : 3 pointers, 0 call sites
 ; CHECK-NEXT:  MayAlias: i8* %gep.mul.1, [16 x i8]* %ptr
 ; CHECK-NEXT:  MayAlias: i8* %gep.sub.2, [16 x i8]* %ptr
 ; CHECK-NEXT:  MayAlias:  i8* %gep.mul.1, i8* %gep.sub.2
 ;
-  load [16 x i8], [16 x i8]* %ptr
+  load [16 x i8], ptr %ptr
   %mul.1 = mul i64 %idx, 6148914691236517207
-  %gep.mul.1  = getelementptr [16 x i8], [16 x i8]* %ptr, i32 0, i64 %mul.1
-  store i8 1, i8* %gep.mul.1, align 1
+  %gep.mul.1  = getelementptr [16 x i8], ptr %ptr, i32 0, i64 %mul.1
+  store i8 1, ptr %gep.mul.1, align 1
   %mul.2 = mul nsw i64 %idx, 3
   %sub.2 = sub nsw i64 %mul.2, 12
-  %gep.sub.2= getelementptr [16 x i8], [16 x i8]* %ptr, i32 0, i64 %sub.2
-  store i8 0, i8* %gep.sub.2, align 1
+  %gep.sub.2= getelementptr [16 x i8], ptr %ptr, i32 0, i64 %sub.2
+  store i8 0, ptr %gep.sub.2, align 1
 
   ret void
 }
 
 ; %gep.1 and %gep.idx may alias, e.g. if %idx.1 = 8 and %idx.2 == 2. %gep.idx is then
 ;  (((18446744073709551614 * 8) % 2^64 + 6 * 2) % 2^64 + 10) % 2^64 == 6.
-define void @may_overflow_mul_scale_neg([200 x [ 6 x i8]]* %ptr, i64 %idx.1,i64 %idx.2) {
+define void @may_overflow_mul_scale_neg(ptr %ptr, i64 %idx.1,i64 %idx.2) {
 ; CHECK-LABEL: Function: may_overflow_mul_scale_neg: 4 pointers, 2 call sites
-; CHECK-NEXT:  MustAlias:   i8* %bc, [200 x [6 x i8]]* %ptr
+; CHECK-NEXT:  MustAlias:   i8* %ptr, [200 x [6 x i8]]* %ptr
 ; CHECK-NEXT:  PartialAlias (off -6):    i8* %gep.1, [200 x [6 x i8]]* %ptr
-; CHECK-NEXT:  NoAlias: i8* %bc, i8* %gep.1
+; CHECK-NEXT:  NoAlias: i8* %gep.1, i8* %ptr
 ; CHECK-NEXT:  MayAlias:    i8* %gep.idx, [200 x [6 x i8]]* %ptr
-; CHECK-NEXT:  MayAlias: i8* %bc, i8* %gep.idx
+; CHECK-NEXT:  MayAlias: i8* %gep.idx, i8* %ptr
 ; CHECK-NEXT:  MayAlias: i8* %gep.1, i8* %gep.idx
 ;
-  load [200 x [6 x i8]], [200 x [6 x i8]]* %ptr
+  load [200 x [6 x i8]], ptr %ptr
   %idx.1.pos = icmp sge i64 %idx.1, 0
   call void @llvm.assume(i1 %idx.1.pos)
   %idx.2.pos = icmp sge i64 %idx.2, 0
   call void @llvm.assume(i1 %idx.2.pos)
 
-  %bc = bitcast [ 200 x [ 6 x i8 ] ]* %ptr to i8*
-  load i8, i8* %bc
-  %gep.1 = getelementptr i8, i8* %bc, i64 6
-  store i8 1, i8* %gep.1, align 1
+  load i8, ptr %ptr
+  %gep.1 = getelementptr i8, ptr %ptr, i64 6
+  store i8 1, ptr %gep.1, align 1
 
   %mul.0 = mul i64 %idx.1, -2
   %add = add i64 %mul.0, 10
-  %gep.idx = getelementptr [ 200 x [ 6 x i8 ] ], [ 200 x [ 6 x i8 ] ]* %ptr, i64 0, i64 %idx.2, i64 %add
-  store i8 0, i8* %gep.idx, align 1
+  %gep.idx = getelementptr [ 200 x [ 6 x i8 ] ], ptr %ptr, i64 0, i64 %idx.2, i64 %add
+  store i8 0, ptr %gep.idx, align 1
   ret void
 }
 
 ; If %v == 10581764700698480926, %idx == 917, so %gep.917 and %gep.idx may alias.
-define i8 @mul_may_overflow_var_nonzero_minabsvarindex_one_index([2000 x i8]* %arr, i8 %x, i64 %v) {
+define i8 @mul_may_overflow_var_nonzero_minabsvarindex_one_index(ptr %arr, i8 %x, i64 %v) {
 ; CHECK-LABEL: Function: mul_may_overflow_var_nonzero_minabsvarindex_one_index: 4 pointers, 0 call sites
 ; CHECK-NEXT:  MayAlias: [2000 x i8]* %arr, i8* %gep.idx
 ; CHECK-NEXT:  PartialAlias (off 917): [2000 x i8]* %arr, i8* %gep.917
@@ -330,19 +329,19 @@ define i8 @mul_may_overflow_var_nonzero_minabsvarindex_one_index([2000 x i8]* %a
 ; CHECK-NEXT:  NoAlias: i8* %gep.0, i8* %gep.idx
 ; CHECK-NEXT:  NoAlias: i8* %gep.0, i8* %gep.917
 ;
-  load [2000 x i8], [2000 x i8]* %arr
+  load [2000 x i8], ptr %arr
   %or = or i64 %v, 1
   %idx = mul i64 %or, 1844674407370955
-  %gep.idx = getelementptr inbounds [2000 x i8], [2000 x i8]* %arr, i32 0, i64 %idx
-  %l = load i8, i8* %gep.idx
-  %gep.917 = getelementptr inbounds [2000 x i8], [2000 x i8]* %arr, i32 0, i32 917
-  store i8 0, i8* %gep.917
-  %gep.0 = getelementptr inbounds [2000 x i8], [2000 x i8]* %arr, i32 0, i32 0
-  store i8 0, i8* %gep.0
+  %gep.idx = getelementptr inbounds [2000 x i8], ptr %arr, i32 0, i64 %idx
+  %l = load i8, ptr %gep.idx
+  %gep.917 = getelementptr inbounds [2000 x i8], ptr %arr, i32 0, i32 917
+  store i8 0, ptr %gep.917
+  %gep.0 = getelementptr inbounds [2000 x i8], ptr %arr, i32 0, i32 0
+  store i8 0, ptr %gep.0
   ret i8 %l
 }
 
-define i8 @mul_nsw_var_nonzero_minabsvarindex_one_index([2000 x i8]* %arr, i8 %x, i64 %v) {
+define i8 @mul_nsw_var_nonzero_minabsvarindex_one_index(ptr %arr, i8 %x, i64 %v) {
 ; CHECK-LABEL: Function: mul_nsw_var_nonzero_minabsvarindex_one_index: 4 pointers, 0 call sites
 ; CHECK-NEXT:  NoAlias: [2000 x i8]* %arr, i8* %gep.idx
 ; CHECK-NEXT:  PartialAlias (off 917): [2000 x i8]* %arr, i8* %gep.917
@@ -351,15 +350,15 @@ define i8 @mul_nsw_var_nonzero_minabsvarindex_one_index([2000 x i8]* %arr, i8 %x
 ; CHECK-NEXT:  NoAlias: i8* %gep.0, i8* %gep.idx
 ; CHECK-NEXT:  NoAlias: i8* %gep.0, i8* %gep.917
 ;
-  load [2000 x i8], [2000 x i8]* %arr
+  load [2000 x i8], ptr %arr
   %or = or i64 %v, 1
   %idx = mul nsw i64 %or, 1844674407370955
-  %gep.idx = getelementptr inbounds [2000 x i8], [2000 x i8]* %arr, i32 0, i64 %idx
-  %l = load i8, i8* %gep.idx
-  %gep.917 = getelementptr inbounds [2000 x i8], [2000 x i8]* %arr, i32 0, i32 917
-  store i8 0, i8* %gep.917
-  %gep.0 = getelementptr inbounds [2000 x i8], [2000 x i8]* %arr, i32 0, i32 0
-  store i8 0, i8* %gep.0
+  %gep.idx = getelementptr inbounds [2000 x i8], ptr %arr, i32 0, i64 %idx
+  %l = load i8, ptr %gep.idx
+  %gep.917 = getelementptr inbounds [2000 x i8], ptr %arr, i32 0, i32 917
+  store i8 0, ptr %gep.917
+  %gep.0 = getelementptr inbounds [2000 x i8], ptr %arr, i32 0, i32 0
+  store i8 0, ptr %gep.0
   ret i8 %l
 }
 

diff  --git a/llvm/test/Analysis/BasicAA/guards.ll b/llvm/test/Analysis/BasicAA/guards.ll
index 8ab8b362854e..4f427893bb40 100644
--- a/llvm/test/Analysis/BasicAA/guards.ll
+++ b/llvm/test/Analysis/BasicAA/guards.ll
@@ -1,25 +1,25 @@
 ; RUN: opt < %s -aa-pipeline=basic-aa -passes=aa-eval -print-all-alias-modref-info -disable-output 2>&1 | FileCheck %s
 target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:32:64-v128:32:128-a0:0:32-n32"
 
-declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i1) #0
+declare void @llvm.memcpy.p0.p0.i64(ptr nocapture, ptr nocapture, i64, i1) #0
 declare void @llvm.experimental.guard(i1, ...)
 declare void @unknown_but_readonly() readonly
 
-define void @test1(i8* %P, i8* %Q) {
-  load i8, i8* %P
-  load i8, i8* %Q
+define void @test1(ptr %P, ptr %Q) {
+  load i8, ptr %P
+  load i8, ptr %Q
   tail call void(i1,...) @llvm.experimental.guard(i1 true) [ "deopt"() ]
-  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
+  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
   ret void
 
 ; CHECK-LABEL: Function: test1:
 
 ; CHECK:  Just Ref:  Ptr: i8* %P	<->  tail call void (i1, ...) @llvm.experimental.guard(i1 true) [ "deopt"() ]
 ; CHECK:  Just Ref:  Ptr: i8* %Q	<->  tail call void (i1, ...) @llvm.experimental.guard(i1 true) [ "deopt"() ]
-; CHECK:  Both ModRef:  Ptr: i8* %P	<->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-; CHECK:  Both ModRef:  Ptr: i8* %Q	<->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-; CHECK:  Just Ref:   tail call void (i1, ...) @llvm.experimental.guard(i1 true) [ "deopt"() ] <->   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-; CHECK:  Just Mod:   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false) <->   tail call void (i1, ...) @llvm.experimental.guard(i1 true) [ "deopt"() ]
+; CHECK:  Both ModRef:  Ptr: i8* %P	<->  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+; CHECK:  Both ModRef:  Ptr: i8* %Q	<->  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+; CHECK:  Just Ref:   tail call void (i1, ...) @llvm.experimental.guard(i1 true) [ "deopt"() ] <->   tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+; CHECK:  Just Mod:   tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false) <->   tail call void (i1, ...) @llvm.experimental.guard(i1 true) [ "deopt"() ]
 }
 
 define void @test2() {

diff  --git a/llvm/test/Analysis/BasicAA/index-size.ll b/llvm/test/Analysis/BasicAA/index-size.ll
index 0d360ec1ae3d..61d85baf0021 100644
--- a/llvm/test/Analysis/BasicAA/index-size.ll
+++ b/llvm/test/Analysis/BasicAA/index-size.ll
@@ -4,16 +4,16 @@ target datalayout = "p:64:64:64:32"
 
 ; gep.1 and gep.2 must alias, because they are truncated to the index size
 ; (32-bit), not the pointer size (64-bit).
-define void @mustalias_due_to_index_size(i8* %ptr) {
+define void @mustalias_due_to_index_size(ptr %ptr) {
 ; CHECK-LABEL: Function: mustalias_due_to_index_size
 ; CHECK-NEXT: MustAlias: i8* %gep.1, i8* %ptr
 ; CHECK-NEXT: MustAlias: i8* %gep.2, i8* %ptr
 ; CHECK-NEXT: MustAlias: i8* %gep.1, i8* %gep.2
 ;
-  load i8, i8* %ptr
-  %gep.1 = getelementptr i8, i8* %ptr, i64 4294967296
-  store i8 0, i8* %gep.1
+  load i8, ptr %ptr
+  %gep.1 = getelementptr i8, ptr %ptr, i64 4294967296
+  store i8 0, ptr %gep.1
   %gep.2 = getelementptr i8, i8* %ptr, i64 0
-  store i8 1, i8* %gep.2
+  store i8 1, ptr %gep.2
   ret void
 }

diff  --git a/llvm/test/Analysis/BasicAA/invariant_group.ll b/llvm/test/Analysis/BasicAA/invariant_group.ll
index 16438a9a06a1..ead1d7d8c86b 100644
--- a/llvm/test/Analysis/BasicAA/invariant_group.ll
+++ b/llvm/test/Analysis/BasicAA/invariant_group.ll
@@ -11,41 +11,40 @@
 ;     return __builtin_launder(&a)->n;
 ; }
 
-%struct.A = type <{ i8*, i8 }>
+%struct.A = type <{ ptr, i8 }>
 
 ; CHECK: testLaunderInvariantGroupIsNotEscapeSource
 ; CHECK-GVN: testLaunderInvariantGroupIsNotEscapeSource
 define i8 @testLaunderInvariantGroupIsNotEscapeSource() {
-; CHECK-DAG: MustAlias: %struct.A* %a, i8* %a.bitcast
-; CHECK-DAG: PartialAlias (off {{[0-9]+}}): %struct.A* %a, i8* %n
-; CHECK-DAG: NoAlias: i8* %a.bitcast, i8* %n
-; CHECK-DAG: MustAlias: %struct.A* %a, i8* %a.laundered
-; CHECK-DAG: MustAlias: i8* %a.bitcast, i8* %a.laundered
-; CHECK-DAG: NoAlias: i8* %a.laundered, i8* %n
-; CHECK-DAG: PartialAlias (off {{[0-9]+}}): %struct.A* %a, i8* %n.laundered
-; CHECK-DAG: NoAlias: i8* %a.bitcast, i8* %n.laundered
-; CHECK-DAG: MustAlias: i8* %n, i8* %n.laundered
-; CHECK-DAG: NoAlias: i8* %a.laundered, i8* %n.laundered
-; CHECK-DAG: NoModRef: Ptr: %struct.A* %a <-> %a.laundered = call i8* @llvm.launder.invariant.group.p0i8(i8* nonnull %a.bitcast)
-; CHECK-DAG: NoModRef: Ptr: i8* %a.bitcast <-> %a.laundered = call i8* @llvm.launder.invariant.group.p0i8(i8* nonnull %a.bitcast)
-; CHECK-DAG: NoModRef: Ptr: i8* %n <-> %a.laundered = call i8* @llvm.launder.invariant.group.p0i8(i8* nonnull %a.bitcast)
-; CHECK-DAG: NoModRef: Ptr: i8* %a.laundered <-> %a.laundered = call i8* @llvm.launder.invariant.group.p0i8(i8* nonnull %a.bitcast)
-; CHECK-DAG: NoModRef: Ptr: i8* %n.laundered <-> %a.laundered = call i8* @llvm.launder.invariant.group.p0i8(i8* nonnull %a.bitcast)
+; CHECK-DAG: MustAlias:	i8* %a, %struct.A* %a
+; CHECK-DAG: PartialAlias (off 8):	%struct.A* %a, i8* %n
+; CHECK-DAG: NoAlias:	i8* %a, i8* %n
+; CHECK-DAG: MustAlias:	%struct.A* %a, i8* %a.laundered
+; CHECK-DAG: MustAlias:	i8* %a, i8* %a.laundered
+; CHECK-DAG: NoAlias:	i8* %a.laundered, i8* %n
+; CHECK-DAG: PartialAlias (off 8):	%struct.A* %a, i8* %n.laundered
+; CHECK-DAG: NoAlias:	i8* %a, i8* %n.laundered
+; CHECK-DAG: MustAlias:	i8* %n, i8* %n.laundered
+; CHECK-DAG: NoAlias:	i8* %a.laundered, i8* %n.laundered
+; CHECK-DAG: NoModRef: Ptr: %struct.A* %a <-> %a.laundered = call ptr @llvm.launder.invariant.group.p0(ptr nonnull %a)
+; CHECK-DAG: NoModRef: Ptr: i8* %a <-> %a.laundered = call ptr @llvm.launder.invariant.group.p0(ptr nonnull %a)
+; CHECK-DAG: NoModRef: Ptr: i8* %n <-> %a.laundered = call ptr @llvm.launder.invariant.group.p0(ptr nonnull %a)
+; CHECK-DAG: NoModRef: Ptr: i8* %a.laundered <-> %a.laundered = call ptr @llvm.launder.invariant.group.p0(ptr nonnull %a)
+; CHECK-DAG: NoModRef: Ptr: i8* %n.laundered <-> %a.laundered = call ptr @llvm.launder.invariant.group.p0(ptr nonnull %a)
 
 entry:
   %a = alloca %struct.A, align 8
-  %a.bitcast = bitcast %struct.A* %a to i8*
-  load %struct.A, %struct.A* %a
-  load i8, i8* %a.bitcast
-  %n = getelementptr inbounds %struct.A, %struct.A* %a, i64 0, i32 1
-  store i8 42, i8* %n
-  %a.laundered = call i8* @llvm.launder.invariant.group.p0i8(i8* nonnull %a.bitcast)
-  load i8, i8* %a.laundered
-  %n.laundered = getelementptr inbounds i8, i8* %a.laundered, i64 8
-  %v = load i8, i8* %n.laundered
+  load %struct.A, ptr %a
+  load i8, ptr %a
+  %n = getelementptr inbounds %struct.A, ptr %a, i64 0, i32 1
+  store i8 42, ptr %n
+  %a.laundered = call ptr @llvm.launder.invariant.group.p0(ptr nonnull %a)
+  load i8, ptr %a.laundered
+  %n.laundered = getelementptr inbounds i8, ptr %a.laundered, i64 8
+  %v = load i8, ptr %n.laundered
 ; make sure that the load from %n.laundered to %v aliases the store of 42 to %n
 ; CHECK-GVN: ret i8 42
   ret i8 %v
 }
 
-declare i8* @llvm.launder.invariant.group.p0i8(i8*)
+declare ptr @llvm.launder.invariant.group.p0(ptr)

diff  --git a/llvm/test/Analysis/BasicAA/libfuncs-darwin.ll b/llvm/test/Analysis/BasicAA/libfuncs-darwin.ll
index 8b8051460b92..a1611e2f4c7c 100644
--- a/llvm/test/Analysis/BasicAA/libfuncs-darwin.ll
+++ b/llvm/test/Analysis/BasicAA/libfuncs-darwin.ll
@@ -1,134 +1,134 @@
 ; RUN: opt -mtriple=x86_64-apple-macosx10.7 -aa-pipeline=basic-aa -passes=inferattrs,aa-eval -print-all-alias-modref-info -disable-output 2>&1 %s | FileCheck %s
 
-declare void @memset_pattern4(i8*, i8*, i64)
-declare void @memset_pattern8(i8*, i8*, i64)
-declare void @memset_pattern16(i8*, i8*, i64)
+declare void @memset_pattern4(ptr, ptr, i64)
+declare void @memset_pattern8(ptr, ptr, i64)
+declare void @memset_pattern16(ptr, ptr, i64)
 
-define void @test_memset_pattern4_const_size(i8* noalias %a, i8* noalias %pattern) {
+define void @test_memset_pattern4_const_size(ptr noalias %a, ptr noalias %pattern) {
 ; CHECK-LABEL: Function: test_memset_pattern4_const_size
-; CHECK:       Just Mod:  Ptr: i8* %a	<->  call void @memset_pattern4(i8* %a, i8* %pattern, i64 17)
-; CHECK-NEXT:  Just Ref:  Ptr: i8* %pattern	<->  call void @memset_pattern4(i8* %a, i8* %pattern, i64 17)
-; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.1	<->  call void @memset_pattern4(i8* %a, i8* %pattern, i64 17)
-; CHECK-NEXT:  NoModRef:  Ptr: i8* %a.gep.17	<->  call void @memset_pattern4(i8* %a, i8* %pattern, i64 17)
-; CHECK-NEXT:  Just Ref:  Ptr: i8* %pattern.gep.3	<->  call void @memset_pattern4(i8* %a, i8* %pattern, i64 17)
-; CHECK-NEXT:  NoModRef:  Ptr: i8* %pattern.gep.4	<->  call void @memset_pattern4(i8* %a, i8* %pattern, i64 17)
+; CHECK:       Just Mod:  Ptr: i8* %a	<->  call void @memset_pattern4(ptr %a, ptr %pattern, i64 17)
+; CHECK-NEXT:  Just Ref:  Ptr: i8* %pattern	<->  call void @memset_pattern4(ptr %a, ptr %pattern, i64 17)
+; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.1	<->  call void @memset_pattern4(ptr %a, ptr %pattern, i64 17)
+; CHECK-NEXT:  NoModRef:  Ptr: i8* %a.gep.17	<->  call void @memset_pattern4(ptr %a, ptr %pattern, i64 17)
+; CHECK-NEXT:  Just Ref:  Ptr: i8* %pattern.gep.3	<->  call void @memset_pattern4(ptr %a, ptr %pattern, i64 17)
+; CHECK-NEXT:  NoModRef:  Ptr: i8* %pattern.gep.4	<->  call void @memset_pattern4(ptr %a, ptr %pattern, i64 17)
 ;
 entry:
-  load i8, i8* %a
-  load i8, i8* %pattern
-  call void @memset_pattern4(i8* %a, i8* %pattern, i64 17)
-  %a.gep.1 = getelementptr i8, i8* %a, i32 1
-  store i8 0, i8* %a.gep.1
-  %a.gep.17 = getelementptr i8, i8* %a, i32 17
-  store i8 1, i8* %a.gep.17
+  load i8, ptr %a
+  load i8, ptr %pattern
+  call void @memset_pattern4(ptr %a, ptr %pattern, i64 17)
+  %a.gep.1 = getelementptr i8, ptr %a, i32 1
+  store i8 0, ptr %a.gep.1
+  %a.gep.17 = getelementptr i8, ptr %a, i32 17
+  store i8 1, ptr %a.gep.17
 
-  %pattern.gep.3 = getelementptr i8, i8* %pattern, i32 3
-  store i8 1, i8* %pattern.gep.3
-  %pattern.gep.4 = getelementptr i8, i8* %pattern, i32 4
-  store i8 1, i8* %pattern.gep.4
+  %pattern.gep.3 = getelementptr i8, ptr %pattern, i32 3
+  store i8 1, ptr %pattern.gep.3
+  %pattern.gep.4 = getelementptr i8, ptr %pattern, i32 4
+  store i8 1, ptr %pattern.gep.4
   ret void
 }
 
-define void @test_memset_pattern4_variable_size(i8* noalias %a, i8* noalias %pattern, i64 %n) {
+define void @test_memset_pattern4_variable_size(ptr noalias %a, ptr noalias %pattern, i64 %n) {
 ; CHECK-LABEL: Function: test_memset_pattern4_variable_size
-; CHECK:       Just Mod:  Ptr: i8* %a	<->  call void @memset_pattern4(i8* %a, i8* %pattern, i64 %n)
-; CHECK-NEXT:  Just Ref:  Ptr: i8* %pattern	<->  call void @memset_pattern4(i8* %a, i8* %pattern, i64 %n)
-; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.1	<->  call void @memset_pattern4(i8* %a, i8* %pattern, i64 %n)
-; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.17	<->  call void @memset_pattern4(i8* %a, i8* %pattern, i64 %n)
+; CHECK:       Just Mod:  Ptr: i8* %a	<->  call void @memset_pattern4(ptr %a, ptr %pattern, i64 %n)
+; CHECK-NEXT:  Just Ref:  Ptr: i8* %pattern	<->  call void @memset_pattern4(ptr %a, ptr %pattern, i64 %n)
+; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.1	<->  call void @memset_pattern4(ptr %a, ptr %pattern, i64 %n)
+; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.17	<->  call void @memset_pattern4(ptr %a, ptr %pattern, i64 %n)
 ;
 entry:
-  load i8, i8* %a
-  load i8, i8* %pattern
-  call void @memset_pattern4(i8* %a, i8* %pattern, i64 %n)
-  %a.gep.1 = getelementptr i8, i8* %a, i32 1
-  store i8 0, i8* %a.gep.1
-  %a.gep.17 = getelementptr i8, i8* %a, i32 17
-  store i8 1, i8* %a.gep.17
+  load i8, ptr %a
+  load i8, ptr %pattern
+  call void @memset_pattern4(ptr %a, ptr %pattern, i64 %n)
+  %a.gep.1 = getelementptr i8, ptr %a, i32 1
+  store i8 0, ptr %a.gep.1
+  %a.gep.17 = getelementptr i8, ptr %a, i32 17
+  store i8 1, ptr %a.gep.17
   ret void
 }
 
-define void @test_memset_pattern8_const_size(i8* noalias %a, i8* noalias %pattern) {
+define void @test_memset_pattern8_const_size(ptr noalias %a, ptr noalias %pattern) {
 ; CHECK-LABEL: Function: test_memset_pattern8_const_size
-; CHECK:       Just Mod:  Ptr: i8* %a	<->  call void @memset_pattern8(i8* %a, i8* %pattern, i64 17)
-; CHECK-NEXT:  Just Ref:  Ptr: i8* %pattern	<->  call void @memset_pattern8(i8* %a, i8* %pattern, i64 17)
-; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.1	<->  call void @memset_pattern8(i8* %a, i8* %pattern, i64 17)
-; CHECK-NEXT:  NoModRef:  Ptr: i8* %a.gep.17	<->  call void @memset_pattern8(i8* %a, i8* %pattern, i64 17)
-; CHECK-NEXT:  Just Ref:  Ptr: i8* %pattern.gep.7	<->  call void @memset_pattern8(i8* %a, i8* %pattern, i64 17)
-; CHECK-NEXT:  NoModRef:  Ptr: i8* %pattern.gep.8	<->  call void @memset_pattern8(i8* %a, i8* %pattern, i64 17)
+; CHECK:       Just Mod:  Ptr: i8* %a	<->  call void @memset_pattern8(ptr %a, ptr %pattern, i64 17)
+; CHECK-NEXT:  Just Ref:  Ptr: i8* %pattern	<->  call void @memset_pattern8(ptr %a, ptr %pattern, i64 17)
+; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.1	<->  call void @memset_pattern8(ptr %a, ptr %pattern, i64 17)
+; CHECK-NEXT:  NoModRef:  Ptr: i8* %a.gep.17	<->  call void @memset_pattern8(ptr %a, ptr %pattern, i64 17)
+; CHECK-NEXT:  Just Ref:  Ptr: i8* %pattern.gep.7	<->  call void @memset_pattern8(ptr %a, ptr %pattern, i64 17)
+; CHECK-NEXT:  NoModRef:  Ptr: i8* %pattern.gep.8	<->  call void @memset_pattern8(ptr %a, ptr %pattern, i64 17)
 ;
 entry:
-  load i8, i8* %a
-  load i8, i8* %pattern
-  call void @memset_pattern8(i8* %a, i8* %pattern, i64 17)
-  %a.gep.1 = getelementptr i8, i8* %a, i32 1
-  store i8 0, i8* %a.gep.1
-  %a.gep.17 = getelementptr i8, i8* %a, i32 17
-  store i8 1, i8* %a.gep.17
+  load i8, ptr %a
+  load i8, ptr %pattern
+  call void @memset_pattern8(ptr %a, ptr %pattern, i64 17)
+  %a.gep.1 = getelementptr i8, ptr %a, i32 1
+  store i8 0, ptr %a.gep.1
+  %a.gep.17 = getelementptr i8, ptr %a, i32 17
+  store i8 1, ptr %a.gep.17
 
-  %pattern.gep.7 = getelementptr i8, i8* %pattern, i32 7
-  store i8 1, i8* %pattern.gep.7
-  %pattern.gep.8 = getelementptr i8, i8* %pattern, i32 8
-  store i8 1, i8* %pattern.gep.8
+  %pattern.gep.7 = getelementptr i8, ptr %pattern, i32 7
+  store i8 1, ptr %pattern.gep.7
+  %pattern.gep.8 = getelementptr i8, ptr %pattern, i32 8
+  store i8 1, ptr %pattern.gep.8
   ret void
 }
 
-define void @test_memset_pattern8_variable_size(i8* noalias %a, i8* noalias %pattern, i64 %n) {
+define void @test_memset_pattern8_variable_size(ptr noalias %a, ptr noalias %pattern, i64 %n) {
 ; CHECK-LABEL: Function: test_memset_pattern8_variable_size
-; CHECK:       Just Mod:  Ptr: i8* %a	<->  call void @memset_pattern8(i8* %a, i8* %pattern, i64 %n)
-; CHECK-NEXT:  Just Ref:  Ptr: i8* %pattern	<->  call void @memset_pattern8(i8* %a, i8* %pattern, i64 %n)
-; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.1	<->  call void @memset_pattern8(i8* %a, i8* %pattern, i64 %n)
-; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.17	<->  call void @memset_pattern8(i8* %a, i8* %pattern, i64 %n)
+; CHECK:       Just Mod:  Ptr: i8* %a	<->  call void @memset_pattern8(ptr %a, ptr %pattern, i64 %n)
+; CHECK-NEXT:  Just Ref:  Ptr: i8* %pattern	<->  call void @memset_pattern8(ptr %a, ptr %pattern, i64 %n)
+; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.1	<->  call void @memset_pattern8(ptr %a, ptr %pattern, i64 %n)
+; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.17	<->  call void @memset_pattern8(ptr %a, ptr %pattern, i64 %n)
 ;
 entry:
-  load i8, i8* %a
-  load i8, i8* %pattern
-  call void @memset_pattern8(i8* %a, i8* %pattern, i64 %n)
-  %a.gep.1 = getelementptr i8, i8* %a, i32 1
-  store i8 0, i8* %a.gep.1
-  %a.gep.17 = getelementptr i8, i8* %a, i32 17
-  store i8 1, i8* %a.gep.17
+  load i8, ptr %a
+  load i8, ptr %pattern
+  call void @memset_pattern8(ptr %a, ptr %pattern, i64 %n)
+  %a.gep.1 = getelementptr i8, ptr %a, i32 1
+  store i8 0, ptr %a.gep.1
+  %a.gep.17 = getelementptr i8, ptr %a, i32 17
+  store i8 1, ptr %a.gep.17
   ret void
 }
 
-define void @test_memset_pattern16_const_size(i8* noalias %a, i8* noalias %pattern) {
+define void @test_memset_pattern16_const_size(ptr noalias %a, ptr noalias %pattern) {
 ; CHECK-LABEL: Function: test_memset_pattern16_const_size
-; CHECK:       Just Mod:  Ptr: i8* %a	<->  call void @memset_pattern16(i8* %a, i8* %pattern, i64 17)
-; CHECK-NEXT:  Just Ref:  Ptr: i8* %pattern	<->  call void @memset_pattern16(i8* %a, i8* %pattern, i64 17)
-; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.1	<->  call void @memset_pattern16(i8* %a, i8* %pattern, i64 17)
-; CHECK-NEXT:  NoModRef:  Ptr: i8* %a.gep.17	<->  call void @memset_pattern16(i8* %a, i8* %pattern, i64 17)
-; CHECK-NEXT:  Just Ref:  Ptr: i8* %pattern.gep.15	<->  call void @memset_pattern16(i8* %a, i8* %pattern, i64 17)
-; CHECK-NEXT:  NoModRef:  Ptr: i8* %pattern.gep.16	<->  call void @memset_pattern16(i8* %a, i8* %pattern, i64 17)
+; CHECK:       Just Mod:  Ptr: i8* %a	<->  call void @memset_pattern16(ptr %a, ptr %pattern, i64 17)
+; CHECK-NEXT:  Just Ref:  Ptr: i8* %pattern	<->  call void @memset_pattern16(ptr %a, ptr %pattern, i64 17)
+; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.1	<->  call void @memset_pattern16(ptr %a, ptr %pattern, i64 17)
+; CHECK-NEXT:  NoModRef:  Ptr: i8* %a.gep.17	<->  call void @memset_pattern16(ptr %a, ptr %pattern, i64 17)
+; CHECK-NEXT:  Just Ref:  Ptr: i8* %pattern.gep.15	<->  call void @memset_pattern16(ptr %a, ptr %pattern, i64 17)
+; CHECK-NEXT:  NoModRef:  Ptr: i8* %pattern.gep.16	<->  call void @memset_pattern16(ptr %a, ptr %pattern, i64 17)
 ;
 entry:
-  load i8, i8* %a
-  load i8, i8* %pattern
-  call void @memset_pattern16(i8* %a, i8* %pattern, i64 17)
-  %a.gep.1 = getelementptr i8, i8* %a, i32 1
-  store i8 0, i8* %a.gep.1
-  %a.gep.17 = getelementptr i8, i8* %a, i32 17
-  store i8 1, i8* %a.gep.17
+  load i8, ptr %a
+  load i8, ptr %pattern
+  call void @memset_pattern16(ptr %a, ptr %pattern, i64 17)
+  %a.gep.1 = getelementptr i8, ptr %a, i32 1
+  store i8 0, ptr %a.gep.1
+  %a.gep.17 = getelementptr i8, ptr %a, i32 17
+  store i8 1, ptr %a.gep.17
 
-  %pattern.gep.15 = getelementptr i8, i8* %pattern, i32 15
-  store i8 1, i8* %pattern.gep.15
-  %pattern.gep.16 = getelementptr i8, i8* %pattern, i32 16
-  store i8 1, i8* %pattern.gep.16
+  %pattern.gep.15 = getelementptr i8, ptr %pattern, i32 15
+  store i8 1, ptr %pattern.gep.15
+  %pattern.gep.16 = getelementptr i8, ptr %pattern, i32 16
+  store i8 1, ptr %pattern.gep.16
   ret void
 }
 
-define void @test_memset_pattern16_variable_size(i8* noalias %a, i8* noalias %pattern, i64 %n) {
+define void @test_memset_pattern16_variable_size(ptr noalias %a, ptr noalias %pattern, i64 %n) {
 ; CHECK-LABEL: Function: test_memset_pattern16_variable_size
-; CHECK:       Just Mod:  Ptr: i8* %a	<->  call void @memset_pattern16(i8* %a, i8* %pattern, i64 %n)
-; CHECK-NEXT:  Just Ref:  Ptr: i8* %pattern	<->  call void @memset_pattern16(i8* %a, i8* %pattern, i64 %n)
-; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.1	<->  call void @memset_pattern16(i8* %a, i8* %pattern, i64 %n)
-; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.17	<->  call void @memset_pattern16(i8* %a, i8* %pattern, i64 %n)
+; CHECK:       Just Mod:  Ptr: i8* %a	<->  call void @memset_pattern16(ptr %a, ptr %pattern, i64 %n)
+; CHECK-NEXT:  Just Ref:  Ptr: i8* %pattern	<->  call void @memset_pattern16(ptr %a, ptr %pattern, i64 %n)
+; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.1	<->  call void @memset_pattern16(ptr %a, ptr %pattern, i64 %n)
+; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.17	<->  call void @memset_pattern16(ptr %a, ptr %pattern, i64 %n)
 ;
 entry:
-  load i8, i8* %a
-  load i8, i8* %pattern
-  call void @memset_pattern16(i8* %a, i8* %pattern, i64 %n)
-  %a.gep.1 = getelementptr i8, i8* %a, i32 1
-  store i8 0, i8* %a.gep.1
-  %a.gep.17 = getelementptr i8, i8* %a, i32 17
-  store i8 1, i8* %a.gep.17
+  load i8, ptr %a
+  load i8, ptr %pattern
+  call void @memset_pattern16(ptr %a, ptr %pattern, i64 %n)
+  %a.gep.1 = getelementptr i8, ptr %a, i32 1
+  store i8 0, ptr %a.gep.1
+  %a.gep.17 = getelementptr i8, ptr %a, i32 17
+  store i8 1, ptr %a.gep.17
   ret void
 }

diff  --git a/llvm/test/Analysis/BasicAA/libfuncs.ll b/llvm/test/Analysis/BasicAA/libfuncs.ll
index 08faefcc6658..b584e5327be1 100644
--- a/llvm/test/Analysis/BasicAA/libfuncs.ll
+++ b/llvm/test/Analysis/BasicAA/libfuncs.ll
@@ -1,367 +1,367 @@
 ; RUN: opt -mtriple=i386-pc-linux-gnu -aa-pipeline=basic-aa -passes=inferattrs,aa-eval -print-all-alias-modref-info -disable-output 2>&1 %s | FileCheck %s
 
 ; CHECK-LABEL: Function: test_memcmp_const_size
-; CHECK:      Just Ref:  Ptr: i8* %a	<->  %res = tail call i32 @memcmp(i8* %a, i8* %b, i64 4)
-; CHECK-NEXT: Just Ref:  Ptr: i8* %b	<->  %res = tail call i32 @memcmp(i8* %a, i8* %b, i64 4)
-; CHECK-NEXT: Just Ref:  Ptr: i8* %a.gep.1	<->  %res = tail call i32 @memcmp(i8* %a, i8* %b, i64 4)
-; CHECK-NEXT: NoModRef:  Ptr: i8* %a.gep.5	<->  %res = tail call i32 @memcmp(i8* %a, i8* %b, i64 4)
-; CHECK-NEXT: Just Ref:  Ptr: i8* %b.gep.1	<->  %res = tail call i32 @memcmp(i8* %a, i8* %b, i64 4)
-; CHECK-NEXT: NoModRef:  Ptr: i8* %b.gep.5	<->  %res = tail call i32 @memcmp(i8* %a, i8* %b, i64 4)
-define i32 @test_memcmp_const_size(i8* noalias %a, i8* noalias %b) {
+; CHECK:      Just Ref:  Ptr: i8* %a	<->  %res = tail call i32 @memcmp(ptr %a, ptr %b, i64 4)
+; CHECK-NEXT: Just Ref:  Ptr: i8* %b	<->  %res = tail call i32 @memcmp(ptr %a, ptr %b, i64 4)
+; CHECK-NEXT: Just Ref:  Ptr: i8* %a.gep.1	<->  %res = tail call i32 @memcmp(ptr %a, ptr %b, i64 4)
+; CHECK-NEXT: NoModRef:  Ptr: i8* %a.gep.5	<->  %res = tail call i32 @memcmp(ptr %a, ptr %b, i64 4)
+; CHECK-NEXT: Just Ref:  Ptr: i8* %b.gep.1	<->  %res = tail call i32 @memcmp(ptr %a, ptr %b, i64 4)
+; CHECK-NEXT: NoModRef:  Ptr: i8* %b.gep.5	<->  %res = tail call i32 @memcmp(ptr %a, ptr %b, i64 4)
+define i32 @test_memcmp_const_size(ptr noalias %a, ptr noalias %b) {
 entry:
-  load i8, i8* %a
-  load i8, i8* %b
-  %res = tail call i32 @memcmp(i8* %a, i8* %b, i64 4)
-  %a.gep.1 = getelementptr i8, i8* %a, i32 1
-  store i8 0, i8* %a.gep.1
-  %a.gep.5 = getelementptr i8, i8* %a, i32 5
-  store i8 1, i8* %a.gep.5
-  %b.gep.1 = getelementptr i8, i8* %b, i32 1
-  store i8 2, i8* %b.gep.1
-  %b.gep.5 = getelementptr i8, i8* %b, i32 5
-  store i8 3, i8* %b.gep.5
+  load i8, ptr %a
+  load i8, ptr %b
+  %res = tail call i32 @memcmp(ptr %a, ptr %b, i64 4)
+  %a.gep.1 = getelementptr i8, ptr %a, i32 1
+  store i8 0, ptr %a.gep.1
+  %a.gep.5 = getelementptr i8, ptr %a, i32 5
+  store i8 1, ptr %a.gep.5
+  %b.gep.1 = getelementptr i8, ptr %b, i32 1
+  store i8 2, ptr %b.gep.1
+  %b.gep.5 = getelementptr i8, ptr %b, i32 5
+  store i8 3, ptr %b.gep.5
   ret i32 %res
 }
 
 ; CHECK-LABEL: Function: test_memcmp_variable_size
-; CHECK:      Just Ref:  Ptr: i8* %a	<->  %res = tail call i32 @memcmp(i8* %a, i8* %b, i64 %n)
-; CHECK-NEXT: Just Ref:  Ptr: i8* %b	<->  %res = tail call i32 @memcmp(i8* %a, i8* %b, i64 %n)
-; CHECK-NEXT: Just Ref:  Ptr: i8* %a.gep.1	<->  %res = tail call i32 @memcmp(i8* %a, i8* %b, i64 %n)
-; CHECK-NEXT: Just Ref:  Ptr: i8* %a.gep.5	<->  %res = tail call i32 @memcmp(i8* %a, i8* %b, i64 %n)
-; CHECK-NEXT: Just Ref:  Ptr: i8* %b.gep.1	<->  %res = tail call i32 @memcmp(i8* %a, i8* %b, i64 %n)
-; CHECK-NEXT: Just Ref:  Ptr: i8* %b.gep.5	<->  %res = tail call i32 @memcmp(i8* %a, i8* %b, i64 %n)
-define i32 @test_memcmp_variable_size(i8* noalias %a, i8* noalias %b, i64 %n) {
+; CHECK:      Just Ref:  Ptr: i8* %a	<->  %res = tail call i32 @memcmp(ptr %a, ptr %b, i64 %n)
+; CHECK-NEXT: Just Ref:  Ptr: i8* %b	<->  %res = tail call i32 @memcmp(ptr %a, ptr %b, i64 %n)
+; CHECK-NEXT: Just Ref:  Ptr: i8* %a.gep.1	<->  %res = tail call i32 @memcmp(ptr %a, ptr %b, i64 %n)
+; CHECK-NEXT: Just Ref:  Ptr: i8* %a.gep.5	<->  %res = tail call i32 @memcmp(ptr %a, ptr %b, i64 %n)
+; CHECK-NEXT: Just Ref:  Ptr: i8* %b.gep.1	<->  %res = tail call i32 @memcmp(ptr %a, ptr %b, i64 %n)
+; CHECK-NEXT: Just Ref:  Ptr: i8* %b.gep.5	<->  %res = tail call i32 @memcmp(ptr %a, ptr %b, i64 %n)
+define i32 @test_memcmp_variable_size(ptr noalias %a, ptr noalias %b, i64 %n) {
 entry:
-  load i8, i8* %a
-  load i8, i8* %b
-  %res = tail call i32 @memcmp(i8* %a, i8* %b, i64 %n)
-  %a.gep.1 = getelementptr i8, i8* %a, i32 1
-  store i8 0, i8* %a.gep.1
-  %a.gep.5 = getelementptr i8, i8* %a, i32 5
-  store i8 1, i8* %a.gep.5
-  %b.gep.1 = getelementptr i8, i8* %b, i32 1
-  store i8 2, i8* %b.gep.1
-  %b.gep.5 = getelementptr i8, i8* %b, i32 5
-  store i8 3, i8* %b.gep.5
+  load i8, ptr %a
+  load i8, ptr %b
+  %res = tail call i32 @memcmp(ptr %a, ptr %b, i64 %n)
+  %a.gep.1 = getelementptr i8, ptr %a, i32 1
+  store i8 0, ptr %a.gep.1
+  %a.gep.5 = getelementptr i8, ptr %a, i32 5
+  store i8 1, ptr %a.gep.5
+  %b.gep.1 = getelementptr i8, ptr %b, i32 1
+  store i8 2, ptr %b.gep.1
+  %b.gep.5 = getelementptr i8, ptr %b, i32 5
+  store i8 3, ptr %b.gep.5
   ret i32 %res
 }
 
-declare i32 @memcmp(i8*, i8*, i64)
-declare i32 @bcmp(i8*, i8*, i64)
+declare i32 @memcmp(ptr, ptr, i64)
+declare i32 @bcmp(ptr, ptr, i64)
 
 ; CHECK-LABEL: Function: test_bcmp_const_size
-; CHECK:      Just Ref:  Ptr: i8* %a	<->  %res = tail call i32 @bcmp(i8* %a, i8* %b, i64 4)
-; CHECK-NEXT: Just Ref:  Ptr: i8* %b	<->  %res = tail call i32 @bcmp(i8* %a, i8* %b, i64 4)
-; CHECK-NEXT: Just Ref:  Ptr: i8* %a.gep.1	<->  %res = tail call i32 @bcmp(i8* %a, i8* %b, i64 4)
-; CHECK-NEXT: NoModRef:  Ptr: i8* %a.gep.5	<->  %res = tail call i32 @bcmp(i8* %a, i8* %b, i64 4)
-; CHECK-NEXT: Just Ref:  Ptr: i8* %b.gep.1	<->  %res = tail call i32 @bcmp(i8* %a, i8* %b, i64 4)
-; CHECK-NEXT: NoModRef:  Ptr: i8* %b.gep.5	<->  %res = tail call i32 @bcmp(i8* %a, i8* %b, i64 4)
-define i32 @test_bcmp_const_size(i8* noalias %a, i8* noalias %b) {
+; CHECK:      Just Ref:  Ptr: i8* %a	<->  %res = tail call i32 @bcmp(ptr %a, ptr %b, i64 4)
+; CHECK-NEXT: Just Ref:  Ptr: i8* %b	<->  %res = tail call i32 @bcmp(ptr %a, ptr %b, i64 4)
+; CHECK-NEXT: Just Ref:  Ptr: i8* %a.gep.1	<->  %res = tail call i32 @bcmp(ptr %a, ptr %b, i64 4)
+; CHECK-NEXT: NoModRef:  Ptr: i8* %a.gep.5	<->  %res = tail call i32 @bcmp(ptr %a, ptr %b, i64 4)
+; CHECK-NEXT: Just Ref:  Ptr: i8* %b.gep.1	<->  %res = tail call i32 @bcmp(ptr %a, ptr %b, i64 4)
+; CHECK-NEXT: NoModRef:  Ptr: i8* %b.gep.5	<->  %res = tail call i32 @bcmp(ptr %a, ptr %b, i64 4)
+define i32 @test_bcmp_const_size(ptr noalias %a, ptr noalias %b) {
 entry:
-  load i8, i8* %a
-  load i8, i8* %b
-  %res = tail call i32 @bcmp(i8* %a, i8* %b, i64 4)
-  %a.gep.1 = getelementptr i8, i8* %a, i32 1
-  store i8 0, i8* %a.gep.1
-  %a.gep.5 = getelementptr i8, i8* %a, i32 5
-  store i8 1, i8* %a.gep.5
-  %b.gep.1 = getelementptr i8, i8* %b, i32 1
-  store i8 2, i8* %b.gep.1
-  %b.gep.5 = getelementptr i8, i8* %b, i32 5
-  store i8 3, i8* %b.gep.5
+  load i8, ptr %a
+  load i8, ptr %b
+  %res = tail call i32 @bcmp(ptr %a, ptr %b, i64 4)
+  %a.gep.1 = getelementptr i8, ptr %a, i32 1
+  store i8 0, ptr %a.gep.1
+  %a.gep.5 = getelementptr i8, ptr %a, i32 5
+  store i8 1, ptr %a.gep.5
+  %b.gep.1 = getelementptr i8, ptr %b, i32 1
+  store i8 2, ptr %b.gep.1
+  %b.gep.5 = getelementptr i8, ptr %b, i32 5
+  store i8 3, ptr %b.gep.5
   ret i32 %res
 }
 
 ; CHECK-LABEL: Function: test_bcmp_variable_size
-; CHECK:      Just Ref:  Ptr: i8* %a	<->  %res = tail call i32 @bcmp(i8* %a, i8* %b, i64 %n)
-; CHECK-NEXT: Just Ref:  Ptr: i8* %b	<->  %res = tail call i32 @bcmp(i8* %a, i8* %b, i64 %n)
-; CHECK-NEXT: Just Ref:  Ptr: i8* %a.gep.1	<->  %res = tail call i32 @bcmp(i8* %a, i8* %b, i64 %n)
-; CHECK-NEXT: Just Ref:  Ptr: i8* %a.gep.5	<->  %res = tail call i32 @bcmp(i8* %a, i8* %b, i64 %n)
-; CHECK-NEXT: Just Ref:  Ptr: i8* %b.gep.1	<->  %res = tail call i32 @bcmp(i8* %a, i8* %b, i64 %n)
-; CHECK-NEXT: Just Ref:  Ptr: i8* %b.gep.5	<->  %res = tail call i32 @bcmp(i8* %a, i8* %b, i64 %n)
-define i32 @test_bcmp_variable_size(i8* noalias %a, i8* noalias %b, i64 %n) {
+; CHECK:      Just Ref:  Ptr: i8* %a	<->  %res = tail call i32 @bcmp(ptr %a, ptr %b, i64 %n)
+; CHECK-NEXT: Just Ref:  Ptr: i8* %b	<->  %res = tail call i32 @bcmp(ptr %a, ptr %b, i64 %n)
+; CHECK-NEXT: Just Ref:  Ptr: i8* %a.gep.1	<->  %res = tail call i32 @bcmp(ptr %a, ptr %b, i64 %n)
+; CHECK-NEXT: Just Ref:  Ptr: i8* %a.gep.5	<->  %res = tail call i32 @bcmp(ptr %a, ptr %b, i64 %n)
+; CHECK-NEXT: Just Ref:  Ptr: i8* %b.gep.1	<->  %res = tail call i32 @bcmp(ptr %a, ptr %b, i64 %n)
+; CHECK-NEXT: Just Ref:  Ptr: i8* %b.gep.5	<->  %res = tail call i32 @bcmp(ptr %a, ptr %b, i64 %n)
+define i32 @test_bcmp_variable_size(ptr noalias %a, ptr noalias %b, i64 %n) {
 entry:
-  load i8, i8* %a
-  load i8, i8* %b
-  %res = tail call i32 @bcmp(i8* %a, i8* %b, i64 %n)
-  %a.gep.1 = getelementptr i8, i8* %a, i32 1
-  store i8 0, i8* %a.gep.1
-  %a.gep.5 = getelementptr i8, i8* %a, i32 5
-  store i8 1, i8* %a.gep.5
-  %b.gep.1 = getelementptr i8, i8* %b, i32 1
-  store i8 2, i8* %b.gep.1
-  %b.gep.5 = getelementptr i8, i8* %b, i32 5
-  store i8 3, i8* %b.gep.5
+  load i8, ptr %a
+  load i8, ptr %b
+  %res = tail call i32 @bcmp(ptr %a, ptr %b, i64 %n)
+  %a.gep.1 = getelementptr i8, ptr %a, i32 1
+  store i8 0, ptr %a.gep.1
+  %a.gep.5 = getelementptr i8, ptr %a, i32 5
+  store i8 1, ptr %a.gep.5
+  %b.gep.1 = getelementptr i8, ptr %b, i32 1
+  store i8 2, ptr %b.gep.1
+  %b.gep.5 = getelementptr i8, ptr %b, i32 5
+  store i8 3, ptr %b.gep.5
   ret i32 %res
 }
 
-declare i8* @memchr(i8*, i32, i64)
+declare ptr @memchr(ptr, i32, i64)
 
 ; CHECK-LABEL: Function: test_memchr_const_size
-; CHECK: Just Ref:  Ptr: i8* %res      <->  %res = call i8* @memchr(i8* %a, i32 42, i64 4)
-; CHECK-NEXT: Just Ref:  Ptr: i8* %a.gep.1  <->  %res = call i8* @memchr(i8* %a, i32 42, i64 4)
-; CHECK-NEXT: NoModRef:  Ptr: i8* %a.gep.5  <->  %res = call i8* @memchr(i8* %a, i32 42, i64 4)
-define i8* @test_memchr_const_size(i8* noalias %a) {
+; CHECK: Just Ref:  Ptr: i8* %res      <->  %res = call ptr @memchr(ptr %a, i32 42, i64 4)
+; CHECK-NEXT: Just Ref:  Ptr: i8* %a.gep.1  <->  %res = call ptr @memchr(ptr %a, i32 42, i64 4)
+; CHECK-NEXT: NoModRef:  Ptr: i8* %a.gep.5  <->  %res = call ptr @memchr(ptr %a, i32 42, i64 4)
+define ptr @test_memchr_const_size(ptr noalias %a) {
 entry:
-  %res = call i8* @memchr(i8* %a, i32 42, i64 4)
-  load i8, i8* %res
-  %a.gep.1 = getelementptr i8, i8* %a, i32 1
-  store i8 0, i8* %a.gep.1
-  %a.gep.5 = getelementptr i8, i8* %a, i32 5
-  store i8 1, i8* %a.gep.5
-  ret i8* %res
+  %res = call ptr @memchr(ptr %a, i32 42, i64 4)
+  load i8, ptr %res
+  %a.gep.1 = getelementptr i8, ptr %a, i32 1
+  store i8 0, ptr %a.gep.1
+  %a.gep.5 = getelementptr i8, ptr %a, i32 5
+  store i8 1, ptr %a.gep.5
+  ret ptr %res
 }
 
-declare i8* @memccpy(i8*, i8*, i32, i64)
+declare ptr @memccpy(ptr, ptr, i32, i64)
 
 ; CHECK-LABEL: Function: test_memccpy_const_size
-; CHECK:      Just Mod:  Ptr: i8* %a        <->  %res = call i8* @memccpy(i8* %a, i8* %b, i32 42, i64 4)
-; CHECK-NEXT: Just Ref:  Ptr: i8* %b        <->  %res = call i8* @memccpy(i8* %a, i8* %b, i32 42, i64 4)
-; CHECK-NEXT: Just Mod:  Ptr: i8* %res      <->  %res = call i8* @memccpy(i8* %a, i8* %b, i32 42, i64 4)
-; CHECK-NEXT: Just Mod:  Ptr: i8* %a.gep.1  <->  %res = call i8* @memccpy(i8* %a, i8* %b, i32 42, i64 4)
-; CHECK-NEXT: NoModRef:  Ptr: i8* %a.gep.5  <->  %res = call i8* @memccpy(i8* %a, i8* %b, i32 42, i64 4)
-; CHECK-NEXT: Just Ref:  Ptr: i8* %b.gep.1  <->  %res = call i8* @memccpy(i8* %a, i8* %b, i32 42, i64 4)
-; CHECK-NEXT: NoModRef:  Ptr: i8* %b.gep.5  <->  %res = call i8* @memccpy(i8* %a, i8* %b, i32 42, i64 4)
+; CHECK:      Just Mod:  Ptr: i8* %a        <->  %res = call ptr @memccpy(ptr %a, ptr %b, i32 42, i64 4)
+; CHECK-NEXT: Just Ref:  Ptr: i8* %b        <->  %res = call ptr @memccpy(ptr %a, ptr %b, i32 42, i64 4)
+; CHECK-NEXT: Just Mod:  Ptr: i8* %res      <->  %res = call ptr @memccpy(ptr %a, ptr %b, i32 42, i64 4)
+; CHECK-NEXT: Just Mod:  Ptr: i8* %a.gep.1  <->  %res = call ptr @memccpy(ptr %a, ptr %b, i32 42, i64 4)
+; CHECK-NEXT: NoModRef:  Ptr: i8* %a.gep.5  <->  %res = call ptr @memccpy(ptr %a, ptr %b, i32 42, i64 4)
+; CHECK-NEXT: Just Ref:  Ptr: i8* %b.gep.1  <->  %res = call ptr @memccpy(ptr %a, ptr %b, i32 42, i64 4)
+; CHECK-NEXT: NoModRef:  Ptr: i8* %b.gep.5  <->  %res = call ptr @memccpy(ptr %a, ptr %b, i32 42, i64 4)
 
-define i8* @test_memccpy_const_size(i8* noalias %a, i8* noalias %b) {
+define ptr @test_memccpy_const_size(ptr noalias %a, ptr noalias %b) {
 entry:
-  load i8, i8* %a
-  load i8, i8* %b
-  %res = call i8* @memccpy(i8* %a, i8* %b, i32 42, i64 4)
-  load i8, i8* %res
-  %a.gep.1 = getelementptr i8, i8* %a, i32 1
-  store i8 0, i8* %a.gep.1
-  %a.gep.5 = getelementptr i8, i8* %a, i32 5
-  store i8 1, i8* %a.gep.5
-  %b.gep.1 = getelementptr i8, i8* %b, i32 1
-  store i8 2, i8* %b.gep.1
-  %b.gep.5 = getelementptr i8, i8* %b, i32 5
-  store i8 3, i8* %b.gep.5
-  ret i8* %res
+  load i8, ptr %a
+  load i8, ptr %b
+  %res = call ptr @memccpy(ptr %a, ptr %b, i32 42, i64 4)
+  load i8, ptr %res
+  %a.gep.1 = getelementptr i8, ptr %a, i32 1
+  store i8 0, ptr %a.gep.1
+  %a.gep.5 = getelementptr i8, ptr %a, i32 5
+  store i8 1, ptr %a.gep.5
+  %b.gep.1 = getelementptr i8, ptr %b, i32 1
+  store i8 2, ptr %b.gep.1
+  %b.gep.5 = getelementptr i8, ptr %b, i32 5
+  store i8 3, ptr %b.gep.5
+  ret ptr %res
 }
 
-declare i8* @strcat(i8*, i8*)
+declare ptr @strcat(ptr, ptr)
 
-define i8* @test_strcat_read_write_after(i8* noalias %a, i8* noalias %b) {
+define ptr @test_strcat_read_write_after(ptr noalias %a, ptr noalias %b) {
 ; CHECK-LABEL: Function: test_strcat_read_write_after
-; CHECK:       NoModRef:  Ptr: i8* %a	<->  %res = tail call i8* @strcat(i8* %a.gep.1, i8* %b.gep.1)
-; CHECK-NEXT:  NoModRef:  Ptr: i8* %b	<->  %res = tail call i8* @strcat(i8* %a.gep.1, i8* %b.gep.1)
-; CHECK-NEXT:  Both ModRef:  Ptr: i8* %a.gep.1	<->  %res = tail call i8* @strcat(i8* %a.gep.1, i8* %b.gep.1)
-; CHECK-NEXT:  Just Ref:  Ptr: i8* %b.gep.1	<->  %res = tail call i8* @strcat(i8* %a.gep.1, i8* %b.gep.1)
-; CHECK-NEXT:  Both ModRef:  Ptr: i8* %res	<->  %res = tail call i8* @strcat(i8* %a.gep.1, i8* %b.gep.1)
-; CHECK-NEXT:  Both ModRef:  Ptr: i8* %a.gep.5	<->  %res = tail call i8* @strcat(i8* %a.gep.1, i8* %b.gep.1)
-; CHECK-NEXT:  Just Ref:  Ptr: i8* %b.gep.5	<->  %res = tail call i8* @strcat(i8* %a.gep.1, i8* %b.gep.1)
+; CHECK:       NoModRef:  Ptr: i8* %a	<->  %res = tail call ptr @strcat(ptr %a.gep.1, ptr %b.gep.1)
+; CHECK-NEXT:  NoModRef:  Ptr: i8* %b	<->  %res = tail call ptr @strcat(ptr %a.gep.1, ptr %b.gep.1)
+; CHECK-NEXT:  Both ModRef:  Ptr: i8* %a.gep.1	<->  %res = tail call ptr @strcat(ptr %a.gep.1, ptr %b.gep.1)
+; CHECK-NEXT:  Just Ref:  Ptr: i8* %b.gep.1	<->  %res = tail call ptr @strcat(ptr %a.gep.1, ptr %b.gep.1)
+; CHECK-NEXT:  Both ModRef:  Ptr: i8* %res	<->  %res = tail call ptr @strcat(ptr %a.gep.1, ptr %b.gep.1)
+; CHECK-NEXT:  Both ModRef:  Ptr: i8* %a.gep.5	<->  %res = tail call ptr @strcat(ptr %a.gep.1, ptr %b.gep.1)
+; CHECK-NEXT:  Just Ref:  Ptr: i8* %b.gep.5	<->  %res = tail call ptr @strcat(ptr %a.gep.1, ptr %b.gep.1)
 ;
 entry:
-  store i8 0, i8* %a
-  store i8 2, i8* %b
-  %a.gep.1 = getelementptr i8, i8* %a, i32 1
-  load i8, i8* %a.gep.1
-  %b.gep.1 = getelementptr i8, i8* %b, i32 1
-  load i8, i8* %b.gep.1
-  %res = tail call i8* @strcat(i8* %a.gep.1, i8* %b.gep.1)
-  load i8, i8* %res
-  %a.gep.5 = getelementptr i8, i8* %a, i32 5
-  store i8 1, i8* %a.gep.5
-  %b.gep.5 = getelementptr i8, i8* %b, i32 5
-  store i8 3, i8* %b.gep.5
-  ret i8* %res
+  store i8 0, ptr %a
+  store i8 2, ptr %b
+  %a.gep.1 = getelementptr i8, ptr %a, i32 1
+  load i8, ptr %a.gep.1
+  %b.gep.1 = getelementptr i8, ptr %b, i32 1
+  load i8, ptr %b.gep.1
+  %res = tail call ptr @strcat(ptr %a.gep.1, ptr %b.gep.1)
+  load i8, ptr %res
+  %a.gep.5 = getelementptr i8, ptr %a, i32 5
+  store i8 1, ptr %a.gep.5
+  %b.gep.5 = getelementptr i8, ptr %b, i32 5
+  store i8 3, ptr %b.gep.5
+  ret ptr %res
 }
 
-declare i8* @strncat(i8*, i8*, i64)
+declare ptr @strncat(ptr, ptr, i64)
 
-define i8* @test_strncat_read_write_after(i8* noalias %a, i8* noalias %b, i64 %n) {
+define ptr @test_strncat_read_write_after(ptr noalias %a, ptr noalias %b, i64 %n) {
 ; CHECK-LABEL: Function: test_strncat_read_write_after
-; CHECK:       NoModRef:  Ptr: i8* %a	<->  %res = tail call i8* @strncat(i8* %a.gep.1, i8* %b.gep.1, i64 %n)
-; CHECK-NEXT:  NoModRef:  Ptr: i8* %b	<->  %res = tail call i8* @strncat(i8* %a.gep.1, i8* %b.gep.1, i64 %n)
-; CHECK-NEXT:  Both ModRef:  Ptr: i8* %a.gep.1	<->  %res = tail call i8* @strncat(i8* %a.gep.1, i8* %b.gep.1, i64 %n)
-; CHECK-NEXT:  Just Ref:  Ptr: i8* %b.gep.1	<->  %res = tail call i8* @strncat(i8* %a.gep.1, i8* %b.gep.1, i64 %n)
-; CHECK-NEXT:  Both ModRef:  Ptr: i8* %res	<->  %res = tail call i8* @strncat(i8* %a.gep.1, i8* %b.gep.1, i64 %n)
-; CHECK-NEXT:  Both ModRef:  Ptr: i8* %a.gep.5	<->  %res = tail call i8* @strncat(i8* %a.gep.1, i8* %b.gep.1, i64 %n)
-; CHECK-NEXT:  Just Ref:  Ptr: i8* %b.gep.5	<->  %res = tail call i8* @strncat(i8* %a.gep.1, i8* %b.gep.1, i64 %n)
+; CHECK:       NoModRef:  Ptr: i8* %a	<->  %res = tail call ptr @strncat(ptr %a.gep.1, ptr %b.gep.1, i64 %n)
+; CHECK-NEXT:  NoModRef:  Ptr: i8* %b	<->  %res = tail call ptr @strncat(ptr %a.gep.1, ptr %b.gep.1, i64 %n)
+; CHECK-NEXT:  Both ModRef:  Ptr: i8* %a.gep.1	<->  %res = tail call ptr @strncat(ptr %a.gep.1, ptr %b.gep.1, i64 %n)
+; CHECK-NEXT:  Just Ref:  Ptr: i8* %b.gep.1	<->  %res = tail call ptr @strncat(ptr %a.gep.1, ptr %b.gep.1, i64 %n)
+; CHECK-NEXT:  Both ModRef:  Ptr: i8* %res	<->  %res = tail call ptr @strncat(ptr %a.gep.1, ptr %b.gep.1, i64 %n)
+; CHECK-NEXT:  Both ModRef:  Ptr: i8* %a.gep.5	<->  %res = tail call ptr @strncat(ptr %a.gep.1, ptr %b.gep.1, i64 %n)
+; CHECK-NEXT:  Just Ref:  Ptr: i8* %b.gep.5	<->  %res = tail call ptr @strncat(ptr %a.gep.1, ptr %b.gep.1, i64 %n)
 ;
 entry:
-  store i8 0, i8* %a
-  store i8 2, i8* %b
-  %a.gep.1 = getelementptr i8, i8* %a, i32 1
-  load i8, i8* %a.gep.1
-  %b.gep.1 = getelementptr i8, i8* %b, i32 1
-  load i8, i8* %b.gep.1
-  %res = tail call i8* @strncat(i8* %a.gep.1, i8* %b.gep.1, i64 %n)
-  load i8, i8* %res
-  %a.gep.5 = getelementptr i8, i8* %a, i32 5
-  store i8 1, i8* %a.gep.5
-  %b.gep.5 = getelementptr i8, i8* %b, i32 5
-  store i8 3, i8* %b.gep.5
-  ret i8* %res
+  store i8 0, ptr %a
+  store i8 2, ptr %b
+  %a.gep.1 = getelementptr i8, ptr %a, i32 1
+  load i8, ptr %a.gep.1
+  %b.gep.1 = getelementptr i8, ptr %b, i32 1
+  load i8, ptr %b.gep.1
+  %res = tail call ptr @strncat(ptr %a.gep.1, ptr %b.gep.1, i64 %n)
+  load i8, ptr %res
+  %a.gep.5 = getelementptr i8, ptr %a, i32 5
+  store i8 1, ptr %a.gep.5
+  %b.gep.5 = getelementptr i8, ptr %b, i32 5
+  store i8 3, ptr %b.gep.5
+  ret ptr %res
 }
 
-declare i8* @strcpy(i8*, i8*)
+declare ptr @strcpy(ptr, ptr)
 
-define i8* @test_strcpy_read_write_after(i8* noalias %a, i8* noalias %b) {
+define ptr @test_strcpy_read_write_after(ptr noalias %a, ptr noalias %b) {
 ; CHECK-LABEL: Function: test_strcpy_read_write_after
-; CHECK:       NoModRef:  Ptr: i8* %a	<->  %res = tail call i8* @strcpy(i8* %a.gep.1, i8* %b.gep.1)
-; CHECK-NEXT:  NoModRef:  Ptr: i8* %b	<->  %res = tail call i8* @strcpy(i8* %a.gep.1, i8* %b.gep.1)
-; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.1	<->  %res = tail call i8* @strcpy(i8* %a.gep.1, i8* %b.gep.1)
-; CHECK-NEXT:  Just Ref:  Ptr: i8* %b.gep.1	<->  %res = tail call i8* @strcpy(i8* %a.gep.1, i8* %b.gep.1)
-; CHECK-NEXT:  Just Mod:  Ptr: i8* %res	<->  %res = tail call i8* @strcpy(i8* %a.gep.1, i8* %b.gep.1)
-; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.5	<->  %res = tail call i8* @strcpy(i8* %a.gep.1, i8* %b.gep.1)
-; CHECK-NEXT:  Just Ref:  Ptr: i8* %b.gep.5	<->  %res = tail call i8* @strcpy(i8* %a.gep.1, i8* %b.gep.1)
+; CHECK:       NoModRef:  Ptr: i8* %a	<->  %res = tail call ptr @strcpy(ptr %a.gep.1, ptr %b.gep.1)
+; CHECK-NEXT:  NoModRef:  Ptr: i8* %b	<->  %res = tail call ptr @strcpy(ptr %a.gep.1, ptr %b.gep.1)
+; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.1	<->  %res = tail call ptr @strcpy(ptr %a.gep.1, ptr %b.gep.1)
+; CHECK-NEXT:  Just Ref:  Ptr: i8* %b.gep.1	<->  %res = tail call ptr @strcpy(ptr %a.gep.1, ptr %b.gep.1)
+; CHECK-NEXT:  Just Mod:  Ptr: i8* %res	<->  %res = tail call ptr @strcpy(ptr %a.gep.1, ptr %b.gep.1)
+; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.5	<->  %res = tail call ptr @strcpy(ptr %a.gep.1, ptr %b.gep.1)
+; CHECK-NEXT:  Just Ref:  Ptr: i8* %b.gep.5	<->  %res = tail call ptr @strcpy(ptr %a.gep.1, ptr %b.gep.1)
 ;
 entry:
-  store i8 0, i8* %a
-  store i8 2, i8* %b
-  %a.gep.1 = getelementptr i8, i8* %a, i32 1
-  load i8, i8* %a.gep.1
-  %b.gep.1 = getelementptr i8, i8* %b, i32 1
-  load i8, i8* %b.gep.1
-  %res = tail call i8* @strcpy(i8* %a.gep.1, i8* %b.gep.1)
-  load i8, i8* %res
-  %a.gep.5 = getelementptr i8, i8* %a, i32 5
-  store i8 1, i8* %a.gep.5
-  %b.gep.5 = getelementptr i8, i8* %b, i32 5
-  store i8 3, i8* %b.gep.5
-  ret i8* %res
+  store i8 0, ptr %a
+  store i8 2, ptr %b
+  %a.gep.1 = getelementptr i8, ptr %a, i32 1
+  load i8, ptr %a.gep.1
+  %b.gep.1 = getelementptr i8, ptr %b, i32 1
+  load i8, ptr %b.gep.1
+  %res = tail call ptr @strcpy(ptr %a.gep.1, ptr %b.gep.1)
+  load i8, ptr %res
+  %a.gep.5 = getelementptr i8, ptr %a, i32 5
+  store i8 1, ptr %a.gep.5
+  %b.gep.5 = getelementptr i8, ptr %b, i32 5
+  store i8 3, ptr %b.gep.5
+  ret ptr %res
 }
 
-declare i8* @strncpy(i8*, i8*, i64)
+declare ptr @strncpy(ptr, ptr, i64)
 
-define i8* @test_strncpy_const_size(i8* noalias %a, i8* noalias %b) {
+define ptr @test_strncpy_const_size(ptr noalias %a, ptr noalias %b) {
 ; CHECK-LABEL: Function: test_strncpy_const_size
-; CHECK:       Just Mod:  Ptr: i8* %a	<->  %res = tail call i8* @strncpy(i8* %a, i8* %b, i64 4)
-; CHECK-NEXT:  Just Ref:  Ptr: i8* %b	<->  %res = tail call i8* @strncpy(i8* %a, i8* %b, i64 4)
-; CHECK-NEXT:  Just Mod:  Ptr: i8* %res	<->  %res = tail call i8* @strncpy(i8* %a, i8* %b, i64 4)
-; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.1	<->  %res = tail call i8* @strncpy(i8* %a, i8* %b, i64 4)
-; CHECK-NEXT:  NoModRef:  Ptr: i8* %a.gep.5	<->  %res = tail call i8* @strncpy(i8* %a, i8* %b, i64 4)
-; CHECK-NEXT:  Just Ref:  Ptr: i8* %b.gep.1	<->  %res = tail call i8* @strncpy(i8* %a, i8* %b, i64 4)
-; CHECK-NEXT:  NoModRef:  Ptr: i8* %b.gep.5	<->  %res = tail call i8* @strncpy(i8* %a, i8* %b, i64 4)
+; CHECK:       Just Mod:  Ptr: i8* %a	<->  %res = tail call ptr @strncpy(ptr %a, ptr %b, i64 4)
+; CHECK-NEXT:  Just Ref:  Ptr: i8* %b	<->  %res = tail call ptr @strncpy(ptr %a, ptr %b, i64 4)
+; CHECK-NEXT:  Just Mod:  Ptr: i8* %res	<->  %res = tail call ptr @strncpy(ptr %a, ptr %b, i64 4)
+; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.1	<->  %res = tail call ptr @strncpy(ptr %a, ptr %b, i64 4)
+; CHECK-NEXT:  NoModRef:  Ptr: i8* %a.gep.5	<->  %res = tail call ptr @strncpy(ptr %a, ptr %b, i64 4)
+; CHECK-NEXT:  Just Ref:  Ptr: i8* %b.gep.1	<->  %res = tail call ptr @strncpy(ptr %a, ptr %b, i64 4)
+; CHECK-NEXT:  NoModRef:  Ptr: i8* %b.gep.5	<->  %res = tail call ptr @strncpy(ptr %a, ptr %b, i64 4)
 ;
 entry:
-  load i8, i8* %a
-  load i8, i8* %b
-  %res = tail call i8* @strncpy(i8* %a, i8* %b, i64 4)
-  load i8, i8* %res
-  %a.gep.1 = getelementptr i8, i8* %a, i32 1
-  store i8 0, i8* %a.gep.1
-  %a.gep.5 = getelementptr i8, i8* %a, i32 5
-  store i8 1, i8* %a.gep.5
-  %b.gep.1 = getelementptr i8, i8* %b, i32 1
-  store i8 2, i8* %b.gep.1
-  %b.gep.5 = getelementptr i8, i8* %b, i32 5
-  store i8 3, i8* %b.gep.5
-  ret i8* %res
+  load i8, ptr %a
+  load i8, ptr %b
+  %res = tail call ptr @strncpy(ptr %a, ptr %b, i64 4)
+  load i8, ptr %res
+  %a.gep.1 = getelementptr i8, ptr %a, i32 1
+  store i8 0, ptr %a.gep.1
+  %a.gep.5 = getelementptr i8, ptr %a, i32 5
+  store i8 1, ptr %a.gep.5
+  %b.gep.1 = getelementptr i8, ptr %b, i32 1
+  store i8 2, ptr %b.gep.1
+  %b.gep.5 = getelementptr i8, ptr %b, i32 5
+  store i8 3, ptr %b.gep.5
+  ret ptr %res
 }
 
-define i8* @test_strncpy_variable_size(i8* noalias %a, i8* noalias %b, i64 %n) {
+define ptr @test_strncpy_variable_size(ptr noalias %a, ptr noalias %b, i64 %n) {
 ; CHECK-LABEL: Function: test_strncpy_variable_size
-; CHECK:       Just Mod:  Ptr: i8* %a	<->  %res = tail call i8* @strncpy(i8* %a, i8* %b, i64 %n)
-; CHECK-NEXT:  Just Ref:  Ptr: i8* %b	<->  %res = tail call i8* @strncpy(i8* %a, i8* %b, i64 %n)
-; CHECK-NEXT:  Just Mod:  Ptr: i8* %res	<->  %res = tail call i8* @strncpy(i8* %a, i8* %b, i64 %n)
-; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.1	<->  %res = tail call i8* @strncpy(i8* %a, i8* %b, i64 %n)
-; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.5	<->  %res = tail call i8* @strncpy(i8* %a, i8* %b, i64 %n)
-; CHECK-NEXT:  Just Ref:  Ptr: i8* %b.gep.1	<->  %res = tail call i8* @strncpy(i8* %a, i8* %b, i64 %n)
-; CHECK-NEXT:  Just Ref:  Ptr: i8* %b.gep.5	<->  %res = tail call i8* @strncpy(i8* %a, i8* %b, i64 %n)
+; CHECK:       Just Mod:  Ptr: i8* %a	<->  %res = tail call ptr @strncpy(ptr %a, ptr %b, i64 %n)
+; CHECK-NEXT:  Just Ref:  Ptr: i8* %b	<->  %res = tail call ptr @strncpy(ptr %a, ptr %b, i64 %n)
+; CHECK-NEXT:  Just Mod:  Ptr: i8* %res	<->  %res = tail call ptr @strncpy(ptr %a, ptr %b, i64 %n)
+; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.1	<->  %res = tail call ptr @strncpy(ptr %a, ptr %b, i64 %n)
+; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.5	<->  %res = tail call ptr @strncpy(ptr %a, ptr %b, i64 %n)
+; CHECK-NEXT:  Just Ref:  Ptr: i8* %b.gep.1	<->  %res = tail call ptr @strncpy(ptr %a, ptr %b, i64 %n)
+; CHECK-NEXT:  Just Ref:  Ptr: i8* %b.gep.5	<->  %res = tail call ptr @strncpy(ptr %a, ptr %b, i64 %n)
 ;
 entry:
-  load i8, i8* %a
-  load i8, i8* %b
-  %res = tail call i8* @strncpy(i8* %a, i8* %b, i64 %n)
-  load i8, i8* %res
-  %a.gep.1 = getelementptr i8, i8* %a, i32 1
-  store i8 0, i8* %a.gep.1
-  %a.gep.5 = getelementptr i8, i8* %a, i32 5
-  store i8 1, i8* %a.gep.5
-  %b.gep.1 = getelementptr i8, i8* %b, i32 1
-  store i8 2, i8* %b.gep.1
-  %b.gep.5 = getelementptr i8, i8* %b, i32 5
-  store i8 3, i8* %b.gep.5
-  ret i8* %res
+  load i8, ptr %a
+  load i8, ptr %b
+  %res = tail call ptr @strncpy(ptr %a, ptr %b, i64 %n)
+  load i8, ptr %res
+  %a.gep.1 = getelementptr i8, ptr %a, i32 1
+  store i8 0, ptr %a.gep.1
+  %a.gep.5 = getelementptr i8, ptr %a, i32 5
+  store i8 1, ptr %a.gep.5
+  %b.gep.1 = getelementptr i8, ptr %b, i32 1
+  store i8 2, ptr %b.gep.1
+  %b.gep.5 = getelementptr i8, ptr %b, i32 5
+  store i8 3, ptr %b.gep.5
+  ret ptr %res
 }
 
-declare i8* @__memset_chk(i8* writeonly, i32, i64, i64)
+declare ptr @__memset_chk(ptr writeonly, i32, i64, i64)
 
 ; CHECK-LABEL: Function: test_memset_chk_const_size
-define i8* @test_memset_chk_const_size(i8* noalias %a, i64 %n) {
-; CHECK:       Just Mod:  Ptr: i8* %a	<->  %res = tail call i8* @__memset_chk(i8* %a, i32 0, i64 4, i64 %n)
-; CHECK-NEXT:  Just Mod:  Ptr: i8* %res	<->  %res = tail call i8* @__memset_chk(i8* %a, i32 0, i64 4, i64 %n)
-; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.1	<->  %res = tail call i8* @__memset_chk(i8* %a, i32 0, i64 4, i64 %n)
-; CHECK-NEXT:  NoModRef:  Ptr: i8* %a.gep.5	<->  %res = tail call i8* @__memset_chk(i8* %a, i32 0, i64 4, i64 %n)
+define ptr @test_memset_chk_const_size(ptr noalias %a, i64 %n) {
+; CHECK:       Just Mod:  Ptr: i8* %a	<->  %res = tail call ptr @__memset_chk(ptr %a, i32 0, i64 4, i64 %n)
+; CHECK-NEXT:  Just Mod:  Ptr: i8* %res	<->  %res = tail call ptr @__memset_chk(ptr %a, i32 0, i64 4, i64 %n)
+; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.1	<->  %res = tail call ptr @__memset_chk(ptr %a, i32 0, i64 4, i64 %n)
+; CHECK-NEXT:  NoModRef:  Ptr: i8* %a.gep.5	<->  %res = tail call ptr @__memset_chk(ptr %a, i32 0, i64 4, i64 %n)
 ;
 entry:
-  load i8, i8* %a
-  %res = tail call i8* @__memset_chk(i8* %a, i32 0, i64 4, i64 %n)
-  load i8, i8* %res
-  %a.gep.1 = getelementptr i8, i8* %a, i32 1
-  store i8 0, i8* %a.gep.1
-  %a.gep.5 = getelementptr i8, i8* %a, i32 5
-  store i8 1, i8* %a.gep.5
-  ret i8* %res
+  load i8, ptr %a
+  %res = tail call ptr @__memset_chk(ptr %a, i32 0, i64 4, i64 %n)
+  load i8, ptr %res
+  %a.gep.1 = getelementptr i8, ptr %a, i32 1
+  store i8 0, ptr %a.gep.1
+  %a.gep.5 = getelementptr i8, ptr %a, i32 5
+  store i8 1, ptr %a.gep.5
+  ret ptr %res
 }
 
-define i8* @test_memset_chk_variable_size(i8* noalias %a, i64 %n.1, i64 %n.2) {
+define ptr @test_memset_chk_variable_size(ptr noalias %a, i64 %n.1, i64 %n.2) {
 ; CHECK-LABEL: Function: test_memset_chk_variable_size
-; CHECK:       Just Mod:  Ptr: i8* %a	<->  %res = tail call i8* @__memset_chk(i8* %a, i32 0, i64 %n.1, i64 %n.2)
-; CHECK-NEXT:  Just Mod:  Ptr: i8* %res	<->  %res = tail call i8* @__memset_chk(i8* %a, i32 0, i64 %n.1, i64 %n.2)
-; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.1	<->  %res = tail call i8* @__memset_chk(i8* %a, i32 0, i64 %n.1, i64 %n.2)
-; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.5	<->  %res = tail call i8* @__memset_chk(i8* %a, i32 0, i64 %n.1, i64 %n.2)
+; CHECK:       Just Mod:  Ptr: i8* %a	<->  %res = tail call ptr @__memset_chk(ptr %a, i32 0, i64 %n.1, i64 %n.2)
+; CHECK-NEXT:  Just Mod:  Ptr: i8* %res	<->  %res = tail call ptr @__memset_chk(ptr %a, i32 0, i64 %n.1, i64 %n.2)
+; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.1	<->  %res = tail call ptr @__memset_chk(ptr %a, i32 0, i64 %n.1, i64 %n.2)
+; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.5	<->  %res = tail call ptr @__memset_chk(ptr %a, i32 0, i64 %n.1, i64 %n.2)
 ;
 entry:
-  load i8, i8* %a
-  %res = tail call i8* @__memset_chk(i8* %a, i32 0, i64 %n.1, i64 %n.2)
-  load i8, i8* %res
-  %a.gep.1 = getelementptr i8, i8* %a, i32 1
-  store i8 0, i8* %a.gep.1
-  %a.gep.5 = getelementptr i8, i8* %a, i32 5
-  store i8 1, i8* %a.gep.5
-  ret i8* %res
+  load i8, ptr %a
+  %res = tail call ptr @__memset_chk(ptr %a, i32 0, i64 %n.1, i64 %n.2)
+  load i8, ptr %res
+  %a.gep.1 = getelementptr i8, ptr %a, i32 1
+  store i8 0, ptr %a.gep.1
+  %a.gep.5 = getelementptr i8, ptr %a, i32 5
+  store i8 1, ptr %a.gep.5
+  ret ptr %res
 }
 
-declare i8* @__memcpy_chk(i8* writeonly, i8* readonly, i64, i64)
+declare ptr @__memcpy_chk(ptr writeonly, ptr readonly, i64, i64)
 
-define i8* @test_memcpy_chk_const_size(i8* noalias %a, i8* noalias %b, i64 %n) {
+define ptr @test_memcpy_chk_const_size(ptr noalias %a, ptr noalias %b, i64 %n) {
 ; CHECK-LABEL: Function: test_memcpy_chk_const_size
-; CHECK:       Just Mod:  Ptr: i8* %a	<->  %res = tail call i8* @__memcpy_chk(i8* %a, i8* %b, i64 4, i64 %n)
-; CHECK-NEXT:  Just Mod:  Ptr: i8* %res	<->  %res = tail call i8* @__memcpy_chk(i8* %a, i8* %b, i64 4, i64 %n)
-; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.1	<->  %res = tail call i8* @__memcpy_chk(i8* %a, i8* %b, i64 4, i64 %n)
-; CHECK-NEXT:  NoModRef:  Ptr: i8* %a.gep.5	<->  %res = tail call i8* @__memcpy_chk(i8* %a, i8* %b, i64 4, i64 %n)
-; CHECK-NEXT:  Just Ref:  Ptr: i8* %b.gep.1	<->  %res = tail call i8* @__memcpy_chk(i8* %a, i8* %b, i64 4, i64 %n)
-; CHECK-NEXT:  NoModRef:  Ptr: i8* %b.gep.5	<->  %res = tail call i8* @__memcpy_chk(i8* %a, i8* %b, i64 4, i64 %n)
+; CHECK:       Just Mod:  Ptr: i8* %a	<->  %res = tail call ptr @__memcpy_chk(ptr %a, ptr %b, i64 4, i64 %n)
+; CHECK-NEXT:  Just Mod:  Ptr: i8* %res	<->  %res = tail call ptr @__memcpy_chk(ptr %a, ptr %b, i64 4, i64 %n)
+; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.1	<->  %res = tail call ptr @__memcpy_chk(ptr %a, ptr %b, i64 4, i64 %n)
+; CHECK-NEXT:  NoModRef:  Ptr: i8* %a.gep.5	<->  %res = tail call ptr @__memcpy_chk(ptr %a, ptr %b, i64 4, i64 %n)
+; CHECK-NEXT:  Just Ref:  Ptr: i8* %b.gep.1	<->  %res = tail call ptr @__memcpy_chk(ptr %a, ptr %b, i64 4, i64 %n)
+; CHECK-NEXT:  NoModRef:  Ptr: i8* %b.gep.5	<->  %res = tail call ptr @__memcpy_chk(ptr %a, ptr %b, i64 4, i64 %n)
 ;
 entry:
-  load i8, i8* %a
-  %res = tail call i8* @__memcpy_chk(i8* %a, i8* %b, i64 4, i64 %n)
-  load i8, i8* %res
-  %a.gep.1 = getelementptr i8, i8* %a, i32 1
-  store i8 0, i8* %a.gep.1
-  %a.gep.5 = getelementptr i8, i8* %a, i32 5
-  store i8 1, i8* %a.gep.5
-  %b.gep.1 = getelementptr i8, i8* %b, i32 1
-  store i8 0, i8* %b.gep.1
-  %b.gep.5 = getelementptr i8, i8* %b, i32 5
-  store i8 1, i8* %b.gep.5
-  ret i8* %res
+  load i8, ptr %a
+  %res = tail call ptr @__memcpy_chk(ptr %a, ptr %b, i64 4, i64 %n)
+  load i8, ptr %res
+  %a.gep.1 = getelementptr i8, ptr %a, i32 1
+  store i8 0, ptr %a.gep.1
+  %a.gep.5 = getelementptr i8, ptr %a, i32 5
+  store i8 1, ptr %a.gep.5
+  %b.gep.1 = getelementptr i8, ptr %b, i32 1
+  store i8 0, ptr %b.gep.1
+  %b.gep.5 = getelementptr i8, ptr %b, i32 5
+  store i8 1, ptr %b.gep.5
+  ret ptr %res
 }
 
-define i8* @test_memcpy_chk_variable_size(i8* noalias %a, i8* noalias %b, i64 %n.1, i64 %n.2) {
+define ptr @test_memcpy_chk_variable_size(ptr noalias %a, ptr noalias %b, i64 %n.1, i64 %n.2) {
 ; CHECK-LABEL: Function: test_memcpy_chk_variable_size
-; CHECK:       Just Mod:  Ptr: i8* %a	<->  %res = tail call i8* @__memcpy_chk(i8* %a, i8* %b, i64 %n.1, i64 %n.2)
-; CHECK-NEXT:  Just Mod:  Ptr: i8* %res	<->  %res = tail call i8* @__memcpy_chk(i8* %a, i8* %b, i64 %n.1, i64 %n.2)
-; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.1	<->  %res = tail call i8* @__memcpy_chk(i8* %a, i8* %b, i64 %n.1, i64 %n.2)
-; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.5	<->  %res = tail call i8* @__memcpy_chk(i8* %a, i8* %b, i64 %n.1, i64 %n.2)
-; CHECK-NEXT:  Just Ref:  Ptr: i8* %b.gep.1	<->  %res = tail call i8* @__memcpy_chk(i8* %a, i8* %b, i64 %n.1, i64 %n.2)
-; CHECK-NEXT:  Just Ref:  Ptr: i8* %b.gep.5	<->  %res = tail call i8* @__memcpy_chk(i8* %a, i8* %b, i64 %n.1, i64 %n.2)
+; CHECK:       Just Mod:  Ptr: i8* %a	<->  %res = tail call ptr @__memcpy_chk(ptr %a, ptr %b, i64 %n.1, i64 %n.2)
+; CHECK-NEXT:  Just Mod:  Ptr: i8* %res	<->  %res = tail call ptr @__memcpy_chk(ptr %a, ptr %b, i64 %n.1, i64 %n.2)
+; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.1	<->  %res = tail call ptr @__memcpy_chk(ptr %a, ptr %b, i64 %n.1, i64 %n.2)
+; CHECK-NEXT:  Just Mod:  Ptr: i8* %a.gep.5	<->  %res = tail call ptr @__memcpy_chk(ptr %a, ptr %b, i64 %n.1, i64 %n.2)
+; CHECK-NEXT:  Just Ref:  Ptr: i8* %b.gep.1	<->  %res = tail call ptr @__memcpy_chk(ptr %a, ptr %b, i64 %n.1, i64 %n.2)
+; CHECK-NEXT:  Just Ref:  Ptr: i8* %b.gep.5	<->  %res = tail call ptr @__memcpy_chk(ptr %a, ptr %b, i64 %n.1, i64 %n.2)
 ;
 entry:
-  load i8, i8* %a
-  %res = tail call i8* @__memcpy_chk(i8* %a, i8* %b, i64 %n.1, i64 %n.2)
-  load i8, i8* %res
-  %a.gep.1 = getelementptr i8, i8* %a, i32 1
-  store i8 0, i8* %a.gep.1
-  %a.gep.5 = getelementptr i8, i8* %a, i32 5
-  store i8 1, i8* %a.gep.5
-  %b.gep.1 = getelementptr i8, i8* %b, i32 1
-  store i8 0, i8* %b.gep.1
-  %b.gep.5 = getelementptr i8, i8* %b, i32 5
-  store i8 1, i8* %b.gep.5
-  ret i8* %res
+  load i8, ptr %a
+  %res = tail call ptr @__memcpy_chk(ptr %a, ptr %b, i64 %n.1, i64 %n.2)
+  load i8, ptr %res
+  %a.gep.1 = getelementptr i8, ptr %a, i32 1
+  store i8 0, ptr %a.gep.1
+  %a.gep.5 = getelementptr i8, ptr %a, i32 5
+  store i8 1, ptr %a.gep.5
+  %b.gep.1 = getelementptr i8, ptr %b, i32 1
+  store i8 0, ptr %b.gep.1
+  %b.gep.5 = getelementptr i8, ptr %b, i32 5
+  store i8 1, ptr %b.gep.5
+  ret ptr %res
 }

diff  --git a/llvm/test/Analysis/BasicAA/must-and-partial.ll b/llvm/test/Analysis/BasicAA/must-and-partial.ll
index 1190ae8f68d4..5d3dcd1e5239 100644
--- a/llvm/test/Analysis/BasicAA/must-and-partial.ll
+++ b/llvm/test/Analysis/BasicAA/must-and-partial.ll
@@ -6,34 +6,32 @@
 
 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
 
-; CHECK: PartialAlias:  i16* %bigbase0, i8* %phi
-define i8 @test0(i8* %base, i1 %x) {
+; CHECK: PartialAlias:  i16* %base, i8* %phi
+define i8 @test0(ptr %base, i1 %x) {
 entry:
-  %baseplusone = getelementptr i8, i8* %base, i64 1
+  %baseplusone = getelementptr i8, ptr %base, i64 1
   br i1 %x, label %red, label %green
 red:
   br label %green
 green:
-  %phi = phi i8* [ %baseplusone, %red ], [ %base, %entry ]
-  store i8 0, i8* %phi
+  %phi = phi ptr [ %baseplusone, %red ], [ %base, %entry ]
+  store i8 0, ptr %phi
 
-  %bigbase0 = bitcast i8* %base to i16*
-  store i16 -1, i16* %bigbase0
+  store i16 -1, ptr %base
 
-  %loaded = load i8, i8* %phi
+  %loaded = load i8, ptr %phi
   ret i8 %loaded
 }
 
-; CHECK: PartialAlias:  i16* %bigbase1, i8* %sel
-define i8 @test1(i8* %base, i1 %x) {
+; CHECK: PartialAlias:  i16* %base, i8* %sel
+define i8 @test1(ptr %base, i1 %x) {
 entry:
-  %baseplusone = getelementptr i8, i8* %base, i64 1
-  %sel = select i1 %x, i8* %baseplusone, i8* %base
-  store i8 0, i8* %sel
+  %baseplusone = getelementptr i8, ptr %base, i64 1
+  %sel = select i1 %x, ptr %baseplusone, ptr %base
+  store i8 0, ptr %sel
 
-  %bigbase1 = bitcast i8* %base to i16*
-  store i16 -1, i16* %bigbase1
+  store i16 -1, ptr %base
 
-  %loaded = load i8, i8* %sel
+  %loaded = load i8, ptr %sel
   ret i8 %loaded
 }

diff  --git a/llvm/test/Analysis/BasicAA/negoffset.ll b/llvm/test/Analysis/BasicAA/negoffset.ll
index 2e5122af2bb7..addeabf17b0e 100644
--- a/llvm/test/Analysis/BasicAA/negoffset.ll
+++ b/llvm/test/Analysis/BasicAA/negoffset.ll
@@ -3,68 +3,65 @@
 target datalayout = "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128"
 target triple = "i386-unknown-linux-gnu"
 
-declare i32* @random.i32(i32* %ptr)
-declare i8* @random.i8(i32* %ptr)
+declare ptr @random.i32(ptr %ptr)
+declare ptr @random.i8(ptr %ptr)
 
 ; CHECK-LABEL: Function: arr:
 ; CHECK-DAG: MayAlias: i32* %alloca, i32* %p0
 ; CHECK-DAG: NoAlias:  i32* %alloca, i32* %p1
 define void @arr() {
   %alloca = alloca i32, i32 4
-  %random = call i32* @random.i32(i32* %alloca)
-  %p0 = getelementptr inbounds i32, i32* %random, i32 0
-  %p1 = getelementptr inbounds i32, i32* %random, i32 1
-  load i32, i32* %alloca
-  load i32, i32* %p0
-  load i32, i32* %p1
+  %random = call ptr @random.i32(ptr %alloca)
+  %p0 = getelementptr inbounds i32, ptr %random, i32 0
+  %p1 = getelementptr inbounds i32, ptr %random, i32 1
+  load i32, ptr %alloca
+  load i32, ptr %p0
+  load i32, ptr %p1
   ret void
 }
 
 ; CHECK-LABEL: Function: arg:
 ; CHECK-DAG: MayAlias: i32* %arg, i32* %p0
 ; CHECK-DAG: MayAlias: i32* %arg, i32* %p1
-define void @arg(i32* %arg) {
-  %random = call i32* @random.i32(i32* %arg)
-  %p0 = getelementptr inbounds i32, i32* %random, i32 0
-  %p1 = getelementptr inbounds i32, i32* %random, i32 1
-  load i32, i32* %arg
-  load i32, i32* %p0
-  load i32, i32* %p1
+define void @arg(ptr %arg) {
+  %random = call ptr @random.i32(ptr %arg)
+  %p0 = getelementptr inbounds i32, ptr %random, i32 0
+  %p1 = getelementptr inbounds i32, ptr %random, i32 1
+  load i32, ptr %arg
+  load i32, ptr %p0
+  load i32, ptr %p1
   ret void
 }
 
 @gv = global i32 1
 ; CHECK-LABEL: Function: global:
-; CHECK-DAG: MayAlias: i32* %p0, i32* @gv
+; CHECK-DAG: MayAlias: i32* %random, i32* @gv
 ; CHECK-DAG: NoAlias:  i32* %p1, i32* @gv
 define void @global() {
-  %random = call i32* @random.i32(i32* @gv)
-  %p0 = getelementptr inbounds i32, i32* %random, i32 0
-  %p1 = getelementptr inbounds i32, i32* %random, i32 1
-  load i32, i32* @gv
-  load i32, i32* %p0
-  load i32, i32* %p1
+  %random = call ptr @random.i32(ptr @gv)
+  %p1 = getelementptr inbounds i32, ptr %random, i32 1
+  load i32, ptr @gv
+  load i32, ptr %random
+  load i32, ptr %p1
   ret void
 }
 
 ; CHECK-LABEL: Function: struct:
-; CHECK-DAG:  MayAlias: i32* %f0, i32* %p0
+; CHECK-DAG:  MayAlias: i32* %alloca, i32* %p0
 ; CHECK-DAG:  MayAlias: i32* %f1, i32* %p0
-; CHECK-DAG:  NoAlias:  i32* %f0, i32* %p1
+; CHECK-DAG:  NoAlias:  i32* %alloca, i32* %p1
 ; CHECK-DAG:  MayAlias: i32* %f1, i32* %p1
 %struct = type { i32, i32, i32 }
 define void @struct() {
   %alloca = alloca %struct
-  %alloca.i32 = bitcast %struct* %alloca to i32*
-  %random = call i32* @random.i32(i32* %alloca.i32)
-  %f0 = getelementptr inbounds %struct, %struct* %alloca, i32 0, i32 0
-  %f1 = getelementptr inbounds %struct, %struct* %alloca, i32 0, i32 1
-  %p0 = getelementptr inbounds i32, i32* %random, i32 0
-  %p1 = getelementptr inbounds i32, i32* %random, i32 1
-  load i32, i32* %f0
-  load i32, i32* %f1
-  load i32, i32* %p0
-  load i32, i32* %p1
+  %random = call ptr @random.i32(ptr %alloca)
+  %f1 = getelementptr inbounds %struct, ptr %alloca, i32 0, i32 1
+  %p0 = getelementptr inbounds i32, ptr %random, i32 0
+  %p1 = getelementptr inbounds i32, ptr %random, i32 1
+  load i32, ptr %alloca
+  load i32, ptr %f1
+  load i32, ptr %p0
+  load i32, ptr %p1
   ret void
 }
 
@@ -80,21 +77,19 @@ define void @struct() {
 %complex = type { i32, i32, [4 x i32] }
 define void @complex1(i32 %i) {
   %alloca = alloca %complex
-  %alloca.i32 = bitcast %complex* %alloca to i32*
-  %r.i32 = call i32* @random.i32(i32* %alloca.i32)
-  %random = bitcast i32* %r.i32 to %complex*
-  %a1 = getelementptr inbounds %complex, %complex* %alloca, i32 0, i32 1
-  %a2.0 = getelementptr inbounds %complex, %complex* %alloca, i32 0, i32 2, i32 0
-  %r2.0 = getelementptr inbounds %complex, %complex* %random, i32 0, i32 2, i32 0
-  %r2.1 = getelementptr inbounds %complex, %complex* %random, i32 0, i32 2, i32 1
-  %r2.i = getelementptr inbounds %complex, %complex* %random, i32 0, i32 2, i32 %i
-  %r2.1i = getelementptr inbounds i32, i32* %r2.1, i32 %i
-  load i32, i32* %a2.0
-  load i32, i32* %a1
-  load i32, i32* %r2.0
-  load i32, i32* %r2.1
-  load i32, i32* %r2.i
-  load i32, i32* %r2.1i
+  %r.i32 = call ptr @random.i32(ptr %alloca)
+  %a1 = getelementptr inbounds %complex, ptr %alloca, i32 0, i32 1
+  %a2.0 = getelementptr inbounds %complex, ptr %alloca, i32 0, i32 2, i32 0
+  %r2.0 = getelementptr inbounds %complex, ptr %r.i32, i32 0, i32 2, i32 0
+  %r2.1 = getelementptr inbounds %complex, ptr %r.i32, i32 0, i32 2, i32 1
+  %r2.i = getelementptr inbounds %complex, ptr %r.i32, i32 0, i32 2, i32 %i
+  %r2.1i = getelementptr inbounds i32, ptr %r2.1, i32 %i
+  load i32, ptr %a2.0
+  load i32, ptr %a1
+  load i32, ptr %r2.0
+  load i32, ptr %r2.1
+  load i32, ptr %r2.i
+  load i32, ptr %r2.1i
   ret void
 }
 
@@ -105,50 +100,48 @@ define void @complex1(i32 %i) {
 ; CHECK-DAG: MayAlias: i32* %a3, i32* %pij1
 %inner = type { i32, i32 }
 %outer = type { i32, i32, [10 x %inner] }
-declare %outer* @rand_outer(i32* %p)
+declare ptr @rand_outer(ptr %p)
 define void @complex2(i32 %i, i32 %j) {
   %alloca = alloca i32, i32 128
-  %a3 = getelementptr inbounds i32, i32* %alloca, i32 3
-  %random = call %outer* @rand_outer(i32* %alloca)
-  %p120 = getelementptr inbounds %outer, %outer* %random, i32 1, i32 2, i32 2, i32 0
-  %pi20 = getelementptr inbounds %outer, %outer* %random, i32 %i, i32 2, i32 2, i32 0
-  %pij1 = getelementptr inbounds %outer, %outer* %random, i32 %i, i32 2, i32 %j, i32 1
-  load i32, i32* %alloca
-  load i32, i32* %a3
-  load i32, i32* %p120
-  load i32, i32* %pi20
-  load i32, i32* %pij1
+  %a3 = getelementptr inbounds i32, ptr %alloca, i32 3
+  %random = call ptr @rand_outer(ptr %alloca)
+  %p120 = getelementptr inbounds %outer, ptr %random, i32 1, i32 2, i32 2, i32 0
+  %pi20 = getelementptr inbounds %outer, ptr %random, i32 %i, i32 2, i32 2, i32 0
+  %pij1 = getelementptr inbounds %outer, ptr %random, i32 %i, i32 2, i32 %j, i32 1
+  load i32, ptr %alloca
+  load i32, ptr %a3
+  load i32, ptr %p120
+  load i32, ptr %pi20
+  load i32, ptr %pij1
   ret void
 }
 
 ; CHECK-LABEL: Function: pointer_offset:
-; CHECK-DAG: MayAlias: i32** %add.ptr, i32** %p1
-; CHECK-DAG: MayAlias: i32** %add.ptr, i32** %q2
-%struct.X = type { i32*, i32* }
+; CHECK-DAG: MayAlias: ptr* %add.ptr, ptr* %x
+; CHECK-DAG: MayAlias: ptr* %add.ptr, ptr* %q2
+%struct.X = type { ptr, ptr }
 define i32 @pointer_offset(i32 signext %i, i32 signext %j, i32 zeroext %off) {
 entry:
   %i.addr = alloca i32
   %j.addr = alloca i32
   %x = alloca %struct.X
-  store i32 %i, i32* %i.addr
-  store i32 %j, i32* %j.addr
-  %0 = bitcast %struct.X* %x to i8*
-  %p1 = getelementptr inbounds %struct.X, %struct.X* %x, i32 0, i32 0
-  store i32* %i.addr, i32** %p1
-  %q2 = getelementptr inbounds %struct.X, %struct.X* %x, i32 0, i32 1
-  store i32* %j.addr, i32** %q2
-  %add.ptr = getelementptr inbounds i32*, i32** %q2, i32 %off
-  %1 = load i32*, i32** %add.ptr
-  %2 = load i32, i32* %1
-  ret i32 %2
+  store i32 %i, ptr %i.addr
+  store i32 %j, ptr %j.addr
+  store ptr %i.addr, ptr %x
+  %q2 = getelementptr inbounds %struct.X, ptr %x, i32 0, i32 1
+  store ptr %j.addr, ptr %q2
+  %add.ptr = getelementptr inbounds ptr, ptr %q2, i32 %off
+  %0 = load ptr, ptr %add.ptr
+  %1 = load i32, ptr %0
+  ret i32 %1
 }
 
 ; CHECK-LABEL: Function: one_size_unknown:
-; CHECK: NoModRef:  Ptr: i8* %p.minus1	<->  call void @llvm.memset.p0i8.i32(i8* %p, i8 0, i32 %size, i1 false)
-define void @one_size_unknown(i8* %p, i32 %size) {
-  %p.minus1 = getelementptr inbounds i8, i8* %p, i32 -1
-  call void @llvm.memset.p0i8.i32(i8* %p, i8 0, i32 %size, i1 false)
-  load i8, i8* %p.minus1
+; CHECK: NoModRef:  Ptr: i8* %p.minus1	<->  call void @llvm.memset.p0.i32(ptr %p, i8 0, i32 %size, i1 false)
+define void @one_size_unknown(ptr %p, i32 %size) {
+  %p.minus1 = getelementptr inbounds i8, ptr %p, i32 -1
+  call void @llvm.memset.p0.i32(ptr %p, i8 0, i32 %size, i1 false)
+  load i8, ptr %p.minus1
   ret void
 }
 
@@ -158,36 +151,34 @@ define void @one_size_unknown(i8* %p, i32 %size) {
 ; %random = %alloc - 4 bytes is well defined, and results in %step == %alloca,
 ; leaving %p as an entirely inbounds gep pointing inside %alloca
 ; CHECK-LABEL: Function: all_inbounds:
-; CHECK: MayAlias: i32* %alloca, i8* %p0
+; CHECK: MayAlias: i32* %alloca, i8* %random
 ; CHECK: MayAlias:  i32* %alloca, i8* %p1
 define void @all_inbounds() {
   %alloca = alloca i32, i32 4
-  %random = call i8* @random.i8(i32* %alloca)
-  %p0 = getelementptr inbounds i8, i8* %random, i8 0
-  %step = getelementptr i8, i8* %random, i8 4
-  %p1 = getelementptr inbounds i8, i8* %step, i8 2
-  load i32, i32* %alloca
-  load i8, i8* %p0
-  load i8, i8* %p1
+  %random = call ptr @random.i8(ptr %alloca)
+  %step = getelementptr i8, ptr %random, i8 4
+  %p1 = getelementptr inbounds i8, ptr %step, i8 2
+  load i32, ptr %alloca
+  load i8, ptr %random
+  load i8, ptr %p1
   ret void
 }
 
 
-; For all values of %x, %p0 and %p1 can't alias because %random would
+; For all values of %x, %random and %p1 can't alias because %random would
 ; have to be out of bounds (and thus a contradiction) for them to be equal.
 ; CHECK-LABEL: Function: common_factor:
 ; CHECK: NoAlias:  i32* %p0, i32* %p1
 define void @common_factor(i32 %x) {
   %alloca = alloca i32, i32 4
-  %random = call i8* @random.i8(i32* %alloca)
-  %p0 = getelementptr inbounds i32, i32* %alloca, i32 %x
-  %step = getelementptr inbounds i8, i8* %random, i8 4
-  %step.bitcast = bitcast i8* %step to i32*
-  %p1 = getelementptr inbounds i32, i32* %step.bitcast, i32 %x
-  load i32, i32* %p0
-  load i32, i32* %p1
+  %random = call ptr @random.i8(ptr %alloca)
+  %p0 = getelementptr inbounds i32, ptr %alloca, i32 %x
+  %step = getelementptr inbounds i8, ptr %random, i8 4
+  %p1 = getelementptr inbounds i32, ptr %step, i32 %x
+  load i32, ptr %p0
+  load i32, ptr %p1
   ret void
 }
 
 
-declare void @llvm.memset.p0i8.i32(i8*, i8, i32, i1)
+declare void @llvm.memset.p0.i32(ptr, i8, i32, i1)

diff  --git a/llvm/test/Analysis/BasicAA/noalias-geps.ll b/llvm/test/Analysis/BasicAA/noalias-geps.ll
index a7cfc4035294..67b838007ec4 100644
--- a/llvm/test/Analysis/BasicAA/noalias-geps.ll
+++ b/llvm/test/Analysis/BasicAA/noalias-geps.ll
@@ -3,62 +3,59 @@
 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128"
 
 ; Check that geps with equal base offsets of noalias base pointers stay noalias.
-define i32 @test(i32* %p, i16 %i) {
+define i32 @test(ptr %p, i16 %i) {
 ; CHECK-LABEL: Function: test:
-  %pi = getelementptr i32, i32* %p, i32 0
-  %pi.next = getelementptr i32, i32* %p, i32 1
+  %pi.next = getelementptr i32, ptr %p, i32 1
   %b = icmp eq i16 %i, 0
   br i1 %b, label %bb1, label %bb2
 
 bb1:
-  %f = getelementptr i32, i32* %pi, i32 1
-  %g = getelementptr i32, i32* %pi.next, i32 1
+  %f = getelementptr i32, ptr %p, i32 1
+  %g = getelementptr i32, ptr %pi.next, i32 1
   br label %bb3
 bb2:
-  %f2 = getelementptr i32, i32* %pi, i32 1
-  %g2 = getelementptr i32, i32* %pi.next, i32 1
+  %f2 = getelementptr i32, ptr %p, i32 1
+  %g2 = getelementptr i32, ptr %pi.next, i32 1
   br label %bb3
 
 bb3:
-  %ptr_phi = phi i32* [ %f, %bb1 ], [ %f2, %bb2 ]
-  %ptr_phi2 = phi i32* [ %g, %bb1 ], [ %g2, %bb2 ]
+  %ptr_phi = phi ptr [ %f, %bb1 ], [ %f2, %bb2 ]
+  %ptr_phi2 = phi ptr [ %g, %bb1 ], [ %g2, %bb2 ]
 ; CHECK: NoAlias: i32* %f1, i32* %g1
-  %f1 = getelementptr i32, i32* %ptr_phi , i32 1
-  %g1 = getelementptr i32, i32* %ptr_phi2 , i32 1
+  %f1 = getelementptr i32, ptr %ptr_phi , i32 1
+  %g1 = getelementptr i32, ptr %ptr_phi2 , i32 1
 ; This should also work if the access size is not the same.
-; CHECK: NoAlias: i32* %f1, i16* %h1
-  %h1 = bitcast i32* %g1 to i16*
-  load i32, i32* %f1
-  load i32, i32* %g1
-  load i16, i16* %h1
+; CHECK: NoAlias: i32* %f1, i16* %g1
+  load i32, ptr %f1
+  load i32, ptr %g1
+  load i16, ptr %g1
 
 ret i32 0
 }
 
 ; Check that geps with equal indices of noalias base pointers stay noalias.
-define i32 @test2([2 x i32]* %p, i32 %i) {
+define i32 @test2(ptr %p, i32 %i) {
 ; CHECK-LABEL: Function: test2:
-  %pi = getelementptr [2 x i32], [2 x i32]* %p, i32 0
-  %pi.next = getelementptr [2 x i32], [2 x i32]* %p, i32 1
+  %pi.next = getelementptr [2 x i32], ptr %p, i32 1
   %b = icmp eq i32 %i, 0
   br i1 %b, label %bb1, label %bb2
 
 bb1:
-  %f = getelementptr [2 x i32], [2 x i32]* %pi, i32 1
-  %g = getelementptr [2 x i32], [2 x i32]* %pi.next, i32 1
+  %f = getelementptr [2 x i32], ptr %p, i32 1
+  %g = getelementptr [2 x i32], ptr %pi.next, i32 1
   br label %bb3
 bb2:
-  %f2 = getelementptr [2 x i32], [2 x i32]* %pi, i32 1
-  %g2 = getelementptr [2 x i32], [2 x i32]* %pi.next, i32 1
+  %f2 = getelementptr [2 x i32], ptr %p, i32 1
+  %g2 = getelementptr [2 x i32], ptr %pi.next, i32 1
   br label %bb3
 bb3:
-  %ptr_phi = phi [2 x i32]* [ %f, %bb1 ], [ %f2, %bb2 ]
-  %ptr_phi2 = phi [2 x i32]* [ %g, %bb1 ], [ %g2, %bb2 ]
+  %ptr_phi = phi ptr [ %f, %bb1 ], [ %f2, %bb2 ]
+  %ptr_phi2 = phi ptr [ %g, %bb1 ], [ %g2, %bb2 ]
 ; CHECK: NoAlias: i32* %f1, i32* %g1
-  %f1 = getelementptr [2 x i32], [2 x i32]* %ptr_phi , i32 1, i32 %i
-  %g1 = getelementptr [2 x i32], [2 x i32]* %ptr_phi2 , i32 1, i32 %i
-  load i32, i32* %f1
-  load i32, i32* %g1
+  %f1 = getelementptr [2 x i32], ptr %ptr_phi , i32 1, i32 %i
+  %g1 = getelementptr [2 x i32], ptr %ptr_phi2 , i32 1, i32 %i
+  load i32, ptr %f1
+  load i32, ptr %g1
 
 ret i32 0
 }

diff  --git a/llvm/test/Analysis/BasicAA/noalias-scope-decl.ll b/llvm/test/Analysis/BasicAA/noalias-scope-decl.ll
index 3262f8d7275b..6c9f5363e237 100644
--- a/llvm/test/Analysis/BasicAA/noalias-scope-decl.ll
+++ b/llvm/test/Analysis/BasicAA/noalias-scope-decl.ll
@@ -1,14 +1,14 @@
 ; RUN: opt < %s -aa-pipeline=basic-aa -passes=aa-eval -print-all-alias-modref-info -disable-output 2>&1 | FileCheck %s
 target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:32:64-v128:32:128-a0:0:32-n32"
 
-declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i1) #0
+declare void @llvm.memcpy.p0.p0.i64(ptr nocapture, ptr nocapture, i64, i1) #0
 declare void @llvm.experimental.noalias.scope.decl(metadata)
 
-define void @test1(i8* %P, i8* %Q) nounwind ssp {
-  load i8, i8* %P
-  load i8, i8* %Q
+define void @test1(ptr %P, ptr %Q) nounwind ssp {
+  load i8, ptr %P
+  load i8, ptr %Q
   tail call void @llvm.experimental.noalias.scope.decl(metadata !0)
-  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
+  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
   ret void
 
 ; CHECK-LABEL: Function: test1:
@@ -16,10 +16,10 @@ define void @test1(i8* %P, i8* %Q) nounwind ssp {
 ; CHECK: MayAlias:	i8* %P, i8* %Q
 ; CHECK: NoModRef:  Ptr: i8* %P	<->  tail call void @llvm.experimental.noalias.scope.decl(metadata !0)
 ; CHECK: NoModRef:  Ptr: i8* %Q	<->  tail call void @llvm.experimental.noalias.scope.decl(metadata !0)
-; CHECK: Both ModRef:  Ptr: i8* %P	<->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-; CHECK: Both ModRef:  Ptr: i8* %Q	<->  tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-; CHECK: NoModRef:   tail call void @llvm.experimental.noalias.scope.decl(metadata !0) <->   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false)
-; CHECK: NoModRef:   tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i1 false) <->   tail call void @llvm.experimental.noalias.scope.decl(metadata !0)
+; CHECK: Both ModRef:  Ptr: i8* %P	<->  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+; CHECK: Both ModRef:  Ptr: i8* %Q	<->  tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+; CHECK: NoModRef:   tail call void @llvm.experimental.noalias.scope.decl(metadata !0) <->   tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false)
+; CHECK: NoModRef:   tail call void @llvm.memcpy.p0.p0.i64(ptr %P, ptr %Q, i64 12, i1 false) <->   tail call void @llvm.experimental.noalias.scope.decl(metadata !0)
 }
 
 

diff  --git a/llvm/test/Analysis/BasicAA/phi-aa.ll b/llvm/test/Analysis/BasicAA/phi-aa.ll
index b12660e45517..dca3c9d1ecb4 100644
--- a/llvm/test/Analysis/BasicAA/phi-aa.ll
+++ b/llvm/test/Analysis/BasicAA/phi-aa.ll
@@ -24,10 +24,10 @@ bb1:
   br label %bb2
 
 bb2:
-  %P = phi i32* [ @X, %bb ], [ @Y, %bb1 ]
-  %tmp1 = load i32, i32* @Z, align 4
-  store i32 123, i32* %P, align 4
-  %tmp2 = load i32, i32* @Z, align 4
+  %P = phi ptr [ @X, %bb ], [ @Y, %bb1 ]
+  %tmp1 = load i32, ptr @Z, align 4
+  store i32 123, ptr %P, align 4
+  %tmp2 = load i32, ptr @Z, align 4
   br label %return
 
 return:
@@ -41,41 +41,41 @@ return:
 ; CHECK: MayAlias: i32* %0, i32* %arrayidx5
 ; CHECK: NoAlias: i32* %arrayidx13, i32* %arrayidx5
 
-define i32 @pr18068(i32* %jj7, i32* %j) {
+define i32 @pr18068(ptr %jj7, ptr %j) {
 entry:
   %oa5 = alloca [100 x i32], align 16
   br label %codeRepl
 
 codeRepl:
-  %0 = phi i32* [ %arrayidx13, %for.body ], [ %j, %entry ]
-  %targetBlock = call i1 @cond(i32* %jj7)
+  %0 = phi ptr [ %arrayidx13, %for.body ], [ %j, %entry ]
+  %targetBlock = call i1 @cond(ptr %jj7)
   br i1 %targetBlock, label %for.body, label %bye
 
 for.body:
-  %1 = load i32, i32* %jj7, align 4
+  %1 = load i32, ptr %jj7, align 4
   %idxprom4 = zext i32 %1 to i64
-  %arrayidx5 = getelementptr inbounds [100 x i32], [100 x i32]* %oa5, i64 0, i64 %idxprom4
-  %2 = load i32, i32* %arrayidx5, align 4
+  %arrayidx5 = getelementptr inbounds [100 x i32], ptr %oa5, i64 0, i64 %idxprom4
+  %2 = load i32, ptr %arrayidx5, align 4
   %sub6 = sub i32 %2, 6
-  store i32 %sub6, i32* %arrayidx5, align 4
+  store i32 %sub6, ptr %arrayidx5, align 4
   ; %0 and %arrayidx5 can alias! It is not safe to DSE the above store.
-  %3 = load i32, i32* %0, align 4
-  store i32 %3, i32* %arrayidx5, align 4
+  %3 = load i32, ptr %0, align 4
+  store i32 %3, ptr %arrayidx5, align 4
   %sub11 = add i32 %1, -1
   %idxprom12 = zext i32 %sub11 to i64
-  %arrayidx13 = getelementptr inbounds [100 x i32], [100 x i32]* %oa5, i64 0, i64 %idxprom12
-  load i32, i32* %arrayidx13
-  call void @inc(i32* %jj7)
+  %arrayidx13 = getelementptr inbounds [100 x i32], ptr %oa5, i64 0, i64 %idxprom12
+  load i32, ptr %arrayidx13
+  call void @inc(ptr %jj7)
   br label %codeRepl
 
 bye:
-  %.reload = load i32, i32* %jj7, align 4
+  %.reload = load i32, ptr %jj7, align 4
   ret i32 %.reload
 }
 
-declare i1 @cond(i32*)
+declare i1 @cond(ptr)
 
-declare void @inc(i32*)
+declare void @inc(ptr)
 
 
 ; When we have a chain of phis in nested loops we should recognise if there's
@@ -91,25 +91,25 @@ entry:
 
 loop1:
   %n1 = phi i32 [ 0, %entry ], [ %add1, %loop2 ]
-  %val1 = phi i32* [ @X, %entry ], [ %val2, %loop2 ]
-  load i32, i32* %val1
+  %val1 = phi ptr [ @X, %entry ], [ %val2, %loop2 ]
+  load i32, ptr %val1
   %add1 = add i32 %n1, 1
   %cmp1 = icmp ne i32 %n1, 32
   br i1 %cmp1, label %loop2, label %end
 
 loop2:
   %n2 = phi i32 [ 0, %loop1 ], [ %add2, %loop3 ]
-  %val2 = phi i32* [ %val1, %loop1 ], [ %val3, %loop3 ]
-  load i32, i32* %val2
+  %val2 = phi ptr [ %val1, %loop1 ], [ %val3, %loop3 ]
+  load i32, ptr %val2
   %add2 = add i32 %n2, 1
   %cmp2 = icmp ne i32 %n2, 32
   br i1 %cmp2, label %loop3, label %loop1
 
 loop3:
   %n3 = phi i32 [ 0, %loop2 ], [ %add3, %loop3 ]
-  %val3 = phi i32* [ %val2, %loop2 ], [ %val3, %loop3 ]
-  store i32 0, i32* %val3, align 4
-  store i32 0, i32* @Y, align 4
+  %val3 = phi ptr [ %val2, %loop2 ], [ %val3, %loop3 ]
+  store i32 0, ptr %val3, align 4
+  store i32 0, ptr @Y, align 4
   %add3 = add i32 %n3, 1
   %cmp3 = icmp ne i32 %n3, 32
   br i1 %cmp3, label %loop3, label %loop2
@@ -120,7 +120,7 @@ end:
 
 ; CHECK-LABEL: phi_and_select
 ; CHECK: MustAlias: i32* %p, i32* %s
-define void @phi_and_select(i1 %c, i1 %c2, i32* %x, i32* %y) {
+define void @phi_and_select(i1 %c, i1 %c2, ptr %x, ptr %y) {
 entry:
   br i1 %c, label %true, label %false
 
@@ -131,33 +131,33 @@ false:
   br label %exit
 
 exit:
-  %p = phi i32* [ %x, %true ], [ %y, %false ]
-  %s = select i1 %c2, i32* %p, i32* %p
-  store i32 0, i32* %p
-  store i32 0, i32* %s
+  %p = phi ptr [ %x, %true ], [ %y, %false ]
+  %s = select i1 %c2, ptr %p, ptr %p
+  store i32 0, ptr %p
+  store i32 0, ptr %s
   ret void
 }
 
 ; CHECK-LABEL: phi_and_phi_cycle
 ; CHECK: NoAlias: i32* %p1, i32* %p2
-define void @phi_and_phi_cycle(i32* noalias %x, i32* noalias %y) {
+define void @phi_and_phi_cycle(ptr noalias %x, ptr noalias %y) {
 entry:
   br label %loop
 
 loop:
-  %p1 = phi i32* [ %x, %entry ], [ %p1.next, %loop ]
-  %p2 = phi i32* [ %y, %entry ], [ %p2.next, %loop ]
-  %p1.next = getelementptr i32, i32* %p1, i64 1
-  %p2.next = getelementptr i32, i32* %p1, i64 2
-  store i32 0, i32* %p1
-  store i32 0, i32* %p2
+  %p1 = phi ptr [ %x, %entry ], [ %p1.next, %loop ]
+  %p2 = phi ptr [ %y, %entry ], [ %p2.next, %loop ]
+  %p1.next = getelementptr i32, ptr %p1, i64 1
+  %p2.next = getelementptr i32, ptr %p1, i64 2
+  store i32 0, ptr %p1
+  store i32 0, ptr %p2
   br label %loop
 }
 
 ; CHECK-LABEL: phi_and_gep_unknown_size
-; CHECK: Just Mod:   call void @llvm.memset.p0i8.i32(i8* %g, i8 0, i32 %size, i1 false) <->   call void @llvm.memset.p0i8.i32(i8* %z, i8 0, i32 %size, i1 false)
+; CHECK: Just Mod:   call void @llvm.memset.p0.i32(ptr %g, i8 0, i32 %size, i1 false) <->   call void @llvm.memset.p0.i32(ptr %z, i8 0, i32 %size, i1 false)
 ; TODO: This should be NoModRef.
-define void @phi_and_gep_unknown_size(i1 %c, i8* %x, i8* %y, i8* noalias %z, i32 %size) {
+define void @phi_and_gep_unknown_size(i1 %c, ptr %x, ptr %y, ptr noalias %z, i32 %size) {
 entry:
   br i1 %c, label %true, label %false
 
@@ -168,14 +168,14 @@ false:
   br label %exit
 
 exit:
-  %p = phi i8* [ %x, %true ], [ %y, %false ]
-  %g = getelementptr inbounds i8, i8* %p, i64 1
-  call void @llvm.memset.p0i8.i32(i8* %g, i8 0, i32 %size, i1 false)
-  call void @llvm.memset.p0i8.i32(i8* %z, i8 0, i32 %size, i1 false)
+  %p = phi ptr [ %x, %true ], [ %y, %false ]
+  %g = getelementptr inbounds i8, ptr %p, i64 1
+  call void @llvm.memset.p0.i32(ptr %g, i8 0, i32 %size, i1 false)
+  call void @llvm.memset.p0.i32(ptr %z, i8 0, i32 %size, i1 false)
   ret void
 }
 
-declare void @llvm.memset.p0i8.i32(i8*, i8, i32, i1)
+declare void @llvm.memset.p0.i32(ptr, i8, i32, i1)
 
 ; CHECK-LABEL: unsound_inequality
 ; CHECK: MayAlias:  i32* %arrayidx5, i32* %phi
@@ -184,21 +184,21 @@ declare void @llvm.memset.p0i8.i32(i8*, i8, i32, i1)
 
 ; When recursively reasoning about phis, we can't use predicates between
 ; two values as we might be comparing the two from 
diff erent iterations.
-define i32 @unsound_inequality(i32* %jj7, i32* %j) {
+define i32 @unsound_inequality(ptr %jj7, ptr %j) {
 entry:
   %oa5 = alloca [100 x i32], align 16
   br label %for.body
 
 for.body:                                         ; preds = %for.body, %entry
-  %phi = phi i32* [ %arrayidx13, %for.body ], [ %j, %entry ]
-  load i32, i32* %phi
-  %idx = load i32, i32* %jj7, align 4
-  %arrayidx5 = getelementptr inbounds [100 x i32], [100 x i32]* %oa5, i64 0, i32 %idx
-  store i32 0, i32* %arrayidx5, align 4
-  store i32 0, i32* %phi, align 4
+  %phi = phi ptr [ %arrayidx13, %for.body ], [ %j, %entry ]
+  load i32, ptr %phi
+  %idx = load i32, ptr %jj7, align 4
+  %arrayidx5 = getelementptr inbounds [100 x i32], ptr %oa5, i64 0, i32 %idx
+  store i32 0, ptr %arrayidx5, align 4
+  store i32 0, ptr %phi, align 4
   %notequal = add i32 %idx, 1
-  %arrayidx13 = getelementptr inbounds [100 x i32], [100 x i32]* %oa5, i64 0, i32 %notequal
-  store i32 0, i32* %arrayidx13, align 4
+  %arrayidx13 = getelementptr inbounds [100 x i32], ptr %oa5, i64 0, i32 %notequal
+  store i32 0, ptr %arrayidx13, align 4
   br label %for.body
 } 
 
@@ -206,22 +206,22 @@ for.body:                                         ; preds = %for.body, %entry
 ; CHECK: NoAlias: i32* %ptr, i32* %ptr.next
 ; CHECK: MustAlias: i32* %ptr, i32* %ptr.phi
 ; CHECK: MustAlias: i32* %ptr.next, i32* %ptr.next.phi
-define void @single_arg_phi(i32* %ptr.base) {
+define void @single_arg_phi(ptr %ptr.base) {
 entry:
   br label %loop
 
 loop:
-  %ptr = phi i32* [ %ptr.base, %entry ], [ %ptr.next, %split ]
-  %ptr.next = getelementptr inbounds i32, i32* %ptr, i64 1
-  load i32, i32* %ptr
-  load i32, i32* %ptr.next
+  %ptr = phi ptr [ %ptr.base, %entry ], [ %ptr.next, %split ]
+  %ptr.next = getelementptr inbounds i32, ptr %ptr, i64 1
+  load i32, ptr %ptr
+  load i32, ptr %ptr.next
   br label %split
 
 split:
-  %ptr.phi = phi i32* [ %ptr, %loop ]
-  %ptr.next.phi = phi i32* [ %ptr.next, %loop ]
-  load i32, i32* %ptr.phi
-  load i32, i32* %ptr.next.phi
+  %ptr.phi = phi ptr [ %ptr, %loop ]
+  %ptr.next.phi = phi ptr [ %ptr.next, %loop ]
+  load i32, ptr %ptr.phi
+  load i32, ptr %ptr.next.phi
   br label %loop
 }
 
@@ -229,22 +229,21 @@ split:
 ; CHECK: NoAlias:	i32* %gep3, i32* %phi
 define void @phi_of_geps_based_on_alloca(i1 %c) {
   %a = alloca [3 x i32]
-  %p = bitcast [3 x i32]* %a to i32*
   br i1 %c, label %if, label %else
 
 if:
-  %gep1 = getelementptr i32, i32* %p, i64 1
+  %gep1 = getelementptr i32, ptr %a, i64 1
   br label %join
 
 else:
-  %gep2 = getelementptr i32, i32* %p, i64 2
+  %gep2 = getelementptr i32, ptr %a, i64 2
   br label %join
 
 join:
-  %phi = phi i32* [ %gep1, %if ], [ %gep2, %else ]
-  %gep3 = getelementptr i32, i32* %p, i64 3
-  load i32, i32* %phi
-  load i32, i32* %gep3
+  %phi = phi ptr [ %gep1, %if ], [ %gep2, %else ]
+  %gep3 = getelementptr i32, ptr %a, i64 3
+  load i32, ptr %phi
+  load i32, ptr %gep3
   ret void
 }
 
@@ -259,9 +258,9 @@ loopexit:                                         ; No predecessors!
   br label %outer
 
 outer:                                            ; preds = %loopexit, %entry
-  %phi = phi i32* [ %loaded.ptr, %loopexit ], [ null, %entry ]
-  store i32 0, i32* %phi, align 4
-  %loaded.ptr = load i32*, i32** null, align 8
-  %0 = load i32, i32* %loaded.ptr, align 4
+  %phi = phi ptr [ %loaded.ptr, %loopexit ], [ null, %entry ]
+  store i32 0, ptr %phi, align 4
+  %loaded.ptr = load ptr, ptr null, align 8
+  %0 = load i32, ptr %loaded.ptr, align 4
   ret void
 }

diff  --git a/llvm/test/Analysis/BasicAA/phi-spec-order.ll b/llvm/test/Analysis/BasicAA/phi-spec-order.ll
index 2dcf21f98aeb..566e9c267aeb 100644
--- a/llvm/test/Analysis/BasicAA/phi-spec-order.ll
+++ b/llvm/test/Analysis/BasicAA/phi-spec-order.ll
@@ -22,41 +22,36 @@ for.cond2.preheader:                              ; preds = %for.end, %entry
   br label %for.body4
 
 for.body4:                                        ; preds = %for.body4, %for.cond2.preheader
-  %lsr.iv4 = phi [16000 x double]* [ %i11, %for.body4 ], [ bitcast (double* getelementptr inbounds ([16000 x double], [16000 x double]* @Y, i64 0, i64 8)
- to [16000 x double]*), %for.cond2.preheader ]
-  %lsr.iv1 = phi [16000 x double]* [ %i10, %for.body4 ], [ @X, %for.cond2.preheader ]
+  %lsr.iv4 = phi ptr [ %scevgep5, %for.body4 ], [ getelementptr inbounds ([16000 x double], ptr @Y, i64 0, i64 8), %for.cond2.preheader ]
+  %lsr.iv1 = phi ptr [ %scevgep, %for.body4 ], [ @X, %for.cond2.preheader ]
 
   %lsr.iv = phi i32 [ %lsr.iv.next, %for.body4 ], [ 16000, %for.cond2.preheader ]
-  load [16000 x double], [16000 x double]* %lsr.iv4
-  load [16000 x double], [16000 x double]* %lsr.iv1
-  %lsr.iv46 = bitcast [16000 x double]* %lsr.iv4 to <4 x double>*
-  %lsr.iv12 = bitcast [16000 x double]* %lsr.iv1 to <4 x double>*
-  %scevgep11 = getelementptr <4 x double>, <4 x double>* %lsr.iv46, i64 -2
-  %i6 = load <4 x double>, <4 x double>* %scevgep11, align 32
+  load [16000 x double], ptr %lsr.iv4
+  load [16000 x double], ptr %lsr.iv1
+  %scevgep11 = getelementptr <4 x double>, ptr %lsr.iv4, i64 -2
+  %i6 = load <4 x double>, ptr %scevgep11, align 32
   %add = fadd <4 x double> %i6, <double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00>
-  store <4 x double> %add, <4 x double>* %lsr.iv12, align 32
-  %scevgep10 = getelementptr <4 x double>, <4 x double>* %lsr.iv46, i64 -1
-  %i7 = load <4 x double>, <4 x double>* %scevgep10, align 32
+  store <4 x double> %add, ptr %lsr.iv1, align 32
+  %scevgep10 = getelementptr <4 x double>, ptr %lsr.iv4, i64 -1
+  %i7 = load <4 x double>, ptr %scevgep10, align 32
   %add.4 = fadd <4 x double> %i7, <double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00>
-  %scevgep9 = getelementptr <4 x double>, <4 x double>* %lsr.iv12, i64 1
-  store <4 x double> %add.4, <4 x double>* %scevgep9, align 32
-  %i8 = load <4 x double>, <4 x double>* %lsr.iv46, align 32
+  %scevgep9 = getelementptr <4 x double>, ptr %lsr.iv1, i64 1
+  store <4 x double> %add.4, ptr %scevgep9, align 32
+  %i8 = load <4 x double>, ptr %lsr.iv4, align 32
   %add.8 = fadd <4 x double> %i8, <double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00>
-  %scevgep8 = getelementptr <4 x double>, <4 x double>* %lsr.iv12, i64 2
-  store <4 x double> %add.8, <4 x double>* %scevgep8, align 32
-  %scevgep7 = getelementptr <4 x double>, <4 x double>* %lsr.iv46, i64 1
-  %i9 = load <4 x double>, <4 x double>* %scevgep7, align 32
+  %scevgep8 = getelementptr <4 x double>, ptr %lsr.iv1, i64 2
+  store <4 x double> %add.8, ptr %scevgep8, align 32
+  %scevgep7 = getelementptr <4 x double>, ptr %lsr.iv4, i64 1
+  %i9 = load <4 x double>, ptr %scevgep7, align 32
   %add.12 = fadd <4 x double> %i9, <double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00>
-  %scevgep3 = getelementptr <4 x double>, <4 x double>* %lsr.iv12, i64 3
-  store <4 x double> %add.12, <4 x double>* %scevgep3, align 32
+  %scevgep3 = getelementptr <4 x double>, ptr %lsr.iv1, i64 3
+  store <4 x double> %add.12, ptr %scevgep3, align 32
 
   %lsr.iv.next = add i32 %lsr.iv, -16
-  %scevgep = getelementptr [16000 x double], [16000 x double]* %lsr.iv1, i64 0, i64 16
-  load double, double* %scevgep
-  %i10 = bitcast double* %scevgep to [16000 x double]*
-  %scevgep5 = getelementptr [16000 x double], [16000 x double]* %lsr.iv4, i64 0, i64 16
-  load double, double* %scevgep5
-  %i11 = bitcast double* %scevgep5 to [16000 x double]*
+  %scevgep = getelementptr [16000 x double], ptr %lsr.iv1, i64 0, i64 16
+  load double, ptr %scevgep
+  %scevgep5 = getelementptr [16000 x double], ptr %lsr.iv4, i64 0, i64 16
+  load double, ptr %scevgep5
   %exitcond.15 = icmp eq i32 %lsr.iv.next, 0
   br i1 %exitcond.15, label %for.end, label %for.body4
 

diff  --git a/llvm/test/Analysis/BasicAA/phi-speculation.ll b/llvm/test/Analysis/BasicAA/phi-speculation.ll
index d738d8220441..80d5d384a32b 100644
--- a/llvm/test/Analysis/BasicAA/phi-speculation.ll
+++ b/llvm/test/Analysis/BasicAA/phi-speculation.ll
@@ -7,28 +7,28 @@ target datalayout =
 ; CHECK: test_noalias_1
 ; CHECK: NoAlias: i32* %ptr2_phi, i32* %ptr_phi
 ; CHECK: NoAlias: i32* %ptr2_inc, i32* %ptr_inc
-define i32 @test_noalias_1(i32* %ptr2, i32 %count, i32* %coeff) {
+define i32 @test_noalias_1(ptr %ptr2, i32 %count, ptr %coeff) {
 entry:
-  %ptr = getelementptr inbounds i32, i32* %ptr2, i64 1
+  %ptr = getelementptr inbounds i32, ptr %ptr2, i64 1
   br label %while.body
 
 while.body:
   %num = phi i32 [ %count, %entry ], [ %dec, %while.body ]
-  %ptr_phi = phi i32* [ %ptr, %entry ], [ %ptr_inc, %while.body ]
-  %ptr2_phi = phi i32* [ %ptr2, %entry ], [ %ptr2_inc, %while.body ]
+  %ptr_phi = phi ptr [ %ptr, %entry ], [ %ptr_inc, %while.body ]
+  %ptr2_phi = phi ptr [ %ptr2, %entry ], [ %ptr2_inc, %while.body ]
   %result.09 = phi i32 [ 0 , %entry ], [ %add, %while.body ]
   %dec = add nsw i32 %num, -1
-  %0 = load i32, i32* %ptr_phi, align 4
-  store i32 %0, i32* %ptr2_phi, align 4
-  %1 = load i32, i32* %coeff, align 4
-  %2 = load i32, i32* %ptr_phi, align 4
+  %0 = load i32, ptr %ptr_phi, align 4
+  store i32 %0, ptr %ptr2_phi, align 4
+  %1 = load i32, ptr %coeff, align 4
+  %2 = load i32, ptr %ptr_phi, align 4
   %mul = mul nsw i32 %1, %2
   %add = add nsw i32 %mul, %result.09
   %tobool = icmp eq i32 %dec, 0
-  %ptr_inc = getelementptr inbounds i32, i32* %ptr_phi, i64 1
-  %ptr2_inc = getelementptr inbounds i32, i32* %ptr2_phi, i64 1
-  load i32, i32* %ptr_inc
-  load i32, i32* %ptr2_inc
+  %ptr_inc = getelementptr inbounds i32, ptr %ptr_phi, i64 1
+  %ptr2_inc = getelementptr inbounds i32, ptr %ptr2_phi, i64 1
+  load i32, ptr %ptr_inc
+  load i32, ptr %ptr2_inc
   br i1 %tobool, label %the_exit, label %while.body
 
 the_exit:
@@ -40,43 +40,43 @@ the_exit:
 ; CHECK-DAG: NoAlias: i32* %ptr2_inc_outer, i32* %ptr_inc_outer
 ; CHECK-DAG: NoAlias: i32* %ptr2_phi, i32* %ptr_phi
 ; CHECK-DAG: NoAlias: i32* %ptr2_inc, i32* %ptr_inc
-define i32 @test_noalias_2(i32* %ptr2, i32 %count, i32* %coeff) {
+define i32 @test_noalias_2(ptr %ptr2, i32 %count, ptr %coeff) {
 entry:
-  %ptr = getelementptr inbounds i32, i32* %ptr2, i64 1
+  %ptr = getelementptr inbounds i32, ptr %ptr2, i64 1
   br label %outer.while.header
 
 outer.while.header:
-  %ptr_outer_phi = phi i32* [%ptr_inc_outer, %outer.while.backedge], [ %ptr, %entry]
-  %ptr_outer_phi2 = phi i32* [%ptr2_inc_outer, %outer.while.backedge], [ %ptr2, %entry]
+  %ptr_outer_phi = phi ptr [%ptr_inc_outer, %outer.while.backedge], [ %ptr, %entry]
+  %ptr_outer_phi2 = phi ptr [%ptr2_inc_outer, %outer.while.backedge], [ %ptr2, %entry]
   %num.outer = phi i32 [ %count, %entry ], [ %dec.outer, %outer.while.backedge ]
-  %ignore1 = load i32, i32* %ptr_outer_phi
-  %ignore2 = load i32, i32* %ptr_outer_phi2
+  %ignore1 = load i32, ptr %ptr_outer_phi
+  %ignore2 = load i32, ptr %ptr_outer_phi2
   br label %while.body
 
 while.body:
   %num = phi i32 [ %count, %outer.while.header ], [ %dec, %while.body ]
-  %ptr_phi = phi i32* [ %ptr_outer_phi, %outer.while.header ], [ %ptr_inc, %while.body ]
-  %ptr2_phi = phi i32* [ %ptr_outer_phi2, %outer.while.header ], [ %ptr2_inc, %while.body ]
+  %ptr_phi = phi ptr [ %ptr_outer_phi, %outer.while.header ], [ %ptr_inc, %while.body ]
+  %ptr2_phi = phi ptr [ %ptr_outer_phi2, %outer.while.header ], [ %ptr2_inc, %while.body ]
   %result.09 = phi i32 [ 0 , %outer.while.header ], [ %add, %while.body ]
   %dec = add nsw i32 %num, -1
-  %0 = load i32, i32* %ptr_phi, align 4
-  store i32 %0, i32* %ptr2_phi, align 4
-  %1 = load i32, i32* %coeff, align 4
-  %2 = load i32, i32* %ptr_phi, align 4
+  %0 = load i32, ptr %ptr_phi, align 4
+  store i32 %0, ptr %ptr2_phi, align 4
+  %1 = load i32, ptr %coeff, align 4
+  %2 = load i32, ptr %ptr_phi, align 4
   %mul = mul nsw i32 %1, %2
   %add = add nsw i32 %mul, %result.09
   %tobool = icmp eq i32 %dec, 0
-  %ptr_inc = getelementptr inbounds i32, i32* %ptr_phi, i64 1
-  %ptr2_inc = getelementptr inbounds i32, i32* %ptr2_phi, i64 1
-  load i32, i32* %ptr_inc
-  load i32, i32* %ptr2_inc
+  %ptr_inc = getelementptr inbounds i32, ptr %ptr_phi, i64 1
+  %ptr2_inc = getelementptr inbounds i32, ptr %ptr2_phi, i64 1
+  load i32, ptr %ptr_inc
+  load i32, ptr %ptr2_inc
   br i1 %tobool, label %outer.while.backedge, label %while.body
 
 outer.while.backedge:
-  %ptr_inc_outer = getelementptr inbounds i32, i32* %ptr_phi, i64 1
-  %ptr2_inc_outer = getelementptr inbounds i32, i32* %ptr2_phi, i64 1
-  load i32, i32* %ptr_inc_outer
-  load i32, i32* %ptr2_inc_outer
+  %ptr_inc_outer = getelementptr inbounds i32, ptr %ptr_phi, i64 1
+  %ptr2_inc_outer = getelementptr inbounds i32, ptr %ptr2_phi, i64 1
+  load i32, ptr %ptr_inc_outer
+  load i32, ptr %ptr2_inc_outer
   %dec.outer = add nsw i32 %num.outer, -1
   %br.cond = icmp eq i32 %dec.outer, 0
   br i1 %br.cond, label %the_exit, label %outer.while.header
@@ -87,17 +87,17 @@ the_exit:
 
 ; CHECK: test_noalias_3
 ; CHECK: MayAlias: i8* %ptr2_phi, i8* %ptr_phi
-define i32 @test_noalias_3(i8* noalias %x, i8* noalias %y, i8* noalias %z,
+define i32 @test_noalias_3(ptr noalias %x, ptr noalias %y, ptr noalias %z,
                            i32 %count) {
 entry:
   br label %while.body
 
 while.body:
   %num = phi i32 [ %count, %entry ], [ %dec, %while.body ]
-  %ptr_phi = phi i8* [ %x, %entry ], [ %z, %while.body ]
-  %ptr2_phi = phi i8* [ %y, %entry ], [ %ptr_phi, %while.body ]
-  load i8, i8* %ptr_phi
-  load i8, i8* %ptr2_phi
+  %ptr_phi = phi ptr [ %x, %entry ], [ %z, %while.body ]
+  %ptr2_phi = phi ptr [ %y, %entry ], [ %ptr_phi, %while.body ]
+  load i8, ptr %ptr_phi
+  load i8, ptr %ptr2_phi
   %dec = add nsw i32 %num, -1
   %tobool = icmp eq i32 %dec, 0
   br i1 %tobool, label %the_exit, label %while.body
@@ -110,21 +110,21 @@ the_exit:
 ; CHECK: NoAlias: i8* %x.base, i16* %y.base
 ; CHECK: NoAlias: i8* %x, i16* %y
 ; CHECK: NoAlias: i8* %x.next, i16* %y.next
-define void @test_
diff erent_stride_noalias(i1 %c, i8* noalias %x.base, i16* noalias %y.base) {
+define void @test_
diff erent_stride_noalias(i1 %c, ptr noalias %x.base, ptr noalias %y.base) {
 entry:
-  load i8, i8* %x.base
-  load i16, i16* %y.base
+  load i8, ptr %x.base
+  load i16, ptr %y.base
   br label %loop
 
 loop:
-  %x = phi i8* [ %x.base, %entry ], [ %x.next, %loop ]
-  %y = phi i16* [ %y.base, %entry ], [ %y.next, %loop ]
-  load i8, i8* %x
-  load i16, i16* %y
-  %x.next = getelementptr i8, i8* %x, i64 1
-  %y.next = getelementptr i16, i16* %y, i64 1
-  load i8, i8* %x.next
-  load i16, i16* %y.next
+  %x = phi ptr [ %x.base, %entry ], [ %x.next, %loop ]
+  %y = phi ptr [ %y.base, %entry ], [ %y.next, %loop ]
+  load i8, ptr %x
+  load i16, ptr %y
+  %x.next = getelementptr i8, ptr %x, i64 1
+  %y.next = getelementptr i16, ptr %y, i64 1
+  load i8, ptr %x.next
+  load i16, ptr %y.next
   br i1 %c, label %loop, label %exit
 
 exit:
@@ -133,46 +133,43 @@ exit:
 
 ; CHECK-LABEL: test_no_loop_mustalias
 ; CHECK: MustAlias: i16* %z16, i8* %z8
-define void @test_no_loop_mustalias(i1 %c, i8* noalias %x8, i8* noalias %y8) {
+define void @test_no_loop_mustalias(i1 %c, ptr noalias %x8, ptr noalias %y8) {
   br i1 %c, label %if, label %else
 
 if:
-  %x16 = bitcast i8* %x8 to i16*
   br label %end
 
 else:
-  %y16 = bitcast i8* %y8 to i16*
   br label %end
 
 end:
-  %z8 = phi i8* [ %x8, %if ], [ %y8, %else ]
-  %z16 = phi i16* [ %x16, %if ], [ %y16, %else ]
-  load i8, i8* %z8
-  load i16, i16* %z16
+  %z8 = phi ptr [ %x8, %if ], [ %y8, %else ]
+  %z16 = phi ptr [ %x8, %if ], [ %y8, %else ]
+  load i8, ptr %z8
+  load i16, ptr %z16
   ret void
 }
 
 ; CHECK-LABEL: test_same_stride_mustalias
-; CHECK: MustAlias: i8* %x.base, i4* %y.base
+; CHECK: MustAlias: i4* %x.base, i8* %x.base
 ; CHECK: MayAlias: i8* %x, i4* %y
 ; CHECK: MayAlias: i8* %x.next, i4* %y.next
 ; TODO: (x, y) could be MustAlias
-define void @test_same_stride_mustalias(i1 %c, i8* noalias %x.base) {
+define void @test_same_stride_mustalias(i1 %c, ptr noalias %x.base) {
 entry:
-  %y.base = bitcast i8* %x.base to i4*
-  load i8, i8* %x.base
-  load i4, i4* %y.base
+  load i8, ptr %x.base
+  load i4, ptr %x.base
   br label %loop
 
 loop:
-  %x = phi i8* [ %x.base, %entry ], [ %x.next, %loop ]
-  %y = phi i4* [ %y.base, %entry ], [ %y.next, %loop ]
-  load i8, i8* %x
-  load i4, i4* %y
-  %x.next = getelementptr i8, i8* %x, i64 1
-  %y.next = getelementptr i4, i4* %y, i64 1
-  load i8, i8* %x.next
-  load i4, i4* %y.next
+  %x = phi ptr [ %x.base, %entry ], [ %x.next, %loop ]
+  %y = phi ptr [ %x.base, %entry ], [ %y.next, %loop ]
+  load i8, ptr %x
+  load i4, ptr %y
+  %x.next = getelementptr i8, ptr %x, i64 1
+  %y.next = getelementptr i4, ptr %y, i64 1
+  load i8, ptr %x.next
+  load i4, ptr %y.next
   br i1 %c, label %loop, label %exit
 
 exit:
@@ -180,27 +177,26 @@ exit:
 }
 
 ; CHECK-LABEL: test_
diff erent_stride_mustalias
-; CHECK: MustAlias: i8* %x.base, i16* %y.base
+; CHECK: MustAlias: i16* %x.base, i8* %x.base
 ; CHECK: MayAlias: i8* %x, i16* %y
 ; CHECK: MayAlias: i8* %x.next, i16* %y.next
 ; Even though the base pointers MustAlias, the 
diff erent strides don't preserve
 ; this property across iterations.
-define void @test_
diff erent_stride_mustalias(i1 %c, i8* noalias %x.base) {
+define void @test_
diff erent_stride_mustalias(i1 %c, ptr noalias %x.base) {
 entry:
-  %y.base = bitcast i8* %x.base to i16*
-  load i8, i8* %x.base
-  load i16, i16* %y.base
+  load i8, ptr %x.base
+  load i16, ptr %x.base
   br label %loop
 
 loop:
-  %x = phi i8* [ %x.base, %entry ], [ %x.next, %loop ]
-  %y = phi i16* [ %y.base, %entry ], [ %y.next, %loop ]
-  load i8, i8* %x
-  load i16, i16* %y
-  %x.next = getelementptr i8, i8* %x, i64 1
-  %y.next = getelementptr i16, i16* %y, i64 1
-  load i8, i8* %x.next
-  load i16, i16* %y.next
+  %x = phi ptr [ %x.base, %entry ], [ %x.next, %loop ]
+  %y = phi ptr [ %x.base, %entry ], [ %y.next, %loop ]
+  load i8, ptr %x
+  load i16, ptr %y
+  %x.next = getelementptr i8, ptr %x, i64 1
+  %y.next = getelementptr i16, ptr %y, i64 1
+  load i8, ptr %x.next
+  load i16, ptr %y.next
   br i1 %c, label %loop, label %exit
 
 exit:

diff  --git a/llvm/test/Analysis/BasicAA/pr31761.ll b/llvm/test/Analysis/BasicAA/pr31761.ll
index 55df47008fb0..156dd816edc8 100644
--- a/llvm/test/Analysis/BasicAA/pr31761.ll
+++ b/llvm/test/Analysis/BasicAA/pr31761.ll
@@ -7,15 +7,14 @@ target triple = "x86_64-apple-macosx10.12.0"
 %struct.blam = type { i32, i32 }
 
 
-; CHECK-DAG: MayAlias: i32* %tmp, i32* %tmp3
+; CHECK-DAG: MayAlias: i32* %arg, i32* %tmp3
 
-define i1 @ham(%struct.blam* %arg)  {
-  %isNull = icmp eq %struct.blam* %arg, null
-  %tmp = getelementptr  %struct.blam, %struct.blam* %arg, i64 0, i32 0
-  %tmp2 = getelementptr  %struct.blam, %struct.blam* %arg, i64 0, i32 1
-  %select = select i1 %isNull, i32* null, i32* %tmp2
-  %tmp3 = getelementptr  i32, i32* %select, i32 -1
-  load i32, i32* %tmp
-  load i32, i32* %tmp3
+define i1 @ham(ptr %arg)  {
+  %isNull = icmp eq ptr %arg, null
+  %tmp2 = getelementptr  %struct.blam, ptr %arg, i64 0, i32 1
+  %select = select i1 %isNull, ptr null, ptr %tmp2
+  %tmp3 = getelementptr  i32, ptr %select, i32 -1
+  load i32, ptr %arg
+  load i32, ptr %tmp3
   ret i1 true
 }

diff  --git a/llvm/test/Analysis/BasicAA/pr35821.ll b/llvm/test/Analysis/BasicAA/pr35821.ll
index dbd21bdf58cc..48e3ae519915 100644
--- a/llvm/test/Analysis/BasicAA/pr35821.ll
+++ b/llvm/test/Analysis/BasicAA/pr35821.ll
@@ -1,13 +1,13 @@
 ; RUN: opt %s -passes=aa-eval -disable-output -print-all-alias-modref-info 2>&1 | FileCheck %s
 
 ; CHECK-LABEL: Function: patatino
-; CHECK: NoAlias: i1* %G26, i1** %G47
+; CHECK: NoAlias: i1* %G26, ptr* %G47
 
 define void @patatino() {
-  %G26 = getelementptr i1, i1* undef, i1 undef
+  %G26 = getelementptr i1, ptr undef, i1 undef
   %B20 = shl i8 -128, 16
-  %G47 = getelementptr i1*, i1** undef, i8 %B20
-  load i1, i1* %G26
-  load i1*, i1** %G47
+  %G47 = getelementptr ptr, ptr undef, i8 %B20
+  load i1, ptr %G26
+  load ptr, ptr %G47
   ret void
 }

diff  --git a/llvm/test/Analysis/BasicAA/pr35843.ll b/llvm/test/Analysis/BasicAA/pr35843.ll
index a2504a581cad..471fe3646ca2 100644
--- a/llvm/test/Analysis/BasicAA/pr35843.ll
+++ b/llvm/test/Analysis/BasicAA/pr35843.ll
@@ -1,14 +1,14 @@
 ; RUN: opt %s -passes=aa-eval -disable-output -print-all-alias-modref-info 2>&1 | FileCheck %s
 
 ; CHECK-LABEL: Function: patatino
-; CHECK: NoAlias: i1** %G22, i1*** %G45
+; CHECK: NoAlias: ptr* %G22, ptr* %G45
 
 define void @patatino() {
 BB:
-  %G22 = getelementptr i1*, i1** undef, i8 -1
+  %G22 = getelementptr ptr, ptr undef, i8 -1
   %B1 = mul i66 undef, 9223372036854775808
-  %G45 = getelementptr i1**, i1*** undef, i66 %B1
-  load i1*, i1** %G22
-  load i1**, i1*** %G45
+  %G45 = getelementptr ptr, ptr undef, i66 %B1
+  load ptr, ptr %G22
+  load ptr, ptr %G45
   ret void
 }

diff  --git a/llvm/test/Analysis/BasicAA/pr52735.ll b/llvm/test/Analysis/BasicAA/pr52735.ll
index 70ad87434e8f..283215efcbe4 100644
--- a/llvm/test/Analysis/BasicAA/pr52735.ll
+++ b/llvm/test/Analysis/BasicAA/pr52735.ll
@@ -11,20 +11,19 @@
 
 target triple = "x86_64-unknown-linux-gnu"
 
-; CHECK: Both ModRef:  Ptr: i32* %v	<->  callbr void asm "movl $$1, $0", "=*m,!i,~{dirflag},~{fpsr},~{flags}"(i32* nonnull elementtype(i32) %v)
+; CHECK: Both ModRef:  Ptr: i32* %v	<->  callbr void asm "movl $$1, $0", "=*m,!i,~{dirflag},~{fpsr},~{flags}"(ptr nonnull elementtype(i32) %v)
 
 
 define dso_local i32 @foo() {
 entry:
   %v = alloca i32, align 4
-  %0 = bitcast i32* %v to i8*
-  callbr void asm "movl $$1, $0", "=*m,!i,~{dirflag},~{fpsr},~{flags}"(i32* elementtype(i32) nonnull %v)
+  callbr void asm "movl $$1, $0", "=*m,!i,~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i32) nonnull %v)
           to label %asm.fallthrough [label %out]
 
 asm.fallthrough:
   br label %out
 
 out:
-  %1 = load i32, i32* %v, align 4
-  ret i32 %1
+  %0 = load i32, ptr %v, align 4
+  ret i32 %0
 }

diff  --git a/llvm/test/Analysis/BasicAA/q.bad.ll b/llvm/test/Analysis/BasicAA/q.bad.ll
index 0d2dbb9b76d2..6153637661e3 100644
--- a/llvm/test/Analysis/BasicAA/q.bad.ll
+++ b/llvm/test/Analysis/BasicAA/q.bad.ll
@@ -4,15 +4,15 @@ target triple = "thumbv7--linux-gnueabi"
 
 ; CHECK-LABEL: test_zext_sext_amounts255
 ; CHECK: NoAlias: i8* %a, i8* %b
-define void @test_zext_sext_amounts255(i8* %mem) {
+define void @test_zext_sext_amounts255(ptr %mem) {
   %sext.1 = sext i8 255 to i16
   %sext.zext.1 = zext i16 %sext.1 to i64
   %sext.2 = sext i8 255 to i32
   %sext.zext.2 = zext i32 %sext.2 to i64
-  %a = getelementptr inbounds i8, i8* %mem, i64 %sext.zext.1
-  %b = getelementptr inbounds i8, i8* %mem, i64 %sext.zext.2
-  load i8, i8* %a
-  load i8, i8* %b
+  %a = getelementptr inbounds i8, ptr %mem, i64 %sext.zext.1
+  %b = getelementptr inbounds i8, ptr %mem, i64 %sext.zext.2
+  load i8, ptr %a
+  load i8, ptr %b
   ret void
 }
 
@@ -20,33 +20,33 @@ define void @test_zext_sext_amounts255(i8* %mem) {
 ; CHECK: MayAlias: i8* %a, i8* %b
 ; %a and %b only PartialAlias as, although they're both zext(sext(%num)) they'll extend the sign by a 
diff erent
 ; number of bits before zext-ing the remainder.
-define void @test_zext_sext_amounts(i8* %mem, i8 %num) {
+define void @test_zext_sext_amounts(ptr %mem, i8 %num) {
   %sext.1 = sext i8 %num to i16
   %sext.zext.1 = zext i16 %sext.1 to i64
   %sext.2 = sext i8 %num to i32
   %sext.zext.2 = zext i32 %sext.2 to i64
-  %a = getelementptr inbounds i8, i8* %mem, i64 %sext.zext.1
-  %b = getelementptr inbounds i8, i8* %mem, i64 %sext.zext.2
-  load i8, i8* %a
-  load i8, i8* %b
+  %a = getelementptr inbounds i8, ptr %mem, i64 %sext.zext.1
+  %b = getelementptr inbounds i8, ptr %mem, i64 %sext.zext.2
+  load i8, ptr %a
+  load i8, ptr %b
   ret void
 }
 
 ; CHECK-LABEL: based_on_pr18068
 ; CHECK: NoAlias: i8* %a, i8* %b
 ; CHECK: NoAlias: i8* %a, i8* %c
-define void @based_on_pr18068(i32 %loaded, i8* %mem) {
+define void @based_on_pr18068(i32 %loaded, ptr %mem) {
   %loaded.64 = zext i32 %loaded to i64
   %add1 = add i32 %loaded, -1 ; unsigned wraps unless %loaded == 0
   %add1.64 = zext i32 %add1 to i64 ; is zext(%loaded) always != zext(%loaded - 1)? Yes -> NoAlias
   %sub1 = sub i32 %loaded, 1 ; unsigned wraps iff %loaded == 0
   %sub1.64 = zext i32 %sub1 to i64 ; is zext(%loaded) always != zext(%loaded - 1)? Yes -> NoAlias
-  %a = getelementptr inbounds i8, i8* %mem, i64 %loaded.64
-  %b = getelementptr inbounds i8, i8* %mem, i64 %add1.64
-  %c = getelementptr inbounds i8, i8* %mem, i64 %sub1.64
-  load i8, i8* %a
-  load i8, i8* %b
-  load i8, i8* %c
+  %a = getelementptr inbounds i8, ptr %mem, i64 %loaded.64
+  %b = getelementptr inbounds i8, ptr %mem, i64 %add1.64
+  %c = getelementptr inbounds i8, ptr %mem, i64 %sub1.64
+  load i8, ptr %a
+  load i8, ptr %b
+  load i8, ptr %c
   ret void
 }
 
@@ -54,7 +54,7 @@ define void @based_on_pr18068(i32 %loaded, i8* %mem) {
 ; CHECK: MayAlias: i8* %a, i8* %b
 ; CHECK: MustAlias: i8* %a, i8* %c
 ; CHECK: MayAlias: i8* %a, i8* %d
-define void @test_path_dependence(i16 %p, i8* %mem) {
+define void @test_path_dependence(i16 %p, ptr %mem) {
   %p.minus1 = add i16 %p, -1 ; this will always unsigned-wrap, unless %p == 0
   %p.minus1.64 = zext i16 %p.minus1 to i64
   %p.64.again = add i64 %p.minus1.64, 1 ; either %p (if we wrapped) or 65536 (if we didn't)
@@ -68,62 +68,62 @@ define void @test_path_dependence(i16 %p, i8* %mem) {
   %p.nsw.64.again = add nsw i64 %p.nsw.minus1.64, 1 ; ...and so this is very much != %p
 
   %p.64 = zext i16 %p to i64
-  %a = getelementptr inbounds i8, i8* %mem, i64 %p.64
-  %b = getelementptr inbounds i8, i8* %mem, i64 %p.64.again
-  %c = getelementptr inbounds i8, i8* %mem, i64 %p.nsw.nuw.64.again
-  %d = getelementptr inbounds i8, i8* %mem, i64 %p.nsw.64.again
-  load i8, i8* %a
-  load i8, i8* %b
-  load i8, i8* %c
-  load i8, i8* %d
+  %a = getelementptr inbounds i8, ptr %mem, i64 %p.64
+  %b = getelementptr inbounds i8, ptr %mem, i64 %p.64.again
+  %c = getelementptr inbounds i8, ptr %mem, i64 %p.nsw.nuw.64.again
+  %d = getelementptr inbounds i8, ptr %mem, i64 %p.nsw.64.again
+  load i8, ptr %a
+  load i8, ptr %b
+  load i8, ptr %c
+  load i8, ptr %d
   ret void
 }
 
 ; CHECK-LABEL: test_zext_sext_255
 ; CHECK: NoAlias: i8* %a, i8* %b
-define void @test_zext_sext_255(i8* %mem) {
+define void @test_zext_sext_255(ptr %mem) {
   %zext.255 = zext i8 255 to i16 ; 0x00FF
   %sext.255 = sext i8 255 to i16 ; 0xFFFF
   %zext.sext.255 = zext i16 %sext.255 to i32 ; 0x0000FFFF
   %sext.zext.255 = sext i16 %zext.255 to i32 ; 0x000000FF
   %zext.zext.sext.255 = zext i32 %zext.sext.255 to i64
   %zext.sext.zext.255 = zext i32 %sext.zext.255 to i64
-  %a = getelementptr inbounds i8, i8* %mem, i64 %zext.zext.sext.255
-  %b = getelementptr inbounds i8, i8* %mem, i64 %zext.sext.zext.255
-  load i8, i8* %a
-  load i8, i8* %b
+  %a = getelementptr inbounds i8, ptr %mem, i64 %zext.zext.sext.255
+  %b = getelementptr inbounds i8, ptr %mem, i64 %zext.sext.zext.255
+  load i8, ptr %a
+  load i8, ptr %b
   ret void
 }
 
 ; CHECK-LABEL: test_zext_sext_num
 ; CHECK: MayAlias: i8* %a, i8* %b
 ; %a and %b NoAlias if %num == 255 (see @test_zext_sext_255), but %a and %b NoAlias for other values of %num (e.g. 0)
-define void @test_zext_sext_num(i8* %mem, i8 %num) {
+define void @test_zext_sext_num(ptr %mem, i8 %num) {
   %zext.num = zext i8 %num to i16
   %sext.num = sext i8 %num to i16
   %zext.sext.num = zext i16 %sext.num to i32
   %sext.zext.num = sext i16 %zext.num to i32
   %zext.zext.sext.num = zext i32 %zext.sext.num to i64
   %zext.sext.zext.num = zext i32 %sext.zext.num to i64
-  %a = getelementptr inbounds i8, i8* %mem, i64 %zext.zext.sext.num
-  %b = getelementptr inbounds i8, i8* %mem, i64 %zext.sext.zext.num
-  load i8, i8* %a
-  load i8, i8* %b
+  %a = getelementptr inbounds i8, ptr %mem, i64 %zext.zext.sext.num
+  %b = getelementptr inbounds i8, ptr %mem, i64 %zext.sext.zext.num
+  load i8, ptr %a
+  load i8, ptr %b
   ret void
 }
 
 ; CHECK-LABEL: uncompressStream
 ; CHECK: MustAlias:  i8* %a, i8* %b
 ; CHECK: NoAlias:  i8* %a, i8* %c
-define void @uncompressStream(i8* %mem) {
+define void @uncompressStream(ptr %mem) {
   %zext.255 = zext i8 255 to i32
   %sext.255 = sext i8 255 to i32
-  %a = getelementptr inbounds i8, i8* %mem, i32 255
-  %b = getelementptr inbounds i8, i8* %mem, i32 %zext.255
-  %c = getelementptr inbounds i8, i8* %mem, i32 %sext.255
-  load i8, i8* %a
-  load i8, i8* %b
-  load i8, i8* %c
+  %a = getelementptr inbounds i8, ptr %mem, i32 255
+  %b = getelementptr inbounds i8, ptr %mem, i32 %zext.255
+  %c = getelementptr inbounds i8, ptr %mem, i32 %sext.255
+  load i8, ptr %a
+  load i8, ptr %b
+  load i8, ptr %c
   ret void
 }
 
@@ -131,18 +131,18 @@ define void @uncompressStream(i8* %mem) {
 ; CHECK: NoAlias:  i32* %a, i32* %b
 ; CHECK: NoAlias:  i32* %a, i32* %c
 ; CHECK: NoAlias:  i32* %b, i32* %c
-define void @constantOffsetHeuristic_i3_i32(i32* %mem, i3 %val) {
+define void @constantOffsetHeuristic_i3_i32(ptr %mem, i3 %val) {
   %zext.plus.7 = add nsw i3 %val, 7
   %zext.plus.4 = add nsw i3 %val, 4
   %zext.val = zext i3 %val to i32
   %zext.4 = zext i3 %zext.plus.4 to i32
   %zext.7 = zext i3 %zext.plus.7 to i32
-  %a = getelementptr inbounds i32, i32* %mem, i32 %zext.4
-  %b = getelementptr inbounds i32, i32* %mem, i32 %zext.7
-  %c = getelementptr inbounds i32, i32* %mem, i32 %zext.val
-  load i32, i32* %a
-  load i32, i32* %b
-  load i32, i32* %c
+  %a = getelementptr inbounds i32, ptr %mem, i32 %zext.4
+  %b = getelementptr inbounds i32, ptr %mem, i32 %zext.7
+  %c = getelementptr inbounds i32, ptr %mem, i32 %zext.val
+  load i32, ptr %a
+  load i32, ptr %b
+  load i32, ptr %c
   ret void
 }
 
@@ -150,71 +150,65 @@ define void @constantOffsetHeuristic_i3_i32(i32* %mem, i3 %val) {
 ; CHECK: NoAlias:  i32* %a, i32* %b
 ; CHECK: NoAlias:  i32* %a, i32* %c
 ; CHECK: NoAlias:  i32* %b, i32* %c
-define void @constantOffsetHeuristic_i8_i32(i32* %mem, i8 %val) {
+define void @constantOffsetHeuristic_i8_i32(ptr %mem, i8 %val) {
   %zext.plus.7 = add nsw i8 %val, 7
   %zext.plus.4 = add nsw i8 %val, 4
   %zext.val = zext i8 %val to i32
   %zext.4 = zext i8 %zext.plus.4 to i32
   %zext.7 = zext i8 %zext.plus.7 to i32
-  %a = getelementptr inbounds i32, i32* %mem, i32 %zext.4
-  %b = getelementptr inbounds i32, i32* %mem, i32 %zext.7
-  %c = getelementptr inbounds i32, i32* %mem, i32 %zext.val
-  load i32, i32* %a
-  load i32, i32* %b
-  load i32, i32* %c
+  %a = getelementptr inbounds i32, ptr %mem, i32 %zext.4
+  %b = getelementptr inbounds i32, ptr %mem, i32 %zext.7
+  %c = getelementptr inbounds i32, ptr %mem, i32 %zext.val
+  load i32, ptr %a
+  load i32, ptr %b
+  load i32, ptr %c
   ret void
 }
 
 ; CHECK-LABEL: constantOffsetHeuristic_i3_i8
-; CHECK: MayAlias:  i32* %a, i32* %b
-; CHECK: NoAlias:  i32* %a, i32* %c
-; CHECK: MayAlias:  i32* %b, i32* %c
-define void @constantOffsetHeuristic_i3_i8(i8* %mem, i3 %val) {
+; CHECK: MayAlias:  i32* %a.8, i32* %b.8
+; CHECK: NoAlias:  i32* %a.8, i32* %c.8
+; CHECK: MayAlias:  i32* %b.8, i32* %c.8
+define void @constantOffsetHeuristic_i3_i8(ptr %mem, i3 %val) {
   %zext.plus.7 = add nsw i3 %val, 7
   %zext.plus.4 = add nsw i3 %val, 4
   %zext.val = zext i3 %val to i32
   %zext.4 = zext i3 %zext.plus.4 to i32
   %zext.7 = zext i3 %zext.plus.7 to i32
-  %a.8 = getelementptr inbounds i8, i8* %mem, i32 %zext.4
-  %b.8 = getelementptr inbounds i8, i8* %mem, i32 %zext.7
-  %c.8 = getelementptr inbounds i8, i8* %mem, i32 %zext.val
-  %a = bitcast i8* %a.8 to i32*
-  %b = bitcast i8* %b.8 to i32*
-  %c = bitcast i8* %c.8 to i32*
-  load i32, i32* %a
-  load i32, i32* %b
-  load i32, i32* %c
+  %a.8 = getelementptr inbounds i8, ptr %mem, i32 %zext.4
+  %b.8 = getelementptr inbounds i8, ptr %mem, i32 %zext.7
+  %c.8 = getelementptr inbounds i8, ptr %mem, i32 %zext.val
+  load i32, ptr %a.8
+  load i32, ptr %b.8
+  load i32, ptr %c.8
   ret void
 }
 
 ; CHECK-LABEL: constantOffsetHeuristic_i8_i8
-; CHECK: MayAlias:  i32* %a, i32* %b
-; CHECK: NoAlias:  i32* %a, i32* %c
-; CHECK: NoAlias:  i32* %b, i32* %c
-define void @constantOffsetHeuristic_i8_i8(i8* %mem, i8 %val) {
+; CHECK: MayAlias:  i32* %a.8, i32* %b.8
+; CHECK: NoAlias:  i32* %a.8, i32* %c.8
+; CHECK: NoAlias:  i32* %b.8, i32* %c.8
+define void @constantOffsetHeuristic_i8_i8(ptr %mem, i8 %val) {
   %zext.plus.7 = add nsw i8 %val, 7
   %zext.plus.4 = add nsw i8 %val, 4
   %zext.val = zext i8 %val to i32
   %zext.4 = zext i8 %zext.plus.4 to i32
   %zext.7 = zext i8 %zext.plus.7 to i32
-  %a.8 = getelementptr inbounds i8, i8* %mem, i32 %zext.4
-  %b.8 = getelementptr inbounds i8, i8* %mem, i32 %zext.7
-  %c.8 = getelementptr inbounds i8, i8* %mem, i32 %zext.val
-  %a = bitcast i8* %a.8 to i32*
-  %b = bitcast i8* %b.8 to i32*
-  %c = bitcast i8* %c.8 to i32*
-  load i32, i32* %a
-  load i32, i32* %b
-  load i32, i32* %c
+  %a.8 = getelementptr inbounds i8, ptr %mem, i32 %zext.4
+  %b.8 = getelementptr inbounds i8, ptr %mem, i32 %zext.7
+  %c.8 = getelementptr inbounds i8, ptr %mem, i32 %zext.val
+  load i32, ptr %a.8
+  load i32, ptr %b.8
+  load i32, ptr %c.8
   ret void
 }
 
 ; CHECK-LABEL: 
diff erent_large_bitwidths
-; MayAlias: i64* %p1, i64* %p2
-define void @
diff erent_large_bitwidths(i8* %a, i64 %i, i128 %j) {
-  %p1 = getelementptr i8, i8* %a, i64 %i
-  %p2 = getelementptr i8, i8* %a, i128 %j
-  load i8, i8* %p1
-  load i8, i8* %p2
+; MayAlias: ptr %p1, ptr %p2
+define void @
diff erent_large_bitwidths(ptr %a, i64 %i, i128 %j) {
+  %p1 = getelementptr i8, ptr %a, i64 %i
+  %p2 = getelementptr i8, ptr %a, i128 %j
+  load i8, ptr %p1
+  load i8, ptr %p2
   ret void
 }

diff  --git a/llvm/test/Analysis/BasicAA/range.ll b/llvm/test/Analysis/BasicAA/range.ll
index 7235bef726da..f153b58af3c8 100644
--- a/llvm/test/Analysis/BasicAA/range.ll
+++ b/llvm/test/Analysis/BasicAA/range.ll
@@ -5,99 +5,97 @@
 
 ; CHECK: Function: t1
 ; CHECK: NoAlias: i32* %gep1, i32* %gep2
-define void @t1(%struct.S* %s) {
-  %gep1 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 1, i32 1
-  %gep2 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 1, i32 0
-  load i32, i32* %gep1
-  load i32, i32* %gep2
+define void @t1(ptr %s) {
+  %gep1 = getelementptr inbounds %struct.S, ptr %s, i64 0, i32 1, i32 1
+  %gep2 = getelementptr inbounds %struct.S, ptr %s, i64 0, i32 1, i32 0
+  load i32, ptr %gep1
+  load i32, ptr %gep2
   ret void
 }
 
 ; CHECK: Function: t2_fwd
 ; CHECK: MayAlias: i32* %gep1, i32* %gep2
-define void @t2_fwd(%struct.S* %s, i32* %q) {
-  %in_array = load i32, i32* %q, !range !0
-  %gep1 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 1, i32 %in_array
-  %gep2 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 1, i32 0
-  load i32, i32* %gep1
-  load i32, i32* %gep2
+define void @t2_fwd(ptr %s, ptr %q) {
+  %in_array = load i32, ptr %q, !range !0
+  %gep1 = getelementptr inbounds %struct.S, ptr %s, i64 0, i32 1, i32 %in_array
+  %gep2 = getelementptr inbounds %struct.S, ptr %s, i64 0, i32 1, i32 0
+  load i32, ptr %gep1
+  load i32, ptr %gep2
   ret void
 }
 
 ; CHECK: Function: t2_rev
 ; CHECK: MayAlias: i32* %gep1, i32* %gep2
-define void @t2_rev(%struct.S* %s, i32* %q) {
-  %in_array = load i32, i32* %q, !range !0
-  %gep1 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 1, i32 0
-  %gep2 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 1, i32 %in_array
-  load i32, i32* %gep1
-  load i32, i32* %gep2
+define void @t2_rev(ptr %s, ptr %q) {
+  %in_array = load i32, ptr %q, !range !0
+  %gep1 = getelementptr inbounds %struct.S, ptr %s, i64 0, i32 1, i32 0
+  %gep2 = getelementptr inbounds %struct.S, ptr %s, i64 0, i32 1, i32 %in_array
+  load i32, ptr %gep1
+  load i32, ptr %gep2
   ret void
 }
 
 ; CHECK: Function: t3_fwd
 ; CHECK: NoAlias: i32* %gep1, i32* %gep2
-define void @t3_fwd(%struct.S* %s, i32* %q) {
-  %knownzero = load i32, i32* %q, !range !1
-  %gep1 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 1, i32 %knownzero
-  %gep2 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 1, i32 1
-  load i32, i32* %gep1
-  load i32, i32* %gep2
+define void @t3_fwd(ptr %s, ptr %q) {
+  %knownzero = load i32, ptr %q, !range !1
+  %gep1 = getelementptr inbounds %struct.S, ptr %s, i64 0, i32 1, i32 %knownzero
+  %gep2 = getelementptr inbounds %struct.S, ptr %s, i64 0, i32 1, i32 1
+  load i32, ptr %gep1
+  load i32, ptr %gep2
   ret void
 }
 
 ; CHECK: Function: t3_rev
 ; CHECK: NoAlias: i32* %gep1, i32* %gep2
-define void @t3_rev(%struct.S* %s, i32* %q) {
-  %knownzero = load i32, i32* %q, !range !1
-  %gep1 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 1, i32 1
-  %gep2 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 1, i32 %knownzero
-  load i32, i32* %gep1
-  load i32, i32* %gep2
+define void @t3_rev(ptr %s, ptr %q) {
+  %knownzero = load i32, ptr %q, !range !1
+  %gep1 = getelementptr inbounds %struct.S, ptr %s, i64 0, i32 1, i32 1
+  %gep2 = getelementptr inbounds %struct.S, ptr %s, i64 0, i32 1, i32 %knownzero
+  load i32, ptr %gep1
+  load i32, ptr %gep2
   ret void
 }
 
 ; CHECK: Function: member_after
 ; CHECK: NoAlias: i32* %gep1, i32* %gep2
-define void @member_after(%struct.S* %s, i32* %q) {
-  %in_array = load i32, i32* %q, !range !0
-  %gep1 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 1, i32 %in_array
-  %gep2 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 2
-  load i32, i32* %gep1
-  load i32, i32* %gep2
+define void @member_after(ptr %s, ptr %q) {
+  %in_array = load i32, ptr %q, !range !0
+  %gep1 = getelementptr inbounds %struct.S, ptr %s, i64 0, i32 1, i32 %in_array
+  %gep2 = getelementptr inbounds %struct.S, ptr %s, i64 0, i32 2
+  load i32, ptr %gep1
+  load i32, ptr %gep2
   ret void
 }
 
 ; CHECK: Function: member_after_rev
 ; CHECK: NoAlias: i32* %gep1, i32* %gep2
-define void @member_after_rev(%struct.S* %s, i32* %q) {
-  %in_array = load i32, i32* %q, !range !0
-  %gep2 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 2
-  %gep1 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 1, i32 %in_array
-  load i32, i32* %gep1
-  load i32, i32* %gep2
+define void @member_after_rev(ptr %s, ptr %q) {
+  %in_array = load i32, ptr %q, !range !0
+  %gep2 = getelementptr inbounds %struct.S, ptr %s, i64 0, i32 2
+  %gep1 = getelementptr inbounds %struct.S, ptr %s, i64 0, i32 1, i32 %in_array
+  load i32, ptr %gep1
+  load i32, ptr %gep2
   ret void
 }
 
 ; CHECK: Function: member_before
-; CHECK: NoAlias: i32* %gep1, i32* %gep2
-define void @member_before(%struct.S* %s, i32* %q) {
-  %in_array = load i32, i32* %q, !range !0
-  %gep1 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 1, i32 %in_array
-  %gep2 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 0
-  load i32, i32* %gep1
-  load i32, i32* %gep2
+; CHECK: NoAlias: i32* %gep1, i32* %s
+define void @member_before(ptr %s, ptr %q) {
+  %in_array = load i32, ptr %q, !range !0
+  %gep1 = getelementptr inbounds %struct.S, ptr %s, i64 0, i32 1, i32 %in_array
+  load i32, ptr %gep1
+  load i32, ptr %s
   ret void
 }
 
 ; CHECK: Function: member_before_rev
-; CHECK: NoAlias: i32* %gep1, i32* %gep2
-define void @member_before_rev(%struct.S* %s, i32* %q) {
-  %in_array = load i32, i32* %q, !range !0
-  %gep2 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 0
-  %gep1 = getelementptr inbounds %struct.S, %struct.S* %s, i64 0, i32 1, i32 %in_array
-  load i32, i32* %gep1
-  load i32, i32* %gep2
+; CHECK: NoAlias: i32* %gep1, i32* %s
+define void @member_before_rev(ptr %s, ptr %q) {
+  %in_array = load i32, ptr %q, !range !0
+  %gep1 = getelementptr inbounds %struct.S, ptr %s, i64 0, i32 1, i32 %in_array
+  load i32, ptr %gep1
+  load i32, ptr %s
   ret void
 }
 
@@ -105,13 +103,13 @@ define void @member_before_rev(%struct.S* %s, i32* %q) {
 ; CHECK: MayAlias: i32* %gep1, %struct.S2* %s
 ; CHECK: PartialAlias (off -4): i32* %gep2, %struct.S2* %s
 ; CHECK: NoAlias: i32* %gep1, i32* %gep2
-define void @t5(%struct.S2* %s, i32* %q) {
-  %in_array = load i32, i32* %q, !range !3
-  %gep1 = getelementptr inbounds %struct.S2, %struct.S2* %s, i64 0, i32 2, i32 %in_array
-  %gep2 = getelementptr inbounds %struct.S2, %struct.S2* %s, i64 0, i32 1, i32 0
-  load %struct.S2, %struct.S2* %s
-  load i32, i32* %gep1
-  load i32, i32* %gep2
+define void @t5(ptr %s, ptr %q) {
+  %in_array = load i32, ptr %q, !range !3
+  %gep1 = getelementptr inbounds %struct.S2, ptr %s, i64 0, i32 2, i32 %in_array
+  %gep2 = getelementptr inbounds %struct.S2, ptr %s, i64 0, i32 1, i32 0
+  load %struct.S2, ptr %s
+  load i32, ptr %gep1
+  load i32, ptr %gep2
   ret void
 }
 
@@ -119,13 +117,13 @@ define void @t5(%struct.S2* %s, i32* %q) {
 ; CHECK: MayAlias: i32* %gep1, %struct.S2* %s
 ; CHECK: PartialAlias (off -16): i32* %gep2, %struct.S2* %s
 ; CHECK: MayAlias: i32* %gep1, i32* %gep2
-define void @t6(%struct.S2* %s, i32* %q) {
-  %in_array = load i32, i32* %q, !range !3
-  %gep1 = getelementptr inbounds %struct.S2, %struct.S2* %s, i64 0, i32 2, i32 %in_array
-  %gep2 = getelementptr inbounds %struct.S2, %struct.S2* %s, i64 0, i32 1, i32 3
-  load %struct.S2, %struct.S2* %s
-  load i32, i32* %gep1
-  load i32, i32* %gep2
+define void @t6(ptr %s, ptr %q) {
+  %in_array = load i32, ptr %q, !range !3
+  %gep1 = getelementptr inbounds %struct.S2, ptr %s, i64 0, i32 2, i32 %in_array
+  %gep2 = getelementptr inbounds %struct.S2, ptr %s, i64 0, i32 1, i32 3
+  load %struct.S2, ptr %s
+  load i32, ptr %gep1
+  load i32, ptr %gep2
   ret void
 }
 
@@ -133,13 +131,13 @@ define void @t6(%struct.S2* %s, i32* %q) {
 ; CHECK: MayAlias: i32* %gep1, %struct.S2* %s
 ; CHECK: PartialAlias (off -20): i32* %gep2, %struct.S2* %s
 ; CHECK: NoAlias: i32* %gep1, i32* %gep2
-define void @t7(%struct.S2* %s, i32* %q) {
-  %in_array = load i32, i32* %q, !range !4
-  %gep1 = getelementptr inbounds %struct.S2, %struct.S2* %s, i64 0, i32 2, i32 %in_array
-  %gep2 = getelementptr inbounds %struct.S2, %struct.S2* %s, i64 0, i32 2, i32 0
-  load %struct.S2, %struct.S2* %s
-  load i32, i32* %gep1
-  load i32, i32* %gep2
+define void @t7(ptr %s, ptr %q) {
+  %in_array = load i32, ptr %q, !range !4
+  %gep1 = getelementptr inbounds %struct.S2, ptr %s, i64 0, i32 2, i32 %in_array
+  %gep2 = getelementptr inbounds %struct.S2, ptr %s, i64 0, i32 2, i32 0
+  load %struct.S2, ptr %s
+  load i32, ptr %gep1
+  load i32, ptr %gep2
   ret void
 }
 
@@ -147,14 +145,14 @@ define void @t7(%struct.S2* %s, i32* %q) {
 ; CHECK: MayAlias: i32* %gep1, %struct.S2* %s
 ; CHECK: PartialAlias (off -24): i32* %gep2, %struct.S2* %s
 ; CHECK: MayAlias: i32* %gep1, i32* %gep2
-define void @t8(%struct.S2* %s, i32* %q) {
-  %in_array = load i32, i32* %q, !range !4
-  %gep1 = getelementptr inbounds %struct.S2, %struct.S2* %s, i64 0, i32 2, i32 %in_array
-  %gep2 = getelementptr inbounds %struct.S2, %struct.S2* %s, i64 0, i32 2, i32 1
-  load %struct.S2, %struct.S2* %s
-  load i32, i32* %q
-  load i32, i32* %gep1
-  load i32, i32* %gep2
+define void @t8(ptr %s, ptr %q) {
+  %in_array = load i32, ptr %q, !range !4
+  %gep1 = getelementptr inbounds %struct.S2, ptr %s, i64 0, i32 2, i32 %in_array
+  %gep2 = getelementptr inbounds %struct.S2, ptr %s, i64 0, i32 2, i32 1
+  load %struct.S2, ptr %s
+  load i32, ptr %q
+  load i32, ptr %gep1
+  load i32, ptr %gep2
   ret void
 }
 
@@ -162,13 +160,13 @@ define void @t8(%struct.S2* %s, i32* %q) {
 ; CHECK: MayAlias: i32* %gep1, %struct.S2* %s
 ; CHECK: PartialAlias (off -20): i32* %gep2, %struct.S2* %s
 ; CHECK: NoAlias: i32* %gep1, i32* %gep2
-define void @t9(%struct.S2* %s, i32* %q) {
-  %in_array = load i32, i32* %q, !range !5
-  %gep1 = getelementptr inbounds %struct.S2, %struct.S2* %s, i64 0, i32 1, i32 %in_array
-  %gep2 = getelementptr inbounds %struct.S2, %struct.S2* %s, i64 0, i32 2, i32 0
-  load %struct.S2, %struct.S2* %s
-  load i32, i32* %gep1
-  load i32, i32* %gep2
+define void @t9(ptr %s, ptr %q) {
+  %in_array = load i32, ptr %q, !range !5
+  %gep1 = getelementptr inbounds %struct.S2, ptr %s, i64 0, i32 1, i32 %in_array
+  %gep2 = getelementptr inbounds %struct.S2, ptr %s, i64 0, i32 2, i32 0
+  load %struct.S2, ptr %s
+  load i32, ptr %gep1
+  load i32, ptr %gep2
   ret void
 }
 
@@ -176,24 +174,24 @@ define void @t9(%struct.S2* %s, i32* %q) {
 ; CHECK: MayAlias: i32* %gep1, %struct.S2* %s
 ; CHECK: PartialAlias (off -4): i32* %gep2, %struct.S2* %s
 ; CHECK: MayAlias: i32* %gep1, i32* %gep2
-define void @t10(%struct.S2* %s, i32* %q) {
-  %in_array = load i32, i32* %q, !range !5
-  %gep1 = getelementptr inbounds %struct.S2, %struct.S2* %s, i64 0, i32 2, i32 %in_array
-  %gep2 = getelementptr inbounds %struct.S2, %struct.S2* %s, i64 0, i32 1, i32 0
-  load %struct.S2, %struct.S2* %s
-  load i32, i32* %gep1
-  load i32, i32* %gep2
+define void @t10(ptr %s, ptr %q) {
+  %in_array = load i32, ptr %q, !range !5
+  %gep1 = getelementptr inbounds %struct.S2, ptr %s, i64 0, i32 2, i32 %in_array
+  %gep2 = getelementptr inbounds %struct.S2, ptr %s, i64 0, i32 1, i32 0
+  load %struct.S2, ptr %s
+  load i32, ptr %gep1
+  load i32, ptr %gep2
   ret void
 }
 
 ; CHECK-LABEL: Function: zeroext_index
 ; CHECK:  MayAlias:     i32* %gep, [256 x i32]* %s
-define void @zeroext_index([256 x i32]* %s, i8* %q) {
-  %a = load i8, i8* %q, !range !6
+define void @zeroext_index(ptr %s, ptr %q) {
+  %a = load i8, ptr %q, !range !6
   %in_array = zext i8 %a to i32
-  %gep = getelementptr inbounds [256 x i32], [256 x i32]* %s, i64 0, i32 %in_array
-  load [256 x i32], [256 x i32]* %s
-  load i32, i32* %gep
+  %gep = getelementptr inbounds [256 x i32], ptr %s, i64 0, i32 %in_array
+  load [256 x i32], ptr %s
+  load i32, ptr %gep
   ret void
 }
 
@@ -205,18 +203,18 @@ define void @zeroext_index([256 x i32]* %s, i8* %q) {
 ; CHECK: MayAlias: i32* %p.02, i32* %p.2
 ; CHECK: NoAlias:  i32* %p.01, i32* %p.3
 ; CHECK: NoAlias:  i32* %p.02, i32* %p.3
-define void @multiple(i32* %p, i32* %o1_ptr, i32* %o2_ptr) {
-  %o1 = load i32, i32* %o1_ptr, !range !0
-  %o2 = load i32, i32* %o2_ptr, !range !0
-  %p.01 = getelementptr i32, i32* %p, i32 %o1  ; p + [0, 1]
-  %p.02 = getelementptr i32, i32* %p.01, i32 %o2 ; p + [0, 2]
-  %p.2 = getelementptr i32, i32* %p, i32 2
-  %p.3 = getelementptr i32, i32* %p, i32 3
-  load i32, i32* %p
-  load i32, i32* %p.01
-  load i32, i32* %p.02
-  load i32, i32* %p.2
-  load i32, i32* %p.3
+define void @multiple(ptr %p, ptr %o1_ptr, ptr %o2_ptr) {
+  %o1 = load i32, ptr %o1_ptr, !range !0
+  %o2 = load i32, ptr %o2_ptr, !range !0
+  %p.01 = getelementptr i32, ptr %p, i32 %o1  ; p + [0, 1]
+  %p.02 = getelementptr i32, ptr %p.01, i32 %o2 ; p + [0, 2]
+  %p.2 = getelementptr i32, ptr %p, i32 2
+  %p.3 = getelementptr i32, ptr %p, i32 3
+  load i32, ptr %p
+  load i32, ptr %p.01
+  load i32, ptr %p.02
+  load i32, ptr %p.2
+  load i32, ptr %p.3
   ret void
 }
 
@@ -228,16 +226,16 @@ define void @multiple(i32* %p, i32* %o1_ptr, i32* %o2_ptr) {
 ; CHECK: MayAlias: i8* %p, i8* %p.o.1
 ; CHECK: NoAlias: i8* %p.neg1, i8* %p.o.1
 ; CHECK: NoAlias:  i8* %p.o, i8* %p.o.1
-define void @benign_overflow(i8* %p, i64 %o) {
+define void @benign_overflow(ptr %p, i64 %o) {
   %c = icmp sge i64 %o, -1
   call void @llvm.assume(i1 %c)
-  %p.neg1 = getelementptr i8, i8* %p, i64 -1
-  %p.o = getelementptr i8, i8* %p, i64 %o
-  %p.o.1 = getelementptr i8, i8* %p.o, i64 1
-  load i8, i8* %p
-  load i8, i8* %p.neg1
-  load i8, i8* %p.o
-  load i8, i8* %p.o.1
+  %p.neg1 = getelementptr i8, ptr %p, i64 -1
+  %p.o = getelementptr i8, ptr %p, i64 %o
+  %p.o.1 = getelementptr i8, ptr %p.o, i64 1
+  load i8, ptr %p
+  load i8, ptr %p.neg1
+  load i8, ptr %p.o
+  load i8, ptr %p.o.1
   ret void
 }
 

diff  --git a/llvm/test/Analysis/BasicAA/returned.ll b/llvm/test/Analysis/BasicAA/returned.ll
index 934a5481d3bc..881a52788f72 100644
--- a/llvm/test/Analysis/BasicAA/returned.ll
+++ b/llvm/test/Analysis/BasicAA/returned.ll
@@ -16,38 +16,35 @@ target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
 ; CHECK-DAG: NoAlias: i32* %x, i32* %z
 ; CHECK-DAG: NoAlias: i32* %y, i32* %z
 
-; CHECK-DAG: MayAlias: %struct* %st, %struct* %y_12
-; CHECK-DAG: MayAlias: i32* %x, %struct* %y_12
-; CHECK-DAG: MayAlias: i32* %x, i80* %y_10
-
-; CHECK-DAG: MayAlias: %struct* %st, i64* %y_8
-; CHECK-DAG: MayAlias: i64* %y_8, i32* %z
-; CHECK-DAG: NoAlias: i32* %x, i64* %y_8
-
-; CHECK-DAG: MustAlias: i32* %y, %struct* %y_12
-; CHECK-DAG: MustAlias: i32* %y, i64* %y_8
-; CHECK-DAG: MustAlias: i32* %y, i80* %y_10
-
-define void @test_simple(%struct* %st, i64 %i, i64 %j, i64 %k) {
-  %x = getelementptr inbounds %struct, %struct* %st, i64 %i, i32 0
-  %y = getelementptr inbounds %struct, %struct* %st, i64 %j, i32 1
-  %sta = call %struct* @func2(%struct* %st)
-  %z = getelementptr inbounds %struct, %struct* %sta, i64 %k, i32 2
-  %y_12 = bitcast i32* %y to %struct*
-  %y_10 = bitcast i32* %y to i80*
-  %ya = call i32* @func1(i32* %y)
-  %y_8 = bitcast i32* %ya to i64*
-  load %struct, %struct* %st
-  load %struct, %struct* %sta
-  load i32, i32* %x
-  load i32, i32* %y
-  load i32, i32* %z
-  load %struct, %struct* %y_12
-  load i80, i80* %y_10
-  load i64, i64* %y_8
+; CHECK-DAG: MayAlias: %struct* %st, %struct* %y
+; CHECK-DAG: MayAlias: i32* %x, %struct* %y
+; CHECK-DAG: MayAlias: i32* %x, i80* %y
+
+; CHECK-DAG: MayAlias: %struct* %st, i64* %ya
+; CHECK-DAG: MayAlias: i64* %ya, i32* %z
+; CHECK-DAG: NoAlias: i32* %x, i64* %ya
+
+; CHECK-DAG: MustAlias: %struct* %y, i32* %y
+; CHECK-DAG: MustAlias: i32* %y, i64* %ya
+; CHECK-DAG: MustAlias: i80* %y, i32* %y
+
+define void @test_simple(ptr %st, i64 %i, i64 %j, i64 %k) {
+  %x = getelementptr inbounds %struct, ptr %st, i64 %i, i32 0
+  %y = getelementptr inbounds %struct, ptr %st, i64 %j, i32 1
+  %sta = call ptr @func2(ptr %st)
+  %z = getelementptr inbounds %struct, ptr %sta, i64 %k, i32 2
+  %ya = call ptr @func1(ptr %y)
+  load %struct, ptr %st
+  load %struct, ptr %sta
+  load i32, ptr %x
+  load i32, ptr %y
+  load i32, ptr %z
+  load %struct, ptr %y
+  load i80, ptr %y
+  load i64, ptr %ya
   ret void
 }
 
-declare i32* @func1(i32* returned) nounwind
-declare %struct* @func2(%struct* returned) nounwind
+declare ptr @func1(ptr returned) nounwind
+declare ptr @func2(ptr returned) nounwind
 

diff  --git a/llvm/test/Analysis/BasicAA/sequential-gep.ll b/llvm/test/Analysis/BasicAA/sequential-gep.ll
index 1b607f2bdb9b..274c891a227e 100644
--- a/llvm/test/Analysis/BasicAA/sequential-gep.ll
+++ b/llvm/test/Analysis/BasicAA/sequential-gep.ll
@@ -2,191 +2,176 @@
 
 ; CHECK: Function: t1
 ; CHECK: NoAlias: i32* %gep1, i32* %gep2
-define void @t1([8 x i32]* %p, i32 %addend, i32* %q) {
-  %knownnonzero = load i32, i32* %q, !range !0
+define void @t1(ptr %p, i32 %addend, ptr %q) {
+  %knownnonzero = load i32, ptr %q, !range !0
   %add = add nsw nuw i32 %addend, %knownnonzero
-  %gep1 = getelementptr [8 x i32], [8 x i32]* %p, i32 2, i32 %addend
-  %gep2 = getelementptr [8 x i32], [8 x i32]* %p, i32 2, i32 %add
-  load i32, i32* %gep1
-  load i32, i32* %gep2
+  %gep1 = getelementptr [8 x i32], ptr %p, i32 2, i32 %addend
+  %gep2 = getelementptr [8 x i32], ptr %p, i32 2, i32 %add
+  load i32, ptr %gep1
+  load i32, ptr %gep2
   ret void
 }
 
 ; CHECK: Function: t2
 ; CHECK: MayAlias: i32* %gep1, i32* %gep2
-define void @t2([8 x i32]* %p, i32 %addend, i32* %q) {
-  %knownnonzero = load i32, i32* %q, !range !0
+define void @t2(ptr %p, i32 %addend, ptr %q) {
+  %knownnonzero = load i32, ptr %q, !range !0
   %add = add nsw nuw i32 %addend, %knownnonzero
-  %gep1 = getelementptr [8 x i32], [8 x i32]* %p, i32 1, i32 %addend
-  %gep2 = getelementptr [8 x i32], [8 x i32]* %p, i32 0, i32 %add
-  load i32, i32* %gep1
-  load i32, i32* %gep2
+  %gep1 = getelementptr [8 x i32], ptr %p, i32 1, i32 %addend
+  %gep2 = getelementptr [8 x i32], ptr %p, i32 0, i32 %add
+  load i32, ptr %gep1
+  load i32, ptr %gep2
   ret void
 }
 
 ; CHECK: Function: t3
 ; CHECK: MustAlias: i32* %gep1, i32* %gep2
-define void @t3([8 x i32]* %p, i32 %addend, i32* %q) {
-  %knownnonzero = load i32, i32* %q, !range !0
+define void @t3(ptr %p, i32 %addend, ptr %q) {
+  %knownnonzero = load i32, ptr %q, !range !0
   %add = add nsw nuw i32 %addend, %knownnonzero
-  %gep1 = getelementptr [8 x i32], [8 x i32]* %p, i32 0, i32 %add
-  %gep2 = getelementptr [8 x i32], [8 x i32]* %p, i32 0, i32 %add
-  load i32, i32* %gep1
-  load i32, i32* %gep2
+  %gep1 = getelementptr [8 x i32], ptr %p, i32 0, i32 %add
+  %gep2 = getelementptr [8 x i32], ptr %p, i32 0, i32 %add
+  load i32, ptr %gep1
+  load i32, ptr %gep2
   ret void
 }
 
 ; CHECK: Function: t4
 ; CHECK: MayAlias: i32* %gep1, i32* %gep2
-define void @t4([8 x i32]* %p, i32 %addend, i32* %q) {
-  %knownnonzero = load i32, i32* %q, !range !0
+define void @t4(ptr %p, i32 %addend, ptr %q) {
+  %knownnonzero = load i32, ptr %q, !range !0
   %add = add nsw nuw i32 %addend, %knownnonzero
-  %gep1 = getelementptr [8 x i32], [8 x i32]* %p, i32 1, i32 %addend
-  %gep2 = getelementptr [8 x i32], [8 x i32]* %p, i32 %add, i32 %add
-  load i32, i32* %gep1
-  load i32, i32* %gep2
+  %gep1 = getelementptr [8 x i32], ptr %p, i32 1, i32 %addend
+  %gep2 = getelementptr [8 x i32], ptr %p, i32 %add, i32 %add
+  load i32, ptr %gep1
+  load i32, ptr %gep2
   ret void
 }
 
 ; CHECK: Function: t5
-; CHECK: MayAlias: i64* %bc, i32* %gep2
-define void @t5([8 x i32]* %p, i32 %addend, i32* %q) {
-  %knownnonzero = load i32, i32* %q, !range !0
+; CHECK: MayAlias: i64* %gep1, i32* %gep2
+define void @t5(ptr %p, i32 %addend, ptr %q) {
+  %knownnonzero = load i32, ptr %q, !range !0
   %add = add nsw nuw i32 %addend, %knownnonzero
-  %gep1 = getelementptr [8 x i32], [8 x i32]* %p, i32 2, i32 %addend
-  %gep2 = getelementptr [8 x i32], [8 x i32]* %p, i32 2, i32 %add
-  %bc = bitcast i32* %gep1 to i64*
-  load i32, i32* %gep2
-  load i64, i64* %bc
+  %gep1 = getelementptr [8 x i32], ptr %p, i32 2, i32 %addend
+  %gep2 = getelementptr [8 x i32], ptr %p, i32 2, i32 %add
+  load i32, ptr %gep2
+  load i64, ptr %gep1
   ret void
 }
 
 ; CHECK-LABEL: Function: add_non_zero_simple
 ; CHECK: NoAlias: i32* %gep1, i32* %gep2
-define void @add_non_zero_simple(i32* %p, i32 %addend, i32* %q) {
-  %knownnonzero = load i32, i32* %q, !range !0
+define void @add_non_zero_simple(ptr %p, i32 %addend, ptr %q) {
+  %knownnonzero = load i32, ptr %q, !range !0
   %add = add i32 %addend, %knownnonzero
-  %gep1 = getelementptr i32, i32* %p, i32 %addend
-  %gep2 = getelementptr i32, i32* %p, i32 %add
-  load i32, i32* %gep1
-  load i32, i32* %gep2
+  %gep1 = getelementptr i32, ptr %p, i32 %addend
+  %gep2 = getelementptr i32, ptr %p, i32 %add
+  load i32, ptr %gep1
+  load i32, ptr %gep2
   ret void
 }
 
 ; CHECK-LABEL: Function: add_non_zero_
diff erent_scales
 ; CHECK: MayAlias: i32* %gep1, i16* %gep2
-define void @add_non_zero_
diff erent_scales(i32* %p, i32 %addend, i32* %q) {
-  %knownnonzero = load i32, i32* %q, !range !0
+define void @add_non_zero_
diff erent_scales(ptr %p, i32 %addend, ptr %q) {
+  %knownnonzero = load i32, ptr %q, !range !0
   %add = add i32 %addend, %knownnonzero
-  %p16 = bitcast i32* %p to i16*
-  %gep1 = getelementptr i32, i32* %p, i32 %addend
-  %gep2 = getelementptr i16, i16* %p16, i32 %add
-  load i32, i32* %gep1
-  load i16, i16* %gep2
+  %gep1 = getelementptr i32, ptr %p, i32 %addend
+  %gep2 = getelementptr i16, ptr %p, i32 %add
+  load i32, ptr %gep1
+  load i16, ptr %gep2
   ret void
 }
 
 ; CHECK-LABEL: Function: add_non_zero_
diff erent_sizes
-; CHECK: NoAlias: i16* %gep1.16, i32* %gep2
-; CHECK: NoAlias: i32* %gep1, i16* %gep2.16
-; CHECK: NoAlias: i16* %gep1.16, i16* %gep2.16
-; CHECK: MayAlias: i64* %gep1.64, i32* %gep2
-; CHECK: MayAlias: i64* %gep1.64, i16* %gep2.16
-; CHECK: MayAlias: i32* %gep1, i64* %gep2.64
-; CHECK: MayAlias: i16* %gep1.16, i64* %gep2.64
-; CHECK: MayAlias: i64* %gep1.64, i64* %gep2.64
-define void @add_non_zero_
diff erent_sizes(i32* %p, i32 %addend, i32* %q) {
-  %knownnonzero = load i32, i32* %q, !range !0
+; CHECK: NoAlias: i16* %gep1, i32* %gep2
+; CHECK: NoAlias: i32* %gep1, i16* %gep2
+; CHECK: NoAlias: i16* %gep1, i16* %gep2
+; CHECK: MayAlias: i64* %gep1, i32* %gep2
+; CHECK: MayAlias: i64* %gep1, i16* %gep2
+; CHECK: MayAlias: i32* %gep1, i64* %gep2
+; CHECK: MayAlias: i16* %gep1, i64* %gep2
+; CHECK: MayAlias: i64* %gep1, i64* %gep2
+define void @add_non_zero_
diff erent_sizes(ptr %p, i32 %addend, ptr %q) {
+  %knownnonzero = load i32, ptr %q, !range !0
   %add = add i32 %addend, %knownnonzero
-  %gep1 = getelementptr i32, i32* %p, i32 %addend
-  %gep2 = getelementptr i32, i32* %p, i32 %add
-  %gep1.16 = bitcast i32* %gep1 to i16*
-  %gep2.16 = bitcast i32* %gep2 to i16*
-  %gep1.64 = bitcast i32* %gep1 to i64*
-  %gep2.64 = bitcast i32* %gep2 to i64*
-  load i32, i32* %gep1
-  load i32, i32* %gep2
-  load i16, i16* %gep1.16
-  load i16, i16* %gep2.16
-  load i64, i64* %gep1.64
-  load i64, i64* %gep2.64
+  %gep1 = getelementptr i32, ptr %p, i32 %addend
+  %gep2 = getelementptr i32, ptr %p, i32 %add
+  load i32, ptr %gep1
+  load i32, ptr %gep2
+  load i16, ptr %gep1
+  load i16, ptr %gep2
+  load i64, ptr %gep1
+  load i64, ptr %gep2
   ret void
 }
 
 
 ; CHECK-LABEL: add_non_zero_with_offset
-; MayAlias: i32* %gep1, i32* %gep2
-; NoAlias: i16* %gep1.16, i16* %gep2.16
-define void @add_non_zero_with_offset(i32* %p, i32 %addend, i32* %q) {
-  %knownnonzero = load i32, i32* %q, !range !0
+; MayAlias: ptr %gep1, ptr %gep2
+; NoAlias: ptr %gep1, ptr %gep2
+define void @add_non_zero_with_offset(ptr %p, i32 %addend, ptr %q) {
+  %knownnonzero = load i32, ptr %q, !range !0
   %add = add i32 %addend, %knownnonzero
-  %p.8 = bitcast i32* %p to i8*
-  %p.off.8 = getelementptr i8, i8* %p.8, i32 2
-  %p.off = bitcast i8* %p.off.8 to i32*
-  %gep1 = getelementptr i32, i32* %p.off, i32 %addend
-  %gep2 = getelementptr i32, i32* %p, i32 %add
-  %gep1.16 = bitcast i32* %gep1 to i16*
-  %gep2.16 = bitcast i32* %gep2 to i16*
-  load i32, i32* %gep1
-  load i32, i32* %gep2
-  load i16, i16* %gep1.16
-  load i16, i16* %gep2.16
+  %p.off.8 = getelementptr i8, ptr %p, i32 2
+  %gep1 = getelementptr i32, ptr %p.off.8, i32 %addend
+  %gep2 = getelementptr i32, ptr %p, i32 %add
+  load i32, ptr %gep1
+  load i32, ptr %gep2
+  load i16, ptr %gep1
+  load i16, ptr %gep2
   ret void
 }
 
 ; CHECK-LABEL: Function: add_non_zero_assume
 ; CHECK: NoAlias: i32* %gep1, i32* %gep2
-define void @add_non_zero_assume(i32* %p, i32 %addend, i32 %knownnonzero) {
+define void @add_non_zero_assume(ptr %p, i32 %addend, i32 %knownnonzero) {
   %cmp = icmp ne i32 %knownnonzero, 0
   call void @llvm.assume(i1 %cmp)
   %add = add i32 %addend, %knownnonzero
-  %gep1 = getelementptr i32, i32* %p, i32 %addend
-  %gep2 = getelementptr i32, i32* %p, i32 %add
-  load i32, i32* %gep1
-  load i32, i32* %gep2
+  %gep1 = getelementptr i32, ptr %p, i32 %addend
+  %gep2 = getelementptr i32, ptr %p, i32 %add
+  load i32, ptr %gep1
+  load i32, ptr %gep2
   ret void
 }
 
 ; CHECK-LABEL: non_zero_index_simple
 ; CHECK: NoAlias: i32* %gep, i32* %p
-; CHECK: NoAlias: i16* %gep.16, i32* %p
-; CHECK: MayAlias: i64* %gep.64, i32* %p
-define void @non_zero_index_simple(i32* %p, i32* %q) {
-  %knownnonzero = load i32, i32* %q, !range !0
-  %gep = getelementptr i32, i32* %p, i32 %knownnonzero
-  %gep.16 = bitcast i32* %gep to i16*
-  %gep.64 = bitcast i32* %gep to i64*
-  load i32, i32* %p
-  load i32, i32* %gep
-  load i16, i16* %gep.16
-  load i64, i64* %gep.64
+; CHECK: NoAlias: i16* %gep, i32* %p
+; CHECK: MayAlias: i64* %gep, i32* %p
+define void @non_zero_index_simple(ptr %p, ptr %q) {
+  %knownnonzero = load i32, ptr %q, !range !0
+  %gep = getelementptr i32, ptr %p, i32 %knownnonzero
+  load i32, ptr %p
+  load i32, ptr %gep
+  load i16, ptr %gep
+  load i64, ptr %gep
   ret void
 }
 
 ; CHECK-LABEL: non_zero_index_with_offset
 ; CHECK: MayAlias: i32* %gep, i32* %p
-; CHECK: NoAlias: i16* %gep.16, i32* %p
-define void @non_zero_index_with_offset(i32* %p, i32* %q) {
-  %knownnonzero = load i32, i32* %q, !range !0
-  %p.8 = bitcast i32* %p to i8*
-  %p.off.8 = getelementptr i8, i8* %p.8, i32 2
-  %p.off = bitcast i8* %p.off.8 to i32*
-  %gep = getelementptr i32, i32* %p.off, i32 %knownnonzero
-  %gep.16 = bitcast i32* %gep to i16*
-  load i32, i32* %p
-  load i32, i32* %gep
-  load i16, i16* %gep.16
+; CHECK: NoAlias: i16* %gep, i32* %p
+define void @non_zero_index_with_offset(ptr %p, ptr %q) {
+  %knownnonzero = load i32, ptr %q, !range !0
+  %p.off.8 = getelementptr i8, ptr %p, i32 2
+  %gep = getelementptr i32, ptr %p.off.8, i32 %knownnonzero
+  load i32, ptr %p
+  load i32, ptr %gep
+  load i16, ptr %gep
   ret void
 }
 
 ; CHECK-LABEL: non_zero_index_assume
 ; CHECK: NoAlias: i32* %gep, i32* %p
-define void @non_zero_index_assume(i32* %p, i32 %knownnonzero) {
+define void @non_zero_index_assume(ptr %p, i32 %knownnonzero) {
   %cmp = icmp ne i32 %knownnonzero, 0
   call void @llvm.assume(i1 %cmp)
-  %gep = getelementptr i32, i32* %p, i32 %knownnonzero
-  load i32, i32* %p
-  load i32, i32* %gep
+  %gep = getelementptr i32, ptr %p, i32 %knownnonzero
+  load i32, ptr %p
+  load i32, ptr %gep
   ret void
 }
 

diff  --git a/llvm/test/Analysis/BasicAA/struct-geps.ll b/llvm/test/Analysis/BasicAA/struct-geps.ll
index 6cffe0cbefd8..c7ca731697e4 100644
--- a/llvm/test/Analysis/BasicAA/struct-geps.ll
+++ b/llvm/test/Analysis/BasicAA/struct-geps.ll
@@ -14,43 +14,40 @@ target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
 ; CHECK-DAG: NoAlias: i32* %x, i32* %z
 ; CHECK-DAG: NoAlias: i32* %y, i32* %z
 
-; CHECK-DAG: MayAlias: %struct* %st, %struct* %y_12
-; CHECK-DAG: MayAlias: i32* %x, %struct* %y_12
-; CHECK-DAG: MayAlias: i32* %x, i80* %y_10
-
-; CHECK-DAG: MayAlias: %struct* %st, i64* %y_8
-; CHECK-DAG: MayAlias: i64* %y_8, i32* %z
-; CHECK-DAG: NoAlias: i32* %x, i64* %y_8
-
-; CHECK-DAG: MustAlias: i32* %y, %struct* %y_12
-; CHECK-DAG: MustAlias: i32* %y, i64* %y_8
-; CHECK-DAG: MustAlias: i32* %y, i80* %y_10
-
-define void @test_simple(%struct* %st, i64 %i, i64 %j, i64 %k) {
-  %x = getelementptr inbounds %struct, %struct* %st, i64 %i, i32 0
-  %y = getelementptr inbounds %struct, %struct* %st, i64 %j, i32 1
-  %z = getelementptr inbounds %struct, %struct* %st, i64 %k, i32 2
-  %y_12 = bitcast i32* %y to %struct*
-  %y_10 = bitcast i32* %y to i80*
-  %y_8 = bitcast i32* %y to i64*
-  load %struct, %struct* %st
-  load i32, i32* %x
-  load i32, i32* %y
-  load i32, i32* %z
-  load %struct, %struct* %y_12
-  load i80, i80* %y_10
-  load i64, i64* %y_8
+; CHECK-DAG: MayAlias: %struct* %st, %struct* %y
+; CHECK-DAG: MayAlias: i32* %x, %struct* %y
+; CHECK-DAG: MayAlias: i32* %x, i80* %y
+
+; CHECK-DAG: MayAlias: %struct* %st, i64* %y
+; CHECK-DAG: MayAlias: i64* %y, i32* %z
+; CHECK-DAG: NoAlias: i32* %x, i64* %y
+
+; CHECK-DAG: MustAlias: %struct* %y, i32* %y
+; CHECK-DAG: MustAlias: i64* %y, i32* %y
+; CHECK-DAG: MustAlias: i80* %y, i32* %y
+
+define void @test_simple(ptr %st, i64 %i, i64 %j, i64 %k) {
+  %x = getelementptr inbounds %struct, ptr %st, i64 %i, i32 0
+  %y = getelementptr inbounds %struct, ptr %st, i64 %j, i32 1
+  %z = getelementptr inbounds %struct, ptr %st, i64 %k, i32 2
+  load %struct, ptr %st
+  load i32, ptr %x
+  load i32, ptr %y
+  load i32, ptr %z
+  load %struct, ptr %y
+  load i80, ptr %y
+  load i64, ptr %y
   ret void
 }
 
 ; As the GEP is not inbounds, these pointers may alias due to overflow.
 ; CHECK-LABEL: test_not_inbounds
 ; CHECK: MayAlias: i32* %x, i32* %y
-define void @test_not_inbounds(%struct* %st, i64 %i, i64 %j, i64 %k) {
-  %x = getelementptr %struct, %struct* %st, i64 %i, i32 0
-  %y = getelementptr %struct, %struct* %st, i64 %j, i32 1
-  load i32, i32* %x
-  load i32, i32* %y
+define void @test_not_inbounds(ptr %st, i64 %i, i64 %j, i64 %k) {
+  %x = getelementptr %struct, ptr %st, i64 %i, i32 0
+  %y = getelementptr %struct, ptr %st, i64 %j, i32 1
+  load i32, ptr %x
+  load i32, ptr %y
   ret void
 }
 
@@ -64,32 +61,29 @@ define void @test_not_inbounds(%struct* %st, i64 %i, i64 %j, i64 %k) {
 ; CHECK-DAG: NoAlias: i32* %x, i32* %z
 ; CHECK-DAG: NoAlias: i32* %y, i32* %z
 
-; CHECK-DAG: MayAlias: [1 x %struct]* %st, %struct* %y_12
-; CHECK-DAG: MayAlias: i32* %x, %struct* %y_12
-; CHECK-DAG: MayAlias: i32* %x, i80* %y_10
-
-; CHECK-DAG: MayAlias: [1 x %struct]* %st, i64* %y_8
-; CHECK-DAG: MayAlias: i64* %y_8, i32* %z
-; CHECK-DAG: NoAlias: i32* %x, i64* %y_8
-
-; CHECK-DAG: MustAlias: i32* %y, %struct* %y_12
-; CHECK-DAG: MustAlias: i32* %y, i64* %y_8
-; CHECK-DAG: MustAlias: i32* %y, i80* %y_10
-
-define void @test_in_array([1 x %struct]* %st, i64 %i, i64 %j, i64 %k, i64 %i1, i64 %j1, i64 %k1) {
-  %x = getelementptr inbounds [1 x %struct], [1 x %struct]* %st, i64 %i, i64 %i1, i32 0
-  %y = getelementptr inbounds [1 x %struct], [1 x %struct]* %st, i64 %j, i64 %j1, i32 1
-  %z = getelementptr inbounds [1 x %struct], [1 x %struct]* %st, i64 %k, i64 %k1, i32 2
-  %y_12 = bitcast i32* %y to %struct*
-  %y_10 = bitcast i32* %y to i80*
-  %y_8 = bitcast i32* %y to i64*
-  load [1 x %struct], [1 x %struct]* %st
-  load i32, i32* %x
-  load i32, i32* %y
-  load i32, i32* %z
-  load %struct, %struct* %y_12
-  load i80, i80* %y_10
-  load i64, i64* %y_8
+; CHECK-DAG: MayAlias: [1 x %struct]* %st, %struct* %y
+; CHECK-DAG: MayAlias: i32* %x, %struct* %y
+; CHECK-DAG: MayAlias: i32* %x, i80* %y
+
+; CHECK-DAG: MayAlias: [1 x %struct]* %st, i64* %y
+; CHECK-DAG: MayAlias: i64* %y, i32* %z
+; CHECK-DAG: NoAlias: i32* %x, i64* %y
+
+; CHECK-DAG: MustAlias: %struct* %y, i32* %y
+; CHECK-DAG: MustAlias: i64* %y, i32* %y
+; CHECK-DAG: MustAlias: i80* %y, i32* %y
+
+define void @test_in_array(ptr %st, i64 %i, i64 %j, i64 %k, i64 %i1, i64 %j1, i64 %k1) {
+  %x = getelementptr inbounds [1 x %struct], ptr %st, i64 %i, i64 %i1, i32 0
+  %y = getelementptr inbounds [1 x %struct], ptr %st, i64 %j, i64 %j1, i32 1
+  %z = getelementptr inbounds [1 x %struct], ptr %st, i64 %k, i64 %k1, i32 2
+  load [1 x %struct], ptr %st
+  load i32, ptr %x
+  load i32, ptr %y
+  load i32, ptr %z
+  load %struct, ptr %y
+  load i80, ptr %y
+  load i64, ptr %y
   ret void
 }
 
@@ -103,32 +97,29 @@ define void @test_in_array([1 x %struct]* %st, i64 %i, i64 %j, i64 %k, i64 %i1,
 ; CHECK-DAG: NoAlias: i32* %x, i32* %z
 ; CHECK-DAG: NoAlias: i32* %y, i32* %z
 
-; CHECK-DAG: MayAlias: [1 x [1 x [1 x %struct]]]* %st, %struct* %y_12
-; CHECK-DAG: MayAlias: i32* %x, %struct* %y_12
-; CHECK-DAG: MayAlias: i32* %x, i80* %y_10
-
-; CHECK-DAG: MayAlias: [1 x [1 x [1 x %struct]]]* %st, i64* %y_8
-; CHECK-DAG: MayAlias: i64* %y_8, i32* %z
-; CHECK-DAG: NoAlias: i32* %x, i64* %y_8
-
-; CHECK-DAG: MustAlias: i32* %y, %struct* %y_12
-; CHECK-DAG: MustAlias: i32* %y, i64* %y_8
-; CHECK-DAG: MustAlias: i32* %y, i80* %y_10
-
-define void @test_in_3d_array([1 x [1 x [1 x %struct]]]* %st, i64 %i, i64 %j, i64 %k, i64 %i1, i64 %j1, i64 %k1, i64 %i2, i64 %j2, i64 %k2, i64 %i3, i64 %j3, i64 %k3) {
-  %x = getelementptr inbounds [1 x [1 x [1 x %struct]]], [1 x [1 x [1 x %struct]]]* %st, i64 %i, i64 %i1, i64 %i2, i64 %i3, i32 0
-  %y = getelementptr inbounds [1 x [1 x [1 x %struct]]], [1 x [1 x [1 x %struct]]]* %st, i64 %j, i64 %j1, i64 %j2, i64 %j3, i32 1
-  %z = getelementptr inbounds [1 x [1 x [1 x %struct]]], [1 x [1 x [1 x %struct]]]* %st, i64 %k, i64 %k1, i64 %k2, i64 %k3, i32 2
-  %y_12 = bitcast i32* %y to %struct*
-  %y_10 = bitcast i32* %y to i80*
-  %y_8 = bitcast i32* %y to i64*
-  load [1 x [1 x [1 x %struct]]], [1 x [1 x [1 x %struct]]]* %st
-  load i32, i32* %x
-  load i32, i32* %y
-  load i32, i32* %z
-  load %struct, %struct* %y_12
-  load i80, i80* %y_10
-  load i64, i64* %y_8
+; CHECK-DAG: MayAlias: [1 x [1 x [1 x %struct]]]* %st, %struct* %y
+; CHECK-DAG: MayAlias: i32* %x, %struct* %y
+; CHECK-DAG: MayAlias: i32* %x, i80* %y
+
+; CHECK-DAG: MayAlias: [1 x [1 x [1 x %struct]]]* %st, i64* %y
+; CHECK-DAG: MayAlias: i64* %y, i32* %z
+; CHECK-DAG: NoAlias: i32* %x, i64* %y
+
+; CHECK-DAG: MustAlias: %struct* %y, i32* %y
+; CHECK-DAG: MustAlias: i64* %y, i32* %y
+; CHECK-DAG: MustAlias: i80* %y, i32* %y
+
+define void @test_in_3d_array(ptr %st, i64 %i, i64 %j, i64 %k, i64 %i1, i64 %j1, i64 %k1, i64 %i2, i64 %j2, i64 %k2, i64 %i3, i64 %j3, i64 %k3) {
+  %x = getelementptr inbounds [1 x [1 x [1 x %struct]]], ptr %st, i64 %i, i64 %i1, i64 %i2, i64 %i3, i32 0
+  %y = getelementptr inbounds [1 x [1 x [1 x %struct]]], ptr %st, i64 %j, i64 %j1, i64 %j2, i64 %j3, i32 1
+  %z = getelementptr inbounds [1 x [1 x [1 x %struct]]], ptr %st, i64 %k, i64 %k1, i64 %k2, i64 %k3, i32 2
+  load [1 x [1 x [1 x %struct]]], ptr %st
+  load i32, ptr %x
+  load i32, ptr %y
+  load i32, ptr %z
+  load %struct, ptr %y
+  load i80, ptr %y
+  load i64, ptr %y
   ret void
 }
 
@@ -147,20 +138,20 @@ define void @test_in_3d_array([1 x [1 x [1 x %struct]]]* %st, i64 %i, i64 %j, i6
 ; CHECK-DAG: NoAlias: i32* %x2, i32* %z
 ; CHECK-DAG: NoAlias: i32* %y2, i32* %z
 
-define void @test_same_underlying_object_same_indices(%struct* %st, i64 %i, i64 %j, i64 %k) {
-  %st2 = getelementptr inbounds %struct, %struct* %st, i32 10
-  %x2 = getelementptr inbounds %struct, %struct* %st2, i64 %i, i32 0
-  %y2 = getelementptr inbounds %struct, %struct* %st2, i64 %j, i32 1
-  %z2 = getelementptr inbounds %struct, %struct* %st2, i64 %k, i32 2
-  %x = getelementptr inbounds %struct, %struct* %st, i64 %i, i32 0
-  %y = getelementptr inbounds %struct, %struct* %st, i64 %j, i32 1
-  %z = getelementptr inbounds %struct, %struct* %st, i64 %k, i32 2
-  load i32, i32* %x
-  load i32, i32* %y
-  load i32, i32* %z
-  load i32, i32* %x2
-  load i32, i32* %y2
-  load i32, i32* %z2
+define void @test_same_underlying_object_same_indices(ptr %st, i64 %i, i64 %j, i64 %k) {
+  %st2 = getelementptr inbounds %struct, ptr %st, i32 10
+  %x2 = getelementptr inbounds %struct, ptr %st2, i64 %i, i32 0
+  %y2 = getelementptr inbounds %struct, ptr %st2, i64 %j, i32 1
+  %z2 = getelementptr inbounds %struct, ptr %st2, i64 %k, i32 2
+  %x = getelementptr inbounds %struct, ptr %st, i64 %i, i32 0
+  %y = getelementptr inbounds %struct, ptr %st, i64 %j, i32 1
+  %z = getelementptr inbounds %struct, ptr %st, i64 %k, i32 2
+  load i32, ptr %x
+  load i32, ptr %y
+  load i32, ptr %z
+  load i32, ptr %x2
+  load i32, ptr %y2
+  load i32, ptr %z2
   ret void
 }
 
@@ -179,20 +170,20 @@ define void @test_same_underlying_object_same_indices(%struct* %st, i64 %i, i64
 ; CHECK-DAG: NoAlias: i32* %x2, i32* %z
 ; CHECK-DAG: NoAlias: i32* %y2, i32* %z
 
-define void @test_same_underlying_object_
diff erent_indices(%struct* %st, i64 %i1, i64 %j1, i64 %k1, i64 %i2, i64 %k2, i64 %j2) {
-  %st2 = getelementptr inbounds %struct, %struct* %st, i32 10
-  %x2 = getelementptr inbounds %struct, %struct* %st2, i64 %i2, i32 0
-  %y2 = getelementptr inbounds %struct, %struct* %st2, i64 %j2, i32 1
-  %z2 = getelementptr inbounds %struct, %struct* %st2, i64 %k2, i32 2
-  %x = getelementptr inbounds %struct, %struct* %st, i64 %i1, i32 0
-  %y = getelementptr inbounds %struct, %struct* %st, i64 %j1, i32 1
-  %z = getelementptr inbounds %struct, %struct* %st, i64 %k1, i32 2
-  load i32, i32* %x
-  load i32, i32* %y
-  load i32, i32* %z
-  load i32, i32* %x2
-  load i32, i32* %y2
-  load i32, i32* %z2
+define void @test_same_underlying_object_
diff erent_indices(ptr %st, i64 %i1, i64 %j1, i64 %k1, i64 %i2, i64 %k2, i64 %j2) {
+  %st2 = getelementptr inbounds %struct, ptr %st, i32 10
+  %x2 = getelementptr inbounds %struct, ptr %st2, i64 %i2, i32 0
+  %y2 = getelementptr inbounds %struct, ptr %st2, i64 %j2, i32 1
+  %z2 = getelementptr inbounds %struct, ptr %st2, i64 %k2, i32 2
+  %x = getelementptr inbounds %struct, ptr %st, i64 %i1, i32 0
+  %y = getelementptr inbounds %struct, ptr %st, i64 %j1, i32 1
+  %z = getelementptr inbounds %struct, ptr %st, i64 %k1, i32 2
+  load i32, ptr %x
+  load i32, ptr %y
+  load i32, ptr %z
+  load i32, ptr %x2
+  load i32, ptr %y2
+  load i32, ptr %z2
   ret void
 }
 
@@ -201,21 +192,21 @@ define void @test_same_underlying_object_
diff erent_indices(%struct* %st, i64 %i1
 
 ; CHECK-LABEL: test_struct_in_array
 ; CHECK-DAG: MustAlias: i32* %x, i32* %y
-define void @test_struct_in_array(%struct2* %st, i64 %i, i64 %j, i64 %k) {
-  %x = getelementptr inbounds %struct2, %struct2* %st, i32 0, i32 1, i32 1, i32 0
-  %y = getelementptr inbounds %struct2, %struct2* %st, i32 0, i32 0, i32 1, i32 1
-  load i32, i32* %x
-  load i32, i32* %y
+define void @test_struct_in_array(ptr %st, i64 %i, i64 %j, i64 %k) {
+  %x = getelementptr inbounds %struct2, ptr %st, i32 0, i32 1, i32 1, i32 0
+  %y = getelementptr inbounds %struct2, ptr %st, i32 0, i32 0, i32 1, i32 1
+  load i32, ptr %x
+  load i32, ptr %y
   ret void
 }
 
 ; PR27418 - Treat GEP indices with the same value but 
diff erent types the same
 ; CHECK-LABEL: test_
diff erent_index_types
 ; CHECK: MustAlias: i16* %tmp1, i16* %tmp2
-define void @test_
diff erent_index_types([2 x i16]* %arr) {
-  %tmp1 = getelementptr inbounds [2 x i16], [2 x i16]* %arr, i16 0, i32 1
-  %tmp2 = getelementptr inbounds [2 x i16], [2 x i16]* %arr, i16 0, i16 1
-  load i16, i16* %tmp1
-  load i16, i16* %tmp2
+define void @test_
diff erent_index_types(ptr %arr) {
+  %tmp1 = getelementptr inbounds [2 x i16], ptr %arr, i16 0, i32 1
+  %tmp2 = getelementptr inbounds [2 x i16], ptr %arr, i16 0, i16 1
+  load i16, ptr %tmp1
+  load i16, ptr %tmp2
   ret void
 }

diff  --git a/llvm/test/Analysis/BasicAA/tail-byval.ll b/llvm/test/Analysis/BasicAA/tail-byval.ll
index 40a22ef3b013..5c4c563a9a5a 100644
--- a/llvm/test/Analysis/BasicAA/tail-byval.ll
+++ b/llvm/test/Analysis/BasicAA/tail-byval.ll
@@ -1,15 +1,15 @@
 ; RUN: opt -aa-pipeline=basic-aa -passes=aa-eval -print-all-alias-modref-info -disable-output < %s 2>&1 | FileCheck %s
 
-declare void @takebyval(i32* byval(i32) %p)
+declare void @takebyval(ptr byval(i32) %p)
 
 define i32 @tailbyval() {
 entry:
   %p = alloca i32
-  store i32 42, i32* %p
-  tail call void @takebyval(i32* byval(i32) %p)
-  %rv = load i32, i32* %p
+  store i32 42, ptr %p
+  tail call void @takebyval(ptr byval(i32) %p)
+  %rv = load i32, ptr %p
   ret i32 %rv
 }
 ; FIXME: This should be Just Ref.
 ; CHECK-LABEL: Function: tailbyval: 1 pointers, 1 call sites
-; CHECK-NEXT:   Both ModRef:  Ptr: i32* %p       <->  tail call void @takebyval(i32* byval(i32) %p)
+; CHECK-NEXT:   Both ModRef:  Ptr: i32* %p       <->  tail call void @takebyval(ptr byval(i32) %p)

diff  --git a/llvm/test/Analysis/BasicAA/vscale.ll b/llvm/test/Analysis/BasicAA/vscale.ll
index d26fc1495ea5..0d6d8fea392b 100644
--- a/llvm/test/Analysis/BasicAA/vscale.ll
+++ b/llvm/test/Analysis/BasicAA/vscale.ll
@@ -8,11 +8,11 @@
 ; CHECK-DAG:  MayAlias:     <vscale x 4 x i32>* %gep1, <vscale x 4 x i32>* %gep2
 define void @gep_alloca_const_offset_1() {
   %alloc = alloca <vscale x 4 x i32>
-  %gep1 = getelementptr <vscale x 4 x i32>, <vscale x 4 x i32>* %alloc, i64 0
-  %gep2 = getelementptr <vscale x 4 x i32>, <vscale x 4 x i32>* %alloc, i64 1
-  load <vscale x 4 x i32>, <vscale x 4 x i32>* %alloc
-  load <vscale x 4 x i32>, <vscale x 4 x i32>* %gep1
-  load <vscale x 4 x i32>, <vscale x 4 x i32>* %gep2
+  %gep1 = getelementptr <vscale x 4 x i32>, ptr %alloc, i64 0
+  %gep2 = getelementptr <vscale x 4 x i32>, ptr %alloc, i64 1
+  load <vscale x 4 x i32>, ptr %alloc
+  load <vscale x 4 x i32>, ptr %gep1
+  load <vscale x 4 x i32>, ptr %gep2
   ret void
 }
 
@@ -23,11 +23,11 @@ define void @gep_alloca_const_offset_1() {
 ; CHECK-DAG:  MayAlias:     <vscale x 4 x i32>* %gep1, <vscale x 4 x i32>* %gep2
 define void @gep_alloca_const_offset_2() {
   %alloc = alloca <vscale x 4 x i32>
-  %gep1 = getelementptr <vscale x 4 x i32>, <vscale x 4 x i32>* %alloc, i64 1
-  %gep2 = getelementptr <vscale x 4 x i32>, <vscale x 4 x i32>* %alloc, i64 1
-  load <vscale x 4 x i32>, <vscale x 4 x i32>* %alloc
-  load <vscale x 4 x i32>, <vscale x 4 x i32>* %gep1
-  load <vscale x 4 x i32>, <vscale x 4 x i32>* %gep2
+  %gep1 = getelementptr <vscale x 4 x i32>, ptr %alloc, i64 1
+  %gep2 = getelementptr <vscale x 4 x i32>, ptr %alloc, i64 1
+  load <vscale x 4 x i32>, ptr %alloc
+  load <vscale x 4 x i32>, ptr %gep1
+  load <vscale x 4 x i32>, ptr %gep2
   ret void
 }
 
@@ -37,11 +37,11 @@ define void @gep_alloca_const_offset_2() {
 ; CHECK-DAG:  MayAlias:     <vscale x 4 x i32>* %gep1, i32* %gep2
 define void @gep_alloca_const_offset_3() {
   %alloc = alloca <vscale x 4 x i32>
-  %gep1 = getelementptr <vscale x 4 x i32>, <vscale x 4 x i32>* %alloc, i64 0
-  %gep2 = getelementptr <vscale x 4 x i32>, <vscale x 4 x i32>* %alloc, i64 0, i64 1
-  load <vscale x 4 x i32>, <vscale x 4 x i32>* %alloc
-  load <vscale x 4 x i32>, <vscale x 4 x i32>* %gep1
-  load i32, i32* %gep2
+  %gep1 = getelementptr <vscale x 4 x i32>, ptr %alloc, i64 0
+  %gep2 = getelementptr <vscale x 4 x i32>, ptr %alloc, i64 0, i64 1
+  load <vscale x 4 x i32>, ptr %alloc
+  load <vscale x 4 x i32>, ptr %gep1
+  load i32, ptr %gep2
   ret void
 }
 
@@ -53,9 +53,9 @@ define void @gep_alloca_const_offset_4() {
   %alloc = alloca <vscale x 4 x i32>
   %gep1 = getelementptr <vscale x 4 x i32>, <vscale x 4 x i32>* %alloc, i64 0
   %gep2 = getelementptr <vscale x 4 x i32>, <vscale x 4 x i32>* %alloc, i64 0, i64 0
-  load <vscale x 4 x i32>, <vscale x 4 x i32>* %alloc
-  load <vscale x 4 x i32>, <vscale x 4 x i32>* %gep1
-  load i32, i32* %gep2
+  load <vscale x 4 x i32>, ptr %alloc
+  load <vscale x 4 x i32>, ptr %gep1
+  load i32, ptr %gep2
   ret void
 }
 
@@ -65,11 +65,11 @@ define void @gep_alloca_const_offset_4() {
 ; CHECK-DAG:  MayAlias:     <vscale x 4 x i32>* %gep1, <vscale x 4 x i32>* %gep2
 define void @gep_alloca_symbolic_offset(i64 %idx1, i64 %idx2) {
   %alloc = alloca <vscale x 4 x i32>
-  %gep1 = getelementptr <vscale x 4 x i32>, <vscale x 4 x i32>* %alloc, i64 %idx1
-  %gep2 = getelementptr <vscale x 4 x i32>, <vscale x 4 x i32>* %alloc, i64 %idx2
-  load <vscale x 4 x i32>, <vscale x 4 x i32>* %alloc
-  load <vscale x 4 x i32>, <vscale x 4 x i32>* %gep1
-  load <vscale x 4 x i32>, <vscale x 4 x i32>* %gep2
+  %gep1 = getelementptr <vscale x 4 x i32>, ptr %alloc, i64 %idx1
+  %gep2 = getelementptr <vscale x 4 x i32>, ptr %alloc, i64 %idx2
+  load <vscale x 4 x i32>, ptr %alloc
+  load <vscale x 4 x i32>, ptr %gep1
+  load <vscale x 4 x i32>, ptr %gep2
   ret void
 }
 
@@ -78,12 +78,12 @@ define void @gep_alloca_symbolic_offset(i64 %idx1, i64 %idx2) {
 ; CHECK-DAG:  MayAlias:     i32* %gep2, <vscale x 4 x i32>* %p
 ; TODO: AliasResult for gep1,gep2 can be improved as NoAlias
 ; CHECK-DAG:  MayAlias:     i32* %gep1, i32* %gep2
-define void @gep_same_base_const_offset(<vscale x 4 x i32>* %p) {
-  %gep1 = getelementptr <vscale x 4 x i32>, <vscale x 4 x i32>* %p, i64 1, i64 0
-  %gep2 = getelementptr <vscale x 4 x i32>, <vscale x 4 x i32>* %p, i64 1, i64 1
-  load <vscale x 4 x i32>, <vscale x 4 x i32>* %p
-  load i32, i32* %gep1
-  load i32, i32* %gep2
+define void @gep_same_base_const_offset(ptr %p) {
+  %gep1 = getelementptr <vscale x 4 x i32>, ptr %p, i64 1, i64 0
+  %gep2 = getelementptr <vscale x 4 x i32>, ptr %p, i64 1, i64 1
+  load <vscale x 4 x i32>, ptr %p
+  load i32, ptr %gep1
+  load i32, ptr %gep2
   ret void
 }
 
@@ -91,12 +91,12 @@ define void @gep_same_base_const_offset(<vscale x 4 x i32>* %p) {
 ; CHECK-DAG:  MayAlias:     <vscale x 4 x i32>* %gep1, <vscale x 4 x i32>* %p
 ; CHECK-DAG:  MayAlias:     <vscale x 4 x i32>* %gep2, <vscale x 4 x i32>* %p
 ; CHECK-DAG:  MayAlias:     <vscale x 4 x i32>* %gep1, <vscale x 4 x i32>* %gep2
-define void @gep_same_base_symbolic_offset(<vscale x 4 x i32>* %p, i64 %idx1, i64 %idx2) {
-  %gep1 = getelementptr <vscale x 4 x i32>, <vscale x 4 x i32>* %p, i64 %idx1
-  %gep2 = getelementptr <vscale x 4 x i32>, <vscale x 4 x i32>* %p, i64 %idx2
-  load <vscale x 4 x i32>, <vscale x 4 x i32>* %p
-  load <vscale x 4 x i32>, <vscale x 4 x i32>* %gep1
-  load <vscale x 4 x i32>, <vscale x 4 x i32>* %gep2
+define void @gep_same_base_symbolic_offset(ptr %p, i64 %idx1, i64 %idx2) {
+  %gep1 = getelementptr <vscale x 4 x i32>, ptr %p, i64 %idx1
+  %gep2 = getelementptr <vscale x 4 x i32>, ptr %p, i64 %idx2
+  load <vscale x 4 x i32>, ptr %p
+  load <vscale x 4 x i32>, ptr %gep1
+  load <vscale x 4 x i32>, ptr %gep2
   ret void
 }
 
@@ -107,51 +107,49 @@ define void @gep_same_base_symbolic_offset(<vscale x 4 x i32>* %p, i64 %idx1, i6
 ; CHECK-DAG:  NoAlias:      <vscale x 4 x i32>* %gep1, <vscale x 4 x i32>* %p2
 ; CHECK-DAG:  NoAlias:      <vscale x 4 x i32>* %gep2, <vscale x 4 x i32>* %p1
 ; CHECK-DAG:  NoAlias:      <vscale x 4 x i32>* %gep1, <vscale x 4 x i32>* %gep2
-define void @gep_
diff erent_base_const_offset(<vscale x 4 x i32>* noalias %p1, <vscale x 4 x i32>* noalias %p2) {
-  %gep1 = getelementptr <vscale x 4 x i32>, <vscale x 4 x i32>* %p1, i64 1
-  %gep2 = getelementptr <vscale x 4 x i32>, <vscale x 4 x i32>* %p2, i64 1
-  load <vscale x 4 x i32>, <vscale x 4 x i32>* %p1
-  load <vscale x 4 x i32>, <vscale x 4 x i32>* %p2
-  load <vscale x 4 x i32>, <vscale x 4 x i32>* %gep1
-  load <vscale x 4 x i32>, <vscale x 4 x i32>* %gep2
+define void @gep_
diff erent_base_const_offset(ptr noalias %p1, ptr noalias %p2) {
+  %gep1 = getelementptr <vscale x 4 x i32>, ptr %p1, i64 1
+  %gep2 = getelementptr <vscale x 4 x i32>, ptr %p2, i64 1
+  load <vscale x 4 x i32>, ptr %p1
+  load <vscale x 4 x i32>, ptr %p2
+  load <vscale x 4 x i32>, ptr %gep1
+  load <vscale x 4 x i32>, ptr %gep2
   ret void
 }
 
 ; getelementptr + bitcast
 
 ; CHECK-LABEL: gep_bitcast_1
-; CHECK-DAG:   MustAlias:    <vscale x 4 x i32>* %p, i32* %p2
+; CHECK-DAG:   MustAlias:    i32* %p, <vscale x 4 x i32>* %p
 ; CHECK-DAG:   MayAlias:     i32* %gep1, <vscale x 4 x i32>* %p
-; CHECK-DAG:   MayAlias:     i32* %gep1, i32* %p2
+; CHECK-DAG:   MayAlias:     i32* %gep1, i32* %p
 ; CHECK-DAG:   MayAlias:     i32* %gep2, <vscale x 4 x i32>* %p
 ; CHECK-DAG:   MayAlias:     i32* %gep1, i32* %gep2
-; CHECK-DAG:   NoAlias:      i32* %gep2, i32* %p2
-define void @gep_bitcast_1(<vscale x 4 x i32>* %p) {
-  %gep1 = getelementptr <vscale x 4 x i32>, <vscale x 4 x i32>* %p, i64 1, i64 0
-  %p2 = bitcast <vscale x 4 x i32>* %p to i32*
-  %gep2 = getelementptr i32, i32* %p2, i64 4
-  load <vscale x 4 x i32>, <vscale x 4 x i32>* %p
-  load i32, i32* %gep1
-  load i32, i32* %gep2
-  load i32, i32* %p2
+; CHECK-DAG:   NoAlias:      i32* %gep2, i32* %p
+define void @gep_bitcast_1(ptr %p) {
+  %gep1 = getelementptr <vscale x 4 x i32>, ptr %p, i64 1, i64 0
+  %gep2 = getelementptr i32, ptr %p, i64 4
+  load <vscale x 4 x i32>, ptr %p
+  load i32, ptr %gep1
+  load i32, ptr %gep2
+  load i32, ptr %p
   ret void
 }
 
 ; CHECK-LABEL: gep_bitcast_2
-; CHECK-DAG:  MustAlias:    <vscale x 4 x i32>* %p, <vscale x 4 x float>* %p2
+; CHECK-DAG:  MustAlias:    <vscale x 4 x float>* %p, <vscale x 4 x i32>* %p
 ; CHECK-DAG:  MayAlias:     i32* %gep1, <vscale x 4 x i32>* %p
-; CHECK-DAG:  MayAlias:     i32* %gep1, <vscale x 4 x float>* %p2
+; CHECK-DAG:  MayAlias:     i32* %gep1, <vscale x 4 x float>* %p
 ; CHECK-DAG:  MayAlias:     float* %gep2, <vscale x 4 x i32>* %p
 ; CHECK-DAG:  MayAlias:     i32* %gep1, float* %gep2
-; CHECK-DAG:  MayAlias:     float* %gep2, <vscale x 4 x float>* %p2
-define void @gep_bitcast_2(<vscale x 4 x i32>* %p) {
-  %gep1 = getelementptr <vscale x 4 x i32>, <vscale x 4 x i32>* %p, i64 1, i64 0
-  %p2 = bitcast <vscale x 4 x i32>* %p to <vscale x 4 x float>*
-  %gep2 = getelementptr <vscale x 4 x float>, <vscale x 4 x float>* %p2, i64 1, i64 0
-  load i32, i32* %gep1
-  load float, float* %gep2
-  load <vscale x 4 x i32>, <vscale x 4 x i32>* %p
-  load <vscale x 4 x float>, <vscale x 4 x float>* %p2
+; CHECK-DAG:  MayAlias:     float* %gep2, <vscale x 4 x float>* %p
+define void @gep_bitcast_2(ptr %p) {
+  %gep1 = getelementptr <vscale x 4 x i32>, ptr %p, i64 1, i64 0
+  %gep2 = getelementptr <vscale x 4 x float>, ptr %p, i64 1, i64 0
+  load i32, ptr %gep1
+  load float, ptr %gep2
+  load <vscale x 4 x i32>, ptr %p
+  load <vscale x 4 x float>, ptr %p
   ret void
 }
 
@@ -164,31 +162,30 @@ define void @gep_bitcast_2(<vscale x 4 x i32>* %p) {
 ; CHECK-DAG:  MayAlias:     i32* %gep, <vscale x 4 x i32>* %p
 ; CHECK-DAG:  MayAlias:     i32* %gep_rec_1, <vscale x 4 x i32>* %p
 ; CHECK-DAG:  NoAlias:      i32* %gep, i32* %gep_rec_1
-define void @gep_recursion_level_1(i32* %a, <vscale x 4 x i32>* %p) {
-  %gep = getelementptr <vscale x 4 x i32>, <vscale x 4 x i32>* %p, i64 1, i64 2
-  %gep_rec_1 = getelementptr i32, i32* %gep, i64 1
-  load <vscale x 4 x i32>, <vscale x 4 x i32>* %p
-  load i32, i32* %a
-  load i32, i32* %gep
-  load i32, i32* %gep_rec_1
+define void @gep_recursion_level_1(ptr %a, ptr %p) {
+  %gep = getelementptr <vscale x 4 x i32>, ptr %p, i64 1, i64 2
+  %gep_rec_1 = getelementptr i32, ptr %gep, i64 1
+  load <vscale x 4 x i32>, ptr %p
+  load i32, ptr %a
+  load i32, ptr %gep
+  load i32, ptr %gep_rec_1
   ret void
 }
 
 ; CHECK-LABEL: gep_recursion_level_1_bitcast
-; CHECK-DAG:  MustAlias:    i32* %a, <vscale x 4 x i32>* %p
+; CHECK-DAG:  MustAlias:    i32* %a, <vscale x 4 x i32>* %a
 ; CHECK-DAG:  MayAlias:     i32* %a, i32* %gep
 ; CHECK-DAG:  MayAlias:     i32* %a, i32* %gep_rec_1
-; CHECK-DAG:  MayAlias:     i32* %gep, <vscale x 4 x i32>* %p
-; CHECK-DAG:  MayAlias:     i32* %gep_rec_1, <vscale x 4 x i32>* %p
+; CHECK-DAG:  MayAlias:     <vscale x 4 x i32>* %a, i32* %gep
+; CHECK-DAG:  MayAlias:     <vscale x 4 x i32>* %a, i32* %gep_rec_1
 ; CHECK-DAG:  NoAlias:      i32* %gep, i32* %gep_rec_1
-define void @gep_recursion_level_1_bitcast(i32* %a) {
-  %p = bitcast i32* %a to <vscale x 4 x i32>*
-  %gep = getelementptr <vscale x 4 x i32>, <vscale x 4 x i32>* %p, i64 1, i64 2
-  %gep_rec_1 = getelementptr i32, i32* %gep, i64 1
-  load <vscale x 4 x i32>, <vscale x 4 x i32>* %p
-  load i32, i32* %a
-  load i32, i32* %gep
-  load i32, i32* %gep_rec_1
+define void @gep_recursion_level_1_bitcast(ptr %a) {
+  %gep = getelementptr <vscale x 4 x i32>, ptr %a, i64 1, i64 2
+  %gep_rec_1 = getelementptr i32, ptr %gep, i64 1
+  load <vscale x 4 x i32>, ptr %a
+  load i32, ptr %a
+  load i32, ptr %gep
+  load i32, ptr %gep_rec_1
   ret void
 }
 
@@ -203,15 +200,15 @@ define void @gep_recursion_level_1_bitcast(i32* %a) {
 ; CHECK-DAG:  NoAlias:      i32* %gep, i32* %gep_rec_1
 ; CHECK-DAG:  NoAlias:      i32* %gep, i32* %gep_rec_2
 ; CHECK-DAG:  NoAlias:      i32* %gep_rec_1, i32* %gep_rec_2
-define void @gep_recursion_level_2(i32* %a, <vscale x 4 x i32>* %p) {
-  %gep = getelementptr <vscale x 4 x i32>, <vscale x 4 x i32>* %p, i64 1, i64 2
-  %gep_rec_1 = getelementptr i32, i32* %gep, i64 1
-  %gep_rec_2 = getelementptr i32, i32* %gep_rec_1, i64 1
-  load <vscale x 4 x i32>, <vscale x 4 x i32>* %p
-  load i32, i32* %a
-  load i32, i32* %gep
-  load i32, i32* %gep_rec_1
-  load i32, i32* %gep_rec_2
+define void @gep_recursion_level_2(ptr %a, ptr %p) {
+  %gep = getelementptr <vscale x 4 x i32>, ptr %p, i64 1, i64 2
+  %gep_rec_1 = getelementptr i32, ptr %gep, i64 1
+  %gep_rec_2 = getelementptr i32, ptr %gep_rec_1, i64 1
+  load <vscale x 4 x i32>, ptr %p
+  load i32, ptr %a
+  load i32, ptr %gep
+  load i32, ptr %gep_rec_1
+  load i32, ptr %gep_rec_2
   ret void
 }
 
@@ -253,22 +250,22 @@ define void @gep_recursion_level_2(i32* %a, <vscale x 4 x i32>* %p) {
 ; CHECK-DAG: NoAlias:      i32* %gep_rec_4, i32* %gep_rec_6
 ; CHECK-DAG: NoAlias:      i32* %gep_rec_5, i32* %gep_rec_6
 ; GEP max lookup depth was set to 6.
-define void @gep_recursion_max_lookup_depth_reached(i32* %a, <vscale x 4 x i32>* %p) {
-  %gep = getelementptr <vscale x 4 x i32>, <vscale x 4 x i32>* %p, i64 1, i64 2
-  %gep_rec_1 = getelementptr i32, i32* %gep, i64 1
-  %gep_rec_2 = getelementptr i32, i32* %gep_rec_1, i64 1
-  %gep_rec_3 = getelementptr i32, i32* %gep_rec_2, i64 1
-  %gep_rec_4 = getelementptr i32, i32* %gep_rec_3, i64 1
-  %gep_rec_5 = getelementptr i32, i32* %gep_rec_4, i64 1
-  %gep_rec_6 = getelementptr i32, i32* %gep_rec_5, i64 1
-  load <vscale x 4 x i32>, <vscale x 4 x i32>* %p
-  load i32, i32* %a
-  load i32, i32* %gep
-  load i32, i32* %gep_rec_1
-  load i32, i32* %gep_rec_2
-  load i32, i32* %gep_rec_3
-  load i32, i32* %gep_rec_4
-  load i32, i32* %gep_rec_5
-  load i32, i32* %gep_rec_6
+define void @gep_recursion_max_lookup_depth_reached(ptr %a, ptr %p) {
+  %gep = getelementptr <vscale x 4 x i32>, ptr %p, i64 1, i64 2
+  %gep_rec_1 = getelementptr i32, ptr %gep, i64 1
+  %gep_rec_2 = getelementptr i32, ptr %gep_rec_1, i64 1
+  %gep_rec_3 = getelementptr i32, ptr %gep_rec_2, i64 1
+  %gep_rec_4 = getelementptr i32, ptr %gep_rec_3, i64 1
+  %gep_rec_5 = getelementptr i32, ptr %gep_rec_4, i64 1
+  %gep_rec_6 = getelementptr i32, ptr %gep_rec_5, i64 1
+  load <vscale x 4 x i32>, ptr %p
+  load i32, ptr %a
+  load i32, ptr %gep
+  load i32, ptr %gep_rec_1
+  load i32, ptr %gep_rec_2
+  load i32, ptr %gep_rec_3
+  load i32, ptr %gep_rec_4
+  load i32, ptr %gep_rec_5
+  load i32, ptr %gep_rec_6
   ret void
 }

diff  --git a/llvm/test/Analysis/BasicAA/zext.ll b/llvm/test/Analysis/BasicAA/zext.ll
index 0e271d8ef194..54bb003981c5 100644
--- a/llvm/test/Analysis/BasicAA/zext.ll
+++ b/llvm/test/Analysis/BasicAA/zext.ll
@@ -6,13 +6,13 @@ target triple = "x86_64-unknown-linux-gnu"
 ; CHECK:  NoAlias: i8* %a, i8* %b
 
 define void @test_with_zext() {
-  %1 = tail call i8* @malloc(i64 120)
-  %a = getelementptr inbounds i8, i8* %1, i64 8
-  %2 = getelementptr inbounds i8, i8* %1, i64 16
+  %1 = tail call ptr @malloc(i64 120)
+  %a = getelementptr inbounds i8, ptr %1, i64 8
+  %2 = getelementptr inbounds i8, ptr %1, i64 16
   %3 = zext i32 3 to i64
-  %b = getelementptr inbounds i8, i8* %2, i64 %3
-  load i8, i8* %a
-  load i8, i8* %b
+  %b = getelementptr inbounds i8, ptr %2, i64 %3
+  load i8, ptr %a
+  load i8, ptr %b
   ret void
 }
 
@@ -20,13 +20,13 @@ define void @test_with_zext() {
 ; CHECK:  NoAlias: i8* %a, i8* %b
 
 define void @test_with_lshr(i64 %i) {
-  %1 = tail call i8* @malloc(i64 120)
-  %a = getelementptr inbounds i8, i8* %1, i64 8
-  %2 = getelementptr inbounds i8, i8* %1, i64 16
+  %1 = tail call ptr @malloc(i64 120)
+  %a = getelementptr inbounds i8, ptr %1, i64 8
+  %2 = getelementptr inbounds i8, ptr %1, i64 16
   %3 = lshr i64 %i, 2
-  %b = getelementptr inbounds i8, i8* %2, i64 %3
-  load i8, i8* %a
-  load i8, i8* %b
+  %b = getelementptr inbounds i8, ptr %2, i64 %3
+  load i8, ptr %a
+  load i8, ptr %b
   ret void
 }
 
@@ -34,31 +34,30 @@ define void @test_with_lshr(i64 %i) {
 ; CHECK:  NoAlias: i8* %m1, i16* %m2.idx
 
 define void @test_with_lshr_
diff erent_sizes(i64 %i) {
-  %m0 = tail call i8* @malloc(i64 120)
-  %m1 = getelementptr inbounds i8, i8* %m0, i64 1
-  load i8, i8* %m1
-  %m2 = getelementptr inbounds i8, i8* %m0, i64 2
+  %m0 = tail call ptr @malloc(i64 120)
+  %m1 = getelementptr inbounds i8, ptr %m0, i64 1
+  load i8, ptr %m1
+  %m2 = getelementptr inbounds i8, ptr %m0, i64 2
   %idx = lshr i64 %i, 2
-  %m2.i16 = bitcast i8* %m2 to i16*
-  %m2.idx = getelementptr inbounds i16, i16* %m2.i16, i64 %idx
-  load i16, i16* %m2.idx
+  %m2.idx = getelementptr inbounds i16, ptr %m2, i64 %idx
+  load i16, ptr %m2.idx
   ret void
 }
 
 ; CHECK-LABEL: test_with_a_loop
 ; CHECK:  NoAlias: i8* %a, i8* %b
 
-define void @test_with_a_loop(i8* %mem) {
+define void @test_with_a_loop(ptr %mem) {
   br label %for.loop
 
 for.loop:
   %i = phi i32 [ 0, %0 ], [ %i.plus1, %for.loop ]
-  %a = getelementptr inbounds i8, i8* %mem, i64 8
-  load i8, i8* %a
-  %a.plus1 = getelementptr inbounds i8, i8* %mem, i64 16
+  %a = getelementptr inbounds i8, ptr %mem, i64 8
+  load i8, ptr %a
+  %a.plus1 = getelementptr inbounds i8, ptr %mem, i64 16
   %i.64 = zext i32 %i to i64
-  %b = getelementptr inbounds i8, i8* %a.plus1, i64 %i.64
-  load i8, i8* %b
+  %b = getelementptr inbounds i8, ptr %a.plus1, i64 %i.64
+  load i8, ptr %b
   %i.plus1 = add nuw nsw i32 %i, 1
   %cmp = icmp eq i32 %i.plus1, 10
   br i1 %cmp, label %for.loop.exit, label %for.loop
@@ -70,20 +69,20 @@ for.loop.exit:
 ; CHECK-LABEL: test_with_varying_base_pointer_in_loop
 ; CHECK:  NoAlias: i8* %a, i8* %b
 
-define void @test_with_varying_base_pointer_in_loop(i8* %mem.orig) {
+define void @test_with_varying_base_pointer_in_loop(ptr %mem.orig) {
   br label %for.loop
 
 for.loop:
-  %mem = phi i8* [ %mem.orig, %0 ], [ %mem.plus1, %for.loop ]
+  %mem = phi ptr [ %mem.orig, %0 ], [ %mem.plus1, %for.loop ]
   %i = phi i32 [ 0, %0 ], [ %i.plus1, %for.loop ]
-  %a = getelementptr inbounds i8, i8* %mem, i64 8
-  load i8, i8* %a
-  %a.plus1 = getelementptr inbounds i8, i8* %mem, i64 16
+  %a = getelementptr inbounds i8, ptr %mem, i64 8
+  load i8, ptr %a
+  %a.plus1 = getelementptr inbounds i8, ptr %mem, i64 16
   %i.64 = zext i32 %i to i64
-  %b = getelementptr inbounds i8, i8* %a.plus1, i64 %i.64
-  load i8, i8* %b
+  %b = getelementptr inbounds i8, ptr %a.plus1, i64 %i.64
+  load i8, ptr %b
   %i.plus1 = add nuw nsw i32 %i, 1
-  %mem.plus1 = getelementptr inbounds i8, i8* %mem, i64 8
+  %mem.plus1 = getelementptr inbounds i8, ptr %mem, i64 8
   %cmp = icmp eq i32 %i.plus1, 10
   br i1 %cmp, label %for.loop.exit, label %for.loop
 
@@ -92,39 +91,38 @@ for.loop.exit:
 }
 
 ; CHECK-LABEL: test_sign_extension
-; CHECK:  MayAlias: i8* %a, i64* %b.i64
+; CHECK:  MayAlias: i8* %a, i64* %b.i8
 
 define void @test_sign_extension(i32 %p) {
-  %1 = tail call i8* @malloc(i64 120)
+  %1 = tail call ptr @malloc(i64 120)
   %p.64 = zext i32 %p to i64
-  %a = getelementptr inbounds i8, i8* %1, i64 %p.64
-  load i8, i8* %a
+  %a = getelementptr inbounds i8, ptr %1, i64 %p.64
+  load i8, ptr %a
   %p.minus1 = add i32 %p, -1
   %p.minus1.64 = zext i32 %p.minus1 to i64
-  %b.i8 = getelementptr inbounds i8, i8* %1, i64 %p.minus1.64
-  %b.i64 = bitcast i8* %b.i8 to i64*
-  load i64, i64* %b.i64
+  %b.i8 = getelementptr inbounds i8, ptr %1, i64 %p.minus1.64
+  load i64, ptr %b.i8
   ret void
 }
 
 ; CHECK-LABEL: test_fe_tools
 ; CHECK:  MayAlias: i32* %a, i32* %b
 
-define void @test_fe_tools([8 x i32]* %values) {
+define void @test_fe_tools(ptr %values) {
   br label %reorder
 
 for.loop:
   %i = phi i32 [ 0, %reorder ], [ %i.next, %for.loop ]
   %idxprom = zext i32 %i to i64
-  %b = getelementptr inbounds [8 x i32], [8 x i32]* %values, i64 0, i64 %idxprom
-  load i32, i32* %b
+  %b = getelementptr inbounds [8 x i32], ptr %values, i64 0, i64 %idxprom
+  load i32, ptr %b
   %i.next = add nuw nsw i32 %i, 1
   %cmp = icmp eq i32 %i.next, 10
   br i1 %cmp, label %for.loop.exit, label %for.loop
 
 reorder:
-  %a = getelementptr inbounds [8 x i32], [8 x i32]* %values, i64 0, i64 1
-  load i32, i32* %a
+  %a = getelementptr inbounds [8 x i32], ptr %values, i64 0, i64 1
+  load i32, ptr %a
   br label %for.loop
 
 for.loop.exit:
@@ -135,11 +133,11 @@ for.loop.exit:
 @d = global i32 0, align 4
 
 ; CHECK-LABEL: test_spec2006
-; CHECK:  MayAlias: i32** %x, i32** %y
+; CHECK:  MayAlias: ptr* %x, ptr* %y
 
 define void @test_spec2006() {
-  %h = alloca [1 x [2 x i32*]], align 16
-  %d.val = load i32, i32* @d, align 4
+  %h = alloca [1 x [2 x ptr]], align 16
+  %d.val = load i32, ptr @d, align 4
   %d.promoted = sext i32 %d.val to i64
   %1 = icmp slt i32 %d.val, 2
   br i1 %1, label %.lr.ph, label %bb3
@@ -150,44 +148,44 @@ define void @test_spec2006() {
 bb2:
   %i = phi i32 [ %d.val, %.lr.ph ], [ %i.plus1, %bb2 ]
   %i.promoted = sext i32 %i to i64
-  %x = getelementptr inbounds [1 x [2 x i32*]], [1 x [2 x i32*]]* %h, i64 0, i64 %d.promoted, i64 %i.promoted
-  load i32*, i32** %x
+  %x = getelementptr inbounds [1 x [2 x ptr]], ptr %h, i64 0, i64 %d.promoted, i64 %i.promoted
+  load ptr, ptr %x
   %i.plus1 = add nsw i32 %i, 1
   %cmp = icmp slt i32 %i.plus1, 2
   br i1 %cmp, label %bb2, label %bb3
 
 bb3:
-  %y = getelementptr inbounds [1 x [2 x i32*]], [1 x [2 x i32*]]* %h, i64 0, i64 0, i64 1
-  load i32*, i32** %y
+  %y = getelementptr inbounds [1 x [2 x ptr]], ptr %h, i64 0, i64 0, i64 1
+  load ptr, ptr %y
   ret void
 }
 
 ; CHECK-LABEL: test_modulo_analysis_easy_case
-; CHECK:  NoAlias: i32** %x, i32** %y
+; CHECK:  NoAlias: ptr* %x, ptr* %y
 
 define void @test_modulo_analysis_easy_case(i64 %i) {
-  %h = alloca [1 x [2 x i32*]], align 16
-  %x = getelementptr inbounds [1 x [2 x i32*]], [1 x [2 x i32*]]* %h, i64 0, i64 %i, i64 0
-  %y = getelementptr inbounds [1 x [2 x i32*]], [1 x [2 x i32*]]* %h, i64 0, i64 0, i64 1
-  load i32*, i32** %x
-  load i32*, i32** %y
+  %h = alloca [1 x [2 x ptr]], align 16
+  %x = getelementptr inbounds [1 x [2 x ptr]], ptr %h, i64 0, i64 %i, i64 0
+  %y = getelementptr inbounds [1 x [2 x ptr]], ptr %h, i64 0, i64 0, i64 1
+  load ptr, ptr %x
+  load ptr, ptr %y
   ret void
 }
 
 ; CHECK-LABEL: test_modulo_analysis_in_loop
-; CHECK:  NoAlias: i32** %x, i32** %y
+; CHECK:  NoAlias: ptr* %x, ptr* %y
 
 define void @test_modulo_analysis_in_loop() {
-  %h = alloca [1 x [2 x i32*]], align 16
+  %h = alloca [1 x [2 x ptr]], align 16
   br label %for.loop
 
 for.loop:
   %i = phi i32 [ 0, %0 ], [ %i.plus1, %for.loop ]
   %i.promoted = sext i32 %i to i64
-  %x = getelementptr inbounds [1 x [2 x i32*]], [1 x [2 x i32*]]* %h, i64 0, i64 %i.promoted, i64 0
-  %y = getelementptr inbounds [1 x [2 x i32*]], [1 x [2 x i32*]]* %h, i64 0, i64 0, i64 1
-  load i32*, i32** %x
-  load i32*, i32** %y
+  %x = getelementptr inbounds [1 x [2 x ptr]], ptr %h, i64 0, i64 %i.promoted, i64 0
+  %y = getelementptr inbounds [1 x [2 x ptr]], ptr %h, i64 0, i64 0, i64 1
+  load ptr, ptr %x
+  load ptr, ptr %y
   %i.plus1 = add nsw i32 %i, 1
   %cmp = icmp slt i32 %i.plus1, 2
   br i1 %cmp, label %for.loop, label %for.loop.exit
@@ -197,21 +195,21 @@ for.loop.exit:
 }
 
 ; CHECK-LABEL: test_modulo_analysis_with_global
-; CHECK:  MayAlias: i32** %x, i32** %y
+; CHECK:  MayAlias: ptr* %x, ptr* %y
 
 define void @test_modulo_analysis_with_global() {
-  %h = alloca [1 x [2 x i32*]], align 16
-  %b = load i32, i32* @b, align 4
+  %h = alloca [1 x [2 x ptr]], align 16
+  %b = load i32, ptr @b, align 4
   %b.promoted = sext i32 %b to i64
   br label %for.loop
 
 for.loop:
   %i = phi i32 [ 0, %0 ], [ %i.plus1, %for.loop ]
   %i.promoted = sext i32 %i to i64
-  %x = getelementptr inbounds [1 x [2 x i32*]], [1 x [2 x i32*]]* %h, i64 0, i64 %i.promoted, i64 %b.promoted
-  %y = getelementptr inbounds [1 x [2 x i32*]], [1 x [2 x i32*]]* %h, i64 0, i64 0, i64 1
-  load i32*, i32** %x
-  load i32*, i32** %y
+  %x = getelementptr inbounds [1 x [2 x ptr]], ptr %h, i64 0, i64 %i.promoted, i64 %b.promoted
+  %y = getelementptr inbounds [1 x [2 x ptr]], ptr %h, i64 0, i64 0, i64 1
+  load ptr, ptr %x
+  load ptr, ptr %y
   %i.plus1 = add nsw i32 %i, 1
   %cmp = icmp slt i32 %i.plus1, 2
   br i1 %cmp, label %for.loop, label %for.loop.exit
@@ -222,103 +220,102 @@ for.loop.exit:
 
 ; CHECK-LABEL: test_const_eval
 ; CHECK: NoAlias: i8* %a, i8* %b
-define void @test_const_eval(i8* %ptr, i64 %offset) {
-  %a = getelementptr inbounds i8, i8* %ptr, i64 %offset
-  %a.dup = getelementptr inbounds i8, i8* %ptr, i64 %offset
+define void @test_const_eval(ptr %ptr, i64 %offset) {
+  %a = getelementptr inbounds i8, ptr %ptr, i64 %offset
+  %a.dup = getelementptr inbounds i8, ptr %ptr, i64 %offset
   %three = zext i32 3 to i64
-  %b = getelementptr inbounds i8, i8* %a.dup, i64 %three
-  load i8, i8* %a
-  load i8, i8* %b
+  %b = getelementptr inbounds i8, ptr %a.dup, i64 %three
+  load i8, ptr %a
+  load i8, ptr %b
   ret void
 }
 
 ; CHECK-LABEL: test_const_eval_scaled
 ; CHECK: MustAlias: i8* %a, i8* %b
-define void @test_const_eval_scaled(i8* %ptr) {
+define void @test_const_eval_scaled(ptr %ptr) {
   %three = zext i32 3 to i64
   %six = mul i64 %three, 2
-  %a = getelementptr inbounds i8, i8* %ptr, i64 %six
-  %b = getelementptr inbounds i8, i8* %ptr, i64 6
-  load i8, i8* %a
-  load i8, i8* %b
+  %a = getelementptr inbounds i8, ptr %ptr, i64 %six
+  %b = getelementptr inbounds i8, ptr %ptr, i64 6
+  load i8, ptr %a
+  load i8, ptr %b
   ret void
 }
 
 ; CHECK-LABEL: Function: foo
 ; CHECK: MustAlias:    float* %arrayidx, float* %arrayidx4.84
-define float @foo(i32 *%A, float %rend, float** %wayar)  {
+define float @foo(ptr %A, float %rend, ptr %wayar)  {
 entry:
-  %x0 = load i32, i32* %A, align 4
+  %x0 = load i32, ptr %A, align 4
   %conv = sext i32 %x0 to i64
   %mul = shl nsw i64 %conv, 3
-  %call = tail call i8* @malloc(i64 %mul)
-  %x1 = bitcast i8* %call to float*
+  %call = tail call ptr @malloc(i64 %mul)
 
   %sub = add nsw i32 %x0, -1
   %idxprom = sext i32 %sub to i64
-  %arrayidx = getelementptr inbounds float, float* %x1, i64 %idxprom
-  store float %rend, float* %arrayidx, align 8
+  %arrayidx = getelementptr inbounds float, ptr %call, i64 %idxprom
+  store float %rend, ptr %arrayidx, align 8
 
   %indvars.iv76.83 = add nsw i64 %conv, -1
-  %arrayidx4.84 = getelementptr inbounds float, float* %x1, i64 %indvars.iv76.83
-  %x4 = load float, float* %arrayidx4.84, align 8
+  %arrayidx4.84 = getelementptr inbounds float, ptr %call, i64 %indvars.iv76.83
+  %x4 = load float, ptr %arrayidx4.84, align 8
 
   ret float %x4
 }
 
 ; CHECK-LABEL: Function: test_shl_nuw_zext
 ; CHECK: MustAlias: i8* %p.1, i8* %p.2
-define void @test_shl_nuw_zext(i8* %p, i32 %x) {
+define void @test_shl_nuw_zext(ptr %p, i32 %x) {
   %shl = shl nuw i32 %x, 1
   %shl.ext = zext i32 %shl to i64
   %ext = zext i32 %x to i64
   %ext.shl = shl nuw i64 %ext, 1
-  %p.1 = getelementptr i8, i8* %p, i64 %shl.ext
-  %p.2 = getelementptr i8, i8* %p, i64 %ext.shl
-  load i8, i8* %p.1
-  load i8, i8* %p.2
+  %p.1 = getelementptr i8, ptr %p, i64 %shl.ext
+  %p.2 = getelementptr i8, ptr %p, i64 %ext.shl
+  load i8, ptr %p.1
+  load i8, ptr %p.2
   ret void
 }
 
 ; CHECK-LABEL: Function: test_shl_nsw_sext
 ; CHECK: MustAlias: i8* %p.1, i8* %p.2
-define void @test_shl_nsw_sext(i8* %p, i32 %x) {
+define void @test_shl_nsw_sext(ptr %p, i32 %x) {
   %shl = shl nsw i32 %x, 1
   %shl.ext = sext i32 %shl to i64
   %ext = sext i32 %x to i64
   %ext.shl = shl nsw i64 %ext, 1
-  %p.1 = getelementptr i8, i8* %p, i64 %shl.ext
-  %p.2 = getelementptr i8, i8* %p, i64 %ext.shl
-  load i8, i8* %p.1
-  load i8, i8* %p.2
+  %p.1 = getelementptr i8, ptr %p, i64 %shl.ext
+  %p.2 = getelementptr i8, ptr %p, i64 %ext.shl
+  load i8, ptr %p.1
+  load i8, ptr %p.2
   ret void
 }
 
 ; CHECK-LABEL: Function: test_implicit_sext
 ; CHECK: MayAlias: i8* %p.1, i8* %p.2
-define void @test_implicit_sext(i8* %p, i32 %x) {
+define void @test_implicit_sext(ptr %p, i32 %x) {
   %add = add i32 %x, 1
   %ext = sext i32 %x to i64
   %ext.add = add i64 %ext, 1
-  %p.1 = getelementptr i8, i8* %p, i32 %add
-  %p.2 = getelementptr i8, i8* %p, i64 %ext.add
-  load i8, i8* %p.1
-  load i8, i8* %p.2
+  %p.1 = getelementptr i8, ptr %p, i32 %add
+  %p.2 = getelementptr i8, ptr %p, i64 %ext.add
+  load i8, ptr %p.1
+  load i8, ptr %p.2
   ret void
 }
 
 ; CHECK-LABEL: Function: test_partial_decomposition
 ; CHECK: MustAlias: i8* %p.1, i8* %p.2
-define void @test_partial_decomposition(i8* %p, i32 %x) {
+define void @test_partial_decomposition(ptr %p, i32 %x) {
   %add = add i32 %x, 1
   %add.1 = add nsw i32 %add, 1
   %add.2 = add nsw i32 %add, 1
-  %p.1 = getelementptr i8, i8* %p, i32 %add.1
-  %p.2 = getelementptr i8, i8* %p, i32 %add.2
-  load i8, i8* %p.1
-  load i8, i8* %p.2
+  %p.1 = getelementptr i8, ptr %p, i32 %add.1
+  %p.2 = getelementptr i8, ptr %p, i32 %add.2
+  load i8, ptr %p.1
+  load i8, ptr %p.2
   ret void
 }
 
 ; Function Attrs: nounwind
-declare noalias i8* @malloc(i64)
+declare noalias ptr @malloc(i64)


        


More information about the llvm-commits mailing list