[llvm] 1b3861b - Attributor: Convert some tests to opaque pointers

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 11 15:03:25 PDT 2023


Author: Matt Arsenault
Date: 2023-07-11T18:03:19-04:00
New Revision: 1b3861b7ae881bb3a243c23bb7299385e066e30e

URL: https://github.com/llvm/llvm-project/commit/1b3861b7ae881bb3a243c23bb7299385e066e30e
DIFF: https://github.com/llvm/llvm-project/commit/1b3861b7ae881bb3a243c23bb7299385e066e30e.diff

LOG: Attributor: Convert some tests to opaque pointers

Added: 
    

Modified: 
    llvm/test/Transforms/Attributor/ArgumentPromotion/musttail.ll
    llvm/test/Transforms/Attributor/align.ll
    llvm/test/Transforms/Attributor/call-simplify-pointer-info.ll
    llvm/test/Transforms/Attributor/convergent.ll
    llvm/test/Transforms/Attributor/dereferenceable-2-inseltpoison.ll
    llvm/test/Transforms/Attributor/dereferenceable-2.ll
    llvm/test/Transforms/Attributor/value-simplify-reachability.ll
    llvm/test/Transforms/Attributor/value-simplify.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Transforms/Attributor/ArgumentPromotion/musttail.ll b/llvm/test/Transforms/Attributor/ArgumentPromotion/musttail.ll
index 393653cbbb9882..0bb8298aa5719e 100644
--- a/llvm/test/Transforms/Attributor/ArgumentPromotion/musttail.ll
+++ b/llvm/test/Transforms/Attributor/ArgumentPromotion/musttail.ll
@@ -18,7 +18,7 @@ define internal i32 @test(ptr %p) {
 ; CHECK-NEXT:    [[V:%.*]] = add i32 [[A]], [[B]]
 ; CHECK-NEXT:    ret i32 [[V]]
 ;
-  %a.gep = getelementptr %T, %T* %p, i64 0, i32 3
+  %a.gep = getelementptr %T, ptr %p, i64 0, i32 3
   %b.gep = getelementptr %T, ptr %p, i64 0, i32 2
   %a = load i32, ptr %a.gep
   %b = load i32, ptr %b.gep
@@ -39,7 +39,7 @@ define i32 @caller(ptr %p) {
 ; CGSCC-NEXT:    [[V:%.*]] = musttail call i32 @test(ptr nocapture nofree readonly [[P]]) #[[ATTR5:[0-9]+]]
 ; CGSCC-NEXT:    ret i32 [[V]]
 ;
-  %v = musttail call i32 @test(%T* %p)
+  %v = musttail call i32 @test(ptr %p)
   ret i32 %v
 }
 
@@ -71,7 +71,7 @@ define internal i32 @test2(ptr %p, i32 %p2) {
 ; CGSCC-NEXT:    [[CA:%.*]] = musttail call noundef i32 @foo(ptr undef, i32 [[V]]) #[[ATTR6:[0-9]+]]
 ; CGSCC-NEXT:    ret i32 [[CA]]
 ;
-  %a.gep = getelementptr %T, %T* %p, i64 0, i32 3
+  %a.gep = getelementptr %T, ptr %p, i64 0, i32 3
   %b.gep = getelementptr %T, ptr %p, i64 0, i32 2
   %a = load i32, ptr %a.gep
   %b = load i32, ptr %b.gep
@@ -92,7 +92,7 @@ define i32 @caller2(ptr %g) {
 ; CGSCC-NEXT:    [[V:%.*]] = call noundef i32 @test2(ptr nocapture nofree readonly [[G]], i32 noundef 0) #[[ATTR5]]
 ; CGSCC-NEXT:    ret i32 [[V]]
 ;
-  %v = call i32 @test2(%T* %g, i32 0)
+  %v = call i32 @test2(ptr %g, i32 0)
   ret i32 %v
 }
 
@@ -113,7 +113,7 @@ define i32 @bar(ptr %p, i32 %v) {
 ; CGSCC-NEXT:    store i32 [[V]], ptr [[P]], align 4
 ; CGSCC-NEXT:    ret i32 0
 ;
-  %i32ptr = getelementptr %T, %T* %p, i64 0, i32 0
+  %i32ptr = getelementptr %T, ptr %p, i64 0, i32 0
   store i32 %v, ptr %i32ptr
   ret i32 0
 }
@@ -141,7 +141,7 @@ define internal i32 @test2b(ptr %p, i32 %p2) {
 ; CGSCC-NEXT:    [[CA:%.*]] = musttail call noundef i32 @bar(ptr nonnull undef, i32 [[V]]) #[[ATTR7:[0-9]+]]
 ; CGSCC-NEXT:    ret i32 [[CA]]
 ;
-  %a.gep = getelementptr %T, %T* %p, i64 0, i32 3
+  %a.gep = getelementptr %T, ptr %p, i64 0, i32 3
   %b.gep = getelementptr %T, ptr %p, i64 0, i32 2
   %a = load i32, ptr %a.gep
   %b = load i32, ptr %b.gep
@@ -163,7 +163,7 @@ define i32 @caller2b(ptr %g) {
 ; CGSCC-NEXT:    [[V:%.*]] = call noundef i32 @test2b(ptr nocapture nofree readonly [[G]], i32 noundef 0) #[[ATTR8:[0-9]+]]
 ; CGSCC-NEXT:    ret i32 [[V]]
 ;
-  %v = call i32 @test2b(%T* %g, i32 0)
+  %v = call i32 @test2b(ptr %g, i32 0)
   ret i32 %v
 }
 ;.

diff  --git a/llvm/test/Transforms/Attributor/align.ll b/llvm/test/Transforms/Attributor/align.ll
index 2b8f24985cc6a0..2156273b165bf3 100644
--- a/llvm/test/Transforms/Attributor/align.ll
+++ b/llvm/test/Transforms/Attributor/align.ll
@@ -22,7 +22,7 @@ define ptr @test1(ptr align 8 %0) #0 {
 ; CHECK-SAME: (ptr nofree readnone returned align 8 "no-capture-maybe-returned" [[TMP0:%.*]]) #[[ATTR0:[0-9]+]] {
 ; CHECK-NEXT:    ret ptr [[TMP0]]
 ;
-  ret i32* %0
+  ret ptr %0
 }
 
 ; TEST 2
@@ -32,7 +32,7 @@ define ptr @test2(ptr %0) #0 {
 ; CHECK-SAME: (ptr nofree readnone returned "no-capture-maybe-returned" [[TMP0:%.*]]) #[[ATTR0]] {
 ; CHECK-NEXT:    ret ptr [[TMP0]]
 ;
-  ret i32* %0
+  ret ptr %0
 }
 
 ; TEST 3
@@ -43,7 +43,7 @@ define ptr @test3(ptr align 8 %0, ptr align 4 %1, i1 %2) #0 {
 ; CHECK-NEXT:    [[RET:%.*]] = select i1 [[TMP2]], ptr [[TMP0]], ptr [[TMP1]]
 ; CHECK-NEXT:    ret ptr [[RET]]
 ;
-  %ret = select i1 %2, i32* %0, i32* %1
+  %ret = select i1 %2, ptr %0, ptr %1
   ret ptr %ret
 }
 
@@ -55,7 +55,7 @@ define ptr @test4(ptr align 32 %0, ptr align 32 %1, i1 %2) #0 {
 ; CHECK-NEXT:    [[RET:%.*]] = select i1 [[TMP2]], ptr [[TMP0]], ptr [[TMP1]]
 ; CHECK-NEXT:    ret ptr [[RET]]
 ;
-  %ret = select i1 %2, i32* %0, i32* %1
+  %ret = select i1 %2, ptr %0, ptr %1
   ret ptr %ret
 }
 
@@ -69,7 +69,7 @@ define ptr @test5_1() {
 ; CHECK-NEXT:    [[RET:%.*]] = tail call align 8 ptr @unknown()
 ; CHECK-NEXT:    ret ptr [[RET]]
 ;
-  %ret = tail call align 8 i32* @unknown()
+  %ret = tail call align 8 ptr @unknown()
   ret ptr %ret
 }
 
@@ -78,7 +78,7 @@ define ptr @test5_2() {
 ; CHECK-NEXT:    [[RET:%.*]] = tail call align 8 ptr @align8()
 ; CHECK-NEXT:    ret ptr [[RET]]
 ;
-  %ret = tail call i32* @align8()
+  %ret = tail call ptr @align8()
   ret ptr %ret
 }
 
@@ -95,7 +95,7 @@ define ptr @test6_1() #0 {
 ; CGSCC-SAME: () #[[ATTR0]] {
 ; CGSCC-NEXT:    ret ptr undef
 ;
-  %ret = tail call i32* @test6_2()
+  %ret = tail call ptr @test6_2()
   ret ptr %ret
 }
 
@@ -110,7 +110,7 @@ define ptr @test6_2() #0 {
 ; CGSCC-SAME: () #[[ATTR0]] {
 ; CGSCC-NEXT:    ret ptr undef
 ;
-  %ret = tail call i32* @test6_1()
+  %ret = tail call ptr @test6_1()
   ret ptr %ret
 }
 
@@ -143,7 +143,7 @@ define internal ptr @f1(ptr readnone %0) local_unnamed_addr #0 {
 ; CGSCC:       2:
 ; CGSCC-NEXT:    ret ptr @a1
 ;
-  %2 = icmp eq i8* %0, null
+  %2 = icmp eq ptr %0, null
   br i1 %2, label %3, label %5
 
 ; <label>:3:                                      ; preds = %1
@@ -171,7 +171,7 @@ define ptr @f2(ptr readnone %0) local_unnamed_addr #0 {
 ; CHECK-NEXT:    [[TMP6:%.*]] = phi ptr [ [[TMP0]], [[TMP3]] ], [ @a1, [[TMP4]] ]
 ; CHECK-NEXT:    ret ptr [[TMP6]]
 ;
-  %2 = icmp eq i8* %0, null
+  %2 = icmp eq ptr %0, null
   br i1 %2, label %5, label %3
 
 ; <label>:3:                                      ; preds = %1
@@ -199,7 +199,7 @@ define internal ptr @f3(ptr readnone %0) local_unnamed_addr #0 {
 ; CGSCC:       2:
 ; CGSCC-NEXT:    ret ptr undef
 ;
-  %2 = icmp eq i8* %0, null
+  %2 = icmp eq ptr %0, null
   br i1 %2, label %3, label %5
 
 ; <label>:3:                                      ; preds = %1
@@ -225,7 +225,7 @@ define align 4 ptr @test7() #0 {
 ; CGSCC-NEXT:    [[C:%.*]] = tail call noundef nonnull align 8 dereferenceable(1) ptr @f1() #[[ATTR14:[0-9]+]]
 ; CGSCC-NEXT:    ret ptr [[C]]
 ;
-  %c = tail call i8* @f1(i8* align 8 dereferenceable(1) @a1)
+  %c = tail call ptr @f1(ptr align 8 dereferenceable(1) @a1)
   ret ptr %c
 }
 
@@ -241,7 +241,7 @@ define internal ptr @f1b(ptr readnone %0) local_unnamed_addr #0 {
 ; CGSCC:       2:
 ; CGSCC-NEXT:    ret ptr undef
 ;
-  %2 = icmp eq i8* %0, null
+  %2 = icmp eq ptr %0, null
   br i1 %2, label %3, label %5
 
 ; <label>:3:                                      ; preds = %1
@@ -273,7 +273,7 @@ define internal ptr @f2b(ptr readnone %0) local_unnamed_addr #0 {
 ; CGSCC-NEXT:    [[TMP8:%.*]] = phi ptr [ [[TMP4]], [[TMP3]] ], [ [[TMP6]], [[TMP5]] ]
 ; CGSCC-NEXT:    ret ptr [[TMP8]]
 ;
-  %2 = icmp eq i8* %0, null
+  %2 = icmp eq ptr %0, null
   br i1 %2, label %5, label %3
 
 ; <label>:3:                                      ; preds = %1
@@ -302,7 +302,7 @@ define internal ptr @f3b(ptr readnone %0) local_unnamed_addr #0 {
 ; CGSCC:       2:
 ; CGSCC-NEXT:    ret ptr @a1
 ;
-  %2 = icmp eq i8* %0, null
+  %2 = icmp eq ptr %0, null
   br i1 %2, label %3, label %5
 
 ; <label>:3:                                      ; preds = %1
@@ -325,7 +325,7 @@ define align 4 ptr @test7b(ptr align 32 %p) #0 {
 ; CGSCC-SAME: (ptr nofree readnone returned align 32 "no-capture-maybe-returned" [[P:%.*]]) #[[ATTR1]] {
 ; CGSCC-NEXT:    ret ptr [[P]]
 ;
-  tail call i8* @f1b(i8* align 8 dereferenceable(1) @a1)
+  tail call ptr @f1b(ptr align 8 dereferenceable(1) @a1)
   ret ptr %p
 }
 
@@ -349,7 +349,7 @@ define void @test8_helper() {
 ; CGSCC-NEXT:    tail call void @test8(ptr noalias nocapture readnone align 8 [[PTR2]], ptr noalias nocapture readnone align 4 [[PTR1]], ptr noalias nocapture readnone align 4 [[PTR1]]) #[[ATTR3]]
 ; CGSCC-NEXT:    ret void
 ;
-  %ptr0 = tail call i32* @unknown()
+  %ptr0 = tail call ptr @unknown()
   %ptr1 = tail call align 4 ptr @unknown()
   %ptr2 = tail call align 8 ptr @unknown()
 
@@ -377,7 +377,7 @@ define internal void @test8(ptr %a, ptr %b, ptr %c) {
 ; CGSCC-NEXT:    call void @user_i32_ptr(ptr noalias nocapture readnone [[C]]) #[[ATTR3]]
 ; CGSCC-NEXT:    ret void
 ;
-  call void @user_i32_ptr(i32* %a)
+  call void @user_i32_ptr(ptr %a)
   call void @user_i32_ptr(ptr %b)
   call void @user_i32_ptr(ptr %c)
   ret void
@@ -391,17 +391,17 @@ define void @test9_traversal(i1 %cnd, ptr align 4 %B, ptr align 8 %C) {
 ; CHECK-NEXT:    call void @test9_helper(ptr align 4 [[SEL]])
 ; CHECK-NEXT:    ret void
 ;
-  %sel = select i1 %cnd, i32* %B, i32* %C
+  %sel = select i1 %cnd, ptr %B, ptr %C
   call void @test9_helper(ptr %sel)
   ret void
 }
 
 ; FIXME: This will work with an upcoming patch (D66618 or similar)
-;             define align 32 i32* @test10a(i32* align 32 "no-capture-maybe-returned" %p)
+;             define align 32 ptr @test10a(ptr align 32 "no-capture-maybe-returned" %p)
 ; FIXME: This will work with an upcoming patch (D66618 or similar)
-;             store i32 1, i32* %r, align 32
+;             store i32 1, ptr %r, align 32
 ; FIXME: This will work with an upcoming patch (D66618 or similar)
-;             store i32 -1, i32* %g1, align 32
+;             store i32 -1, ptr %g1, align 32
 define ptr @test10a(ptr align 32 %p) {
 ; TUNIT: Function Attrs: nofree nosync nounwind
 ; TUNIT-LABEL: define {{[^@]+}}@test10a
@@ -441,7 +441,7 @@ define ptr @test10a(ptr align 32 %p) {
 ; CGSCC-NEXT:    [[PHI:%.*]] = phi ptr [ [[G0]], [[T]] ], [ [[G1]], [[F]] ]
 ; CGSCC-NEXT:    ret ptr [[PHI]]
 ;
-  %l = load i32, i32* %p
+  %l = load i32, ptr %p
   %c = icmp eq i32 %l, 0
   br i1 %c, label %t, label %f
 t:
@@ -459,11 +459,11 @@ e:
 }
 
 ; FIXME: This will work with an upcoming patch (D66618 or similar)
-;             define align 32 i32* @test10b(i32* align 32 "no-capture-maybe-returned" %p)
+;             define align 32 ptr @test10b(ptr align 32 "no-capture-maybe-returned" %p)
 ; FIXME: This will work with an upcoming patch (D66618 or similar)
-;             store i32 1, i32* %r, align 32
+;             store i32 1, ptr %r, align 32
 ; FIXME: This will work with an upcoming patch (D66618 or similar)
-;             store i32 -1, i32* %g1, align 32
+;             store i32 -1, ptr %g1, align 32
 define ptr @test10b(ptr align 32 %p) {
 ; TUNIT: Function Attrs: nofree nosync nounwind
 ; TUNIT-LABEL: define {{[^@]+}}@test10b
@@ -503,7 +503,7 @@ define ptr @test10b(ptr align 32 %p) {
 ; CGSCC-NEXT:    [[PHI:%.*]] = phi ptr [ [[G0]], [[T]] ], [ [[G1]], [[F]] ]
 ; CGSCC-NEXT:    ret ptr [[PHI]]
 ;
-  %l = load i32, i32* %p
+  %l = load i32, ptr %p
   %c = icmp eq i32 %l, 0
   br i1 %c, label %t, label %f
 t:
@@ -534,7 +534,7 @@ define i64 @test11(ptr %p) {
 ; CGSCC-NEXT:    [[RET:%.*]] = load i64, ptr [[P]], align 8
 ; CGSCC-NEXT:    ret i64 [[RET]]
 ;
-  %p-cast = bitcast i32* %p to i64*
+  %p-cast = bitcast ptr %p to ptr
   %ret = load i64, ptr %p-cast, align 8
   ret i64 %ret
 }
@@ -560,7 +560,7 @@ define i64 @test12-1(ptr align 4 %p) {
 ; CGSCC-NEXT:    [[RET:%.*]] = load i64, ptr [[ARRAYIDX1]], align 16
 ; CGSCC-NEXT:    ret i64 [[RET]]
 ;
-  %p-cast = bitcast i32* %p to i64*
+  %p-cast = bitcast ptr %p to ptr
   %arrayidx0 = getelementptr i64, ptr %p-cast, i64 1
   %arrayidx1 = getelementptr i64, ptr %arrayidx0, i64 3
   %ret = load i64, ptr %arrayidx1, align 16
@@ -580,7 +580,7 @@ define i64 @test12-2(ptr align 4 %p) {
 ; CGSCC-NEXT:    [[RET:%.*]] = load i64, ptr [[P]], align 16
 ; CGSCC-NEXT:    ret i64 [[RET]]
 ;
-  %p-cast = bitcast i32* %p to i64*
+  %p-cast = bitcast ptr %p to ptr
   %ret = load i64, ptr %p-cast, align 16
   ret i64 %ret
 }
@@ -603,7 +603,7 @@ define void @test12-3(ptr align 4 %p) {
 ; CGSCC-NEXT:    store i64 0, ptr [[ARRAYIDX1]], align 16
 ; CGSCC-NEXT:    ret void
 ;
-  %p-cast = bitcast i32* %p to i64*
+  %p-cast = bitcast ptr %p to ptr
   %arrayidx0 = getelementptr i64, ptr %p-cast, i64 1
   %arrayidx1 = getelementptr i64, ptr %arrayidx0, i64 3
   store i64 0, ptr %arrayidx1, align 16
@@ -623,7 +623,7 @@ define void @test12-4(ptr align 4 %p) {
 ; CGSCC-NEXT:    store i64 0, ptr [[P]], align 16
 ; CGSCC-NEXT:    ret void
 ;
-  %p-cast = bitcast i32* %p to i64*
+  %p-cast = bitcast ptr %p to ptr
   store i64 0, ptr %p-cast, align 16
   ret void
 }
@@ -647,7 +647,7 @@ define void @test12-5(ptr align 4 %p) {
 ; CGSCC-NEXT:    tail call void @use(ptr align 16 [[ARRAYIDX1]]) #[[ATTR7:[0-9]+]]
 ; CGSCC-NEXT:    ret void
 ;
-  %p-cast = bitcast i32* %p to i64*
+  %p-cast = bitcast ptr %p to ptr
   %arrayidx0 = getelementptr i64, ptr %p-cast, i64 1
   %arrayidx1 = getelementptr i64, ptr %arrayidx0, i64 3
   tail call void @use(ptr align 16 %arrayidx1)
@@ -667,7 +667,7 @@ define void @test12-6(ptr align 4 %p) {
 ; CGSCC-NEXT:    tail call void @use(ptr align 16 [[P]]) #[[ATTR7]]
 ; CGSCC-NEXT:    ret void
 ;
-  %p-cast = bitcast i32* %p to i64*
+  %p-cast = bitcast ptr %p to ptr
   tail call void @use(ptr align 16 %p-cast)
   ret void
 }
@@ -838,7 +838,7 @@ define i64 @ptr2int(ptr %p) {
 ; CGSCC-NEXT:    [[P2I:%.*]] = ptrtoint ptr [[P]] to i64
 ; CGSCC-NEXT:    ret i64 [[P2I]]
 ;
-  %p2i = ptrtoint i32* %p to i64
+  %p2i = ptrtoint ptr %p to i64
   ret i64 %p2i
 }
 define ptr @int2ptr(i64 %i) {
@@ -854,7 +854,7 @@ define ptr @int2ptr(i64 %i) {
 ; CGSCC-NEXT:    [[I2P:%.*]] = inttoptr i64 [[I]] to ptr
 ; CGSCC-NEXT:    ret ptr [[I2P]]
 ;
-  %i2p = inttoptr i64 %i to i64*
+  %i2p = inttoptr i64 %i to ptr
   ret ptr %i2p
 }
 
@@ -872,7 +872,7 @@ define void @aligned_store(ptr %Value, ptr %Ptr) {
 ; CGSCC-NEXT:    store ptr [[VALUE]], ptr [[PTR]], align 32
 ; CGSCC-NEXT:    ret void
 ;
-  store i8* %Value, i8** %Ptr, align 32
+  store ptr %Value, ptr %Ptr, align 32
   ret void
 }
 
@@ -884,7 +884,7 @@ define void @align_call_op_not_store(ptr align 2048 %arg) {
 ; CHECK-NEXT:    store i8 0, ptr [[UNKNOWN]], align 1
 ; CHECK-NEXT:    ret void
 ;
-  %unknown = call i8* @some_func(i8* %arg)
+  %unknown = call ptr @some_func(ptr %arg)
   store i8 0, ptr %unknown
   ret void
 }
@@ -902,7 +902,7 @@ define void @align_store_after_bc(ptr align 2048 %arg) {
 ; CGSCC-NEXT:    store i8 0, ptr [[ARG]], align 2048
 ; CGSCC-NEXT:    ret void
 ;
-  %bc = bitcast i32* %arg to i8*
+  %bc = bitcast ptr %arg to ptr
   store i8 0, ptr %bc
   ret void
 }
@@ -923,7 +923,7 @@ define i32 @musttail_callee_1(ptr %p) {
 ; CGSCC-NEXT:    [[V:%.*]] = load i32, ptr [[P]], align 32
 ; CGSCC-NEXT:    ret i32 [[V]]
 ;
-  %v = load i32, i32* %p, align 32
+  %v = load i32, ptr %p, align 32
   ret i32 %v
 }
 define i32 @musttail_caller_1(ptr %p) {
@@ -949,7 +949,7 @@ define i32 @musttail_caller_1(ptr %p) {
 ; CGSCC:       exit:
 ; CGSCC-NEXT:    ret i32 0
 ;
-  %c = load i1, i1* @cnd
+  %c = load i1, ptr @cnd
   br i1 %c, label %mt, label %exit
 mt:
   %v = musttail call i32 @musttail_callee_1(ptr %p)
@@ -1014,7 +1014,7 @@ define void @align4_caller(ptr %p) {
 ; CHECK-NEXT:    call void @align4_callee(ptr align 4 [[P]])
 ; CHECK-NEXT:    ret void
 ;
-  call void @align4_callee(i8* %p)
+  call void @align4_callee(ptr %p)
   ret void
 }
 
@@ -1057,7 +1057,7 @@ define internal ptr @aligned_8_return(ptr %a, i1 %c1, i1 %c2) norecurse {
 ; CGSCC-NEXT:    [[L:%.*]] = load ptr, ptr [[STACK]], align 8
 ; CGSCC-NEXT:    ret ptr [[L]]
 ;
-  %stack = alloca i8*
+  %stack = alloca ptr
   br i1 %c1, label %t, label %f
 t:
   %gep = getelementptr i8, ptr @G, i32 8
@@ -1085,7 +1085,7 @@ define ptr @aligned_8_return_caller(ptr align(16) %a, i1 %c1, i1 %c2) {
 ; CGSCC-NEXT:    [[R:%.*]] = call align 8 ptr @aligned_8_return(ptr noalias nofree readnone align 16 [[A]], i1 noundef [[C1]], i1 [[C2]]) #[[ATTR14]]
 ; CGSCC-NEXT:    ret ptr [[R]]
 ;
-  %r = call i8* @aligned_8_return(i8* %a, i1 %c1, i1 %c2)
+  %r = call ptr @aligned_8_return(ptr %a, i1 %c1, i1 %c2)
   ret ptr %r
 }
 

diff  --git a/llvm/test/Transforms/Attributor/call-simplify-pointer-info.ll b/llvm/test/Transforms/Attributor/call-simplify-pointer-info.ll
index d3f4ad2f7a979a..5bb795911ce408 100644
--- a/llvm/test/Transforms/Attributor/call-simplify-pointer-info.ll
+++ b/llvm/test/Transforms/Attributor/call-simplify-pointer-info.ll
@@ -1,33 +1,33 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
-; RUN: opt -opaque-pointers=0 -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-annotate-decl-cs  -S < %s | FileCheck %s --check-prefixes=TUNIT
-; RUN: opt -opaque-pointers=0 -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CGSCC
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-annotate-decl-cs  -S < %s | FileCheck %s --check-prefixes=TUNIT
+; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CGSCC
 ;
 
-define internal i8 @read_arg(i8* %p) {
+define internal i8 @read_arg(ptr %p) {
 ; CGSCC: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read)
 ; CGSCC-LABEL: define {{[^@]+}}@read_arg
-; CGSCC-SAME: (i8* nocapture nofree noundef nonnull readonly dereferenceable(1022) [[P:%.*]]) #[[ATTR0:[0-9]+]] {
+; CGSCC-SAME: (ptr nocapture nofree noundef nonnull readonly dereferenceable(1022) [[P:%.*]]) #[[ATTR0:[0-9]+]] {
 ; CGSCC-NEXT:  entry:
-; CGSCC-NEXT:    [[L:%.*]] = load i8, i8* [[P]], align 1
+; CGSCC-NEXT:    [[L:%.*]] = load i8, ptr [[P]], align 1
 ; CGSCC-NEXT:    ret i8 [[L]]
 ;
 entry:
-  %l = load i8, i8* %p, align 1
+  %l = load i8, ptr %p, align 1
   ret i8 %l
 }
 
-define internal i8 @read_arg_index(i8* %p, i64 %index) {
+define internal i8 @read_arg_index(ptr %p, i64 %index) {
 ; CGSCC: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read)
 ; CGSCC-LABEL: define {{[^@]+}}@read_arg_index
-; CGSCC-SAME: (i8* nocapture nofree noundef nonnull readonly align 16 dereferenceable(1024) [[P:%.*]]) #[[ATTR0]] {
+; CGSCC-SAME: (ptr nocapture nofree noundef nonnull readonly align 16 dereferenceable(1024) [[P:%.*]]) #[[ATTR0]] {
 ; CGSCC-NEXT:  entry:
-; CGSCC-NEXT:    [[G:%.*]] = getelementptr inbounds i8, i8* [[P]], i64 2
-; CGSCC-NEXT:    [[L:%.*]] = load i8, i8* [[G]], align 1
+; CGSCC-NEXT:    [[G:%.*]] = getelementptr inbounds i8, ptr [[P]], i64 2
+; CGSCC-NEXT:    [[L:%.*]] = load i8, ptr [[G]], align 1
 ; CGSCC-NEXT:    ret i8 [[L]]
 ;
 entry:
-  %g = getelementptr inbounds i8, i8* %p, i64 %index
-  %l = load i8, i8* %g, align 1
+  %g = getelementptr inbounds i8, ptr %p, i64 %index
+  %l = load i8, ptr %g, align 1
   ret i8 %l
 }
 
@@ -37,7 +37,7 @@ define i8 @call_simplifiable_1() {
 ; TUNIT-SAME: () #[[ATTR0:[0-9]+]] {
 ; TUNIT-NEXT:  entry:
 ; TUNIT-NEXT:    [[BYTES:%.*]] = alloca [1024 x i8], align 16
-; TUNIT-NEXT:    [[I0:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 2
+; TUNIT-NEXT:    [[I0:%.*]] = getelementptr inbounds [1024 x i8], ptr [[BYTES]], i64 0, i64 2
 ; TUNIT-NEXT:    ret i8 2
 ;
 ; CGSCC: Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
@@ -45,45 +45,45 @@ define i8 @call_simplifiable_1() {
 ; CGSCC-SAME: () #[[ATTR1:[0-9]+]] {
 ; CGSCC-NEXT:  entry:
 ; CGSCC-NEXT:    [[BYTES:%.*]] = alloca [1024 x i8], align 16
-; CGSCC-NEXT:    [[I0:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 2
-; CGSCC-NEXT:    store i8 2, i8* [[I0]], align 2
-; CGSCC-NEXT:    [[R:%.*]] = call i8 @read_arg(i8* nocapture nofree noundef nonnull readonly align 2 dereferenceable(1022) [[I0]]) #[[ATTR4:[0-9]+]]
+; CGSCC-NEXT:    [[I0:%.*]] = getelementptr inbounds [1024 x i8], ptr [[BYTES]], i64 0, i64 2
+; CGSCC-NEXT:    store i8 2, ptr [[I0]], align 2
+; CGSCC-NEXT:    [[R:%.*]] = call i8 @read_arg(ptr nocapture nofree noundef nonnull readonly align 2 dereferenceable(1022) [[I0]]) #[[ATTR4:[0-9]+]]
 ; CGSCC-NEXT:    ret i8 [[R]]
 ;
 entry:
   %Bytes = alloca [1024 x i8], align 16
-  %i0 = getelementptr inbounds [1024 x i8], [1024 x i8]* %Bytes, i64 0, i64 2
-  store i8 2, i8* %i0, align 1
-  %r = call i8 @read_arg(i8* %i0)
+  %i0 = getelementptr inbounds [1024 x i8], ptr %Bytes, i64 0, i64 2
+  store i8 2, ptr %i0, align 1
+  %r = call i8 @read_arg(ptr %i0)
   ret i8 %r
 }
 
 ;;; Same as read_arg, but we need a copy to form distinct leaves in the callgraph.
 
-define internal i8 @read_arg_1(i8* %p) {
+define internal i8 @read_arg_1(ptr %p) {
 ; CGSCC: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read)
 ; CGSCC-LABEL: define {{[^@]+}}@read_arg_1
-; CGSCC-SAME: (i8* nocapture nofree noundef nonnull readonly dereferenceable(1) [[P:%.*]]) #[[ATTR0]] {
+; CGSCC-SAME: (ptr nocapture nofree noundef nonnull readonly dereferenceable(1) [[P:%.*]]) #[[ATTR0]] {
 ; CGSCC-NEXT:  entry:
-; CGSCC-NEXT:    [[L:%.*]] = load i8, i8* [[P]], align 1
+; CGSCC-NEXT:    [[L:%.*]] = load i8, ptr [[P]], align 1
 ; CGSCC-NEXT:    ret i8 [[L]]
 ;
 entry:
-  %l = load i8, i8* %p, align 1
+  %l = load i8, ptr %p, align 1
   ret i8 %l
 }
 
-define internal i8 @sum_two_same_loads(i8* %p) {
+define internal i8 @sum_two_same_loads(ptr %p) {
 ; CGSCC: Function Attrs: mustprogress nofree nosync nounwind willreturn memory(argmem: read)
 ; CGSCC-LABEL: define {{[^@]+}}@sum_two_same_loads
-; CGSCC-SAME: (i8* nocapture nofree noundef nonnull readonly dereferenceable(1022) [[P:%.*]]) #[[ATTR2:[0-9]+]] {
-; CGSCC-NEXT:    [[X:%.*]] = call i8 @read_arg_1(i8* nocapture nofree noundef nonnull readonly dereferenceable(1022) [[P]]) #[[ATTR4]]
-; CGSCC-NEXT:    [[Y:%.*]] = call i8 @read_arg_1(i8* nocapture nofree noundef nonnull readonly dereferenceable(1022) [[P]]) #[[ATTR4]]
+; CGSCC-SAME: (ptr nocapture nofree noundef nonnull readonly dereferenceable(1022) [[P:%.*]]) #[[ATTR2:[0-9]+]] {
+; CGSCC-NEXT:    [[X:%.*]] = call i8 @read_arg_1(ptr nocapture nofree noundef nonnull readonly dereferenceable(1022) [[P]]) #[[ATTR4]]
+; CGSCC-NEXT:    [[Y:%.*]] = call i8 @read_arg_1(ptr nocapture nofree noundef nonnull readonly dereferenceable(1022) [[P]]) #[[ATTR4]]
 ; CGSCC-NEXT:    [[Z:%.*]] = add nsw i8 [[X]], [[Y]]
 ; CGSCC-NEXT:    ret i8 [[Z]]
 ;
-  %x = call i8 @read_arg_1(i8* %p)
-  %y = call i8 @read_arg_1(i8* %p)
+  %x = call i8 @read_arg_1(ptr %p)
+  %y = call i8 @read_arg_1(ptr %p)
   %z = add nsw i8 %x, %y
   ret i8 %z
 }
@@ -94,8 +94,8 @@ define i8 @call_simplifiable_2() {
 ; TUNIT-SAME: () #[[ATTR0]] {
 ; TUNIT-NEXT:  entry:
 ; TUNIT-NEXT:    [[BYTES:%.*]] = alloca [1024 x i8], align 16
-; TUNIT-NEXT:    [[I0:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 2
-; TUNIT-NEXT:    [[I1:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 3
+; TUNIT-NEXT:    [[I0:%.*]] = getelementptr inbounds [1024 x i8], ptr [[BYTES]], i64 0, i64 2
+; TUNIT-NEXT:    [[I1:%.*]] = getelementptr inbounds [1024 x i8], ptr [[BYTES]], i64 0, i64 3
 ; TUNIT-NEXT:    ret i8 4
 ;
 ; CGSCC: Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
@@ -103,20 +103,20 @@ define i8 @call_simplifiable_2() {
 ; CGSCC-SAME: () #[[ATTR1]] {
 ; CGSCC-NEXT:  entry:
 ; CGSCC-NEXT:    [[BYTES:%.*]] = alloca [1024 x i8], align 16
-; CGSCC-NEXT:    [[I0:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 2
-; CGSCC-NEXT:    store i8 2, i8* [[I0]], align 2
-; CGSCC-NEXT:    [[I1:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 3
-; CGSCC-NEXT:    store i8 3, i8* [[I1]], align 1
-; CGSCC-NEXT:    [[R:%.*]] = call i8 @sum_two_same_loads(i8* nocapture nofree noundef nonnull readonly align 2 dereferenceable(1022) [[I0]]) #[[ATTR4]]
+; CGSCC-NEXT:    [[I0:%.*]] = getelementptr inbounds [1024 x i8], ptr [[BYTES]], i64 0, i64 2
+; CGSCC-NEXT:    store i8 2, ptr [[I0]], align 2
+; CGSCC-NEXT:    [[I1:%.*]] = getelementptr inbounds [1024 x i8], ptr [[BYTES]], i64 0, i64 3
+; CGSCC-NEXT:    store i8 3, ptr [[I1]], align 1
+; CGSCC-NEXT:    [[R:%.*]] = call i8 @sum_two_same_loads(ptr nocapture nofree noundef nonnull readonly align 2 dereferenceable(1022) [[I0]]) #[[ATTR4]]
 ; CGSCC-NEXT:    ret i8 [[R]]
 ;
 entry:
   %Bytes = alloca [1024 x i8], align 16
-  %i0 = getelementptr inbounds [1024 x i8], [1024 x i8]* %Bytes, i64 0, i64 2
-  store i8 2, i8* %i0
-  %i1 = getelementptr inbounds [1024 x i8], [1024 x i8]* %Bytes, i64 0, i64 3
-  store i8 3, i8* %i1
-  %r = call i8 @sum_two_same_loads(i8* %i0)
+  %i0 = getelementptr inbounds [1024 x i8], ptr %Bytes, i64 0, i64 2
+  store i8 2, ptr %i0
+  %i1 = getelementptr inbounds [1024 x i8], ptr %Bytes, i64 0, i64 3
+  store i8 3, ptr %i1
+  %r = call i8 @sum_two_same_loads(ptr %i0)
   ret i8 %r
 }
 
@@ -126,7 +126,7 @@ define i8 @call_simplifiable_3() {
 ; TUNIT-SAME: () #[[ATTR0]] {
 ; TUNIT-NEXT:  entry:
 ; TUNIT-NEXT:    [[BYTES:%.*]] = alloca [1024 x i8], align 16
-; TUNIT-NEXT:    [[I2:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 2
+; TUNIT-NEXT:    [[I2:%.*]] = getelementptr inbounds [1024 x i8], ptr [[BYTES]], i64 0, i64 2
 ; TUNIT-NEXT:    ret i8 2
 ;
 ; CGSCC: Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
@@ -134,62 +134,61 @@ define i8 @call_simplifiable_3() {
 ; CGSCC-SAME: () #[[ATTR1]] {
 ; CGSCC-NEXT:  entry:
 ; CGSCC-NEXT:    [[BYTES:%.*]] = alloca [1024 x i8], align 16
-; CGSCC-NEXT:    [[I0:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 0
-; CGSCC-NEXT:    [[I2:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 2
-; CGSCC-NEXT:    store i8 2, i8* [[I2]], align 2
-; CGSCC-NEXT:    [[R:%.*]] = call i8 @read_arg_index(i8* nocapture nofree noundef nonnull readonly align 16 dereferenceable(1024) [[I0]]) #[[ATTR4]]
+; CGSCC-NEXT:    [[I2:%.*]] = getelementptr inbounds [1024 x i8], ptr [[BYTES]], i64 0, i64 2
+; CGSCC-NEXT:    store i8 2, ptr [[I2]], align 2
+; CGSCC-NEXT:    [[R:%.*]] = call i8 @read_arg_index(ptr nocapture nofree noundef nonnull readonly align 16 dereferenceable(1024) [[BYTES]]) #[[ATTR4]]
 ; CGSCC-NEXT:    ret i8 [[R]]
 ;
 entry:
   %Bytes = alloca [1024 x i8], align 16
-  %i0 = getelementptr inbounds [1024 x i8], [1024 x i8]* %Bytes, i64 0, i64 0
-  %i2 = getelementptr inbounds [1024 x i8], [1024 x i8]* %Bytes, i64 0, i64 2
-  store i8 2, i8* %i2, align 1
-  %r = call i8 @read_arg_index(i8* %i0, i64 2)
+  %i0 = getelementptr inbounds [1024 x i8], ptr %Bytes, i64 0, i64 0
+  %i2 = getelementptr inbounds [1024 x i8], ptr %Bytes, i64 0, i64 2
+  store i8 2, ptr %i2, align 1
+  %r = call i8 @read_arg_index(ptr %i0, i64 2)
   ret i8 %r
 }
 
 ;;; Same as read_arg, but we need a copy to form distinct leaves in the callgraph.
 
-define internal i8 @read_arg_2(i8* %p) {
+define internal i8 @read_arg_2(ptr %p) {
 ; TUNIT: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read)
 ; TUNIT-LABEL: define {{[^@]+}}@read_arg_2
-; TUNIT-SAME: (i8* nocapture nofree noundef nonnull readonly dereferenceable(971) [[P:%.*]]) #[[ATTR1:[0-9]+]] {
+; TUNIT-SAME: (ptr nocapture nofree noundef nonnull readonly dereferenceable(971) [[P:%.*]]) #[[ATTR1:[0-9]+]] {
 ; TUNIT-NEXT:  entry:
-; TUNIT-NEXT:    [[L:%.*]] = load i8, i8* [[P]], align 1
+; TUNIT-NEXT:    [[L:%.*]] = load i8, ptr [[P]], align 1
 ; TUNIT-NEXT:    ret i8 [[L]]
 ;
 ; CGSCC: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read)
 ; CGSCC-LABEL: define {{[^@]+}}@read_arg_2
-; CGSCC-SAME: (i8* nocapture nofree noundef nonnull readonly dereferenceable(1) [[P:%.*]]) #[[ATTR0]] {
+; CGSCC-SAME: (ptr nocapture nofree noundef nonnull readonly dereferenceable(1) [[P:%.*]]) #[[ATTR0]] {
 ; CGSCC-NEXT:  entry:
-; CGSCC-NEXT:    [[L:%.*]] = load i8, i8* [[P]], align 1
+; CGSCC-NEXT:    [[L:%.*]] = load i8, ptr [[P]], align 1
 ; CGSCC-NEXT:    ret i8 [[L]]
 ;
 entry:
-  %l = load i8, i8* %p, align 1
+  %l = load i8, ptr %p, align 1
   ret i8 %l
 }
 
-define internal i8 @sum_two_
diff erent_loads(i8* %p, i8* %q) {
+define internal i8 @sum_two_
diff erent_loads(ptr %p, ptr %q) {
 ; TUNIT: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read)
 ; TUNIT-LABEL: define {{[^@]+}}@sum_two_
diff erent_loads
-; TUNIT-SAME: (i8* nocapture nofree nonnull readonly dereferenceable(972) [[P:%.*]], i8* nocapture nofree noundef nonnull readonly dereferenceable(971) [[Q:%.*]]) #[[ATTR1]] {
-; TUNIT-NEXT:    [[X:%.*]] = call i8 @read_arg_2(i8* nocapture nofree noundef nonnull readonly dereferenceable(972) [[P]]) #[[ATTR3:[0-9]+]]
-; TUNIT-NEXT:    [[Y:%.*]] = call i8 @read_arg_2(i8* nocapture nofree noundef nonnull readonly dereferenceable(971) [[Q]]) #[[ATTR3]]
+; TUNIT-SAME: (ptr nocapture nofree nonnull readonly dereferenceable(972) [[P:%.*]], ptr nocapture nofree noundef nonnull readonly dereferenceable(971) [[Q:%.*]]) #[[ATTR1]] {
+; TUNIT-NEXT:    [[X:%.*]] = call i8 @read_arg_2(ptr nocapture nofree noundef nonnull readonly dereferenceable(972) [[P]]) #[[ATTR3:[0-9]+]]
+; TUNIT-NEXT:    [[Y:%.*]] = call i8 @read_arg_2(ptr nocapture nofree noundef nonnull readonly dereferenceable(971) [[Q]]) #[[ATTR3]]
 ; TUNIT-NEXT:    [[Z:%.*]] = add nsw i8 [[X]], [[Y]]
 ; TUNIT-NEXT:    ret i8 [[Z]]
 ;
 ; CGSCC: Function Attrs: mustprogress nofree nosync nounwind willreturn memory(argmem: read)
 ; CGSCC-LABEL: define {{[^@]+}}@sum_two_
diff erent_loads
-; CGSCC-SAME: (i8* nocapture nofree noundef nonnull readonly dereferenceable(972) [[P:%.*]], i8* nocapture nofree noundef nonnull readonly dereferenceable(971) [[Q:%.*]]) #[[ATTR2]] {
-; CGSCC-NEXT:    [[X:%.*]] = call i8 @read_arg_2(i8* nocapture nofree noundef nonnull readonly dereferenceable(972) [[P]]) #[[ATTR4]]
-; CGSCC-NEXT:    [[Y:%.*]] = call i8 @read_arg_2(i8* nocapture nofree noundef nonnull readonly dereferenceable(971) [[Q]]) #[[ATTR4]]
+; CGSCC-SAME: (ptr nocapture nofree noundef nonnull readonly dereferenceable(972) [[P:%.*]], ptr nocapture nofree noundef nonnull readonly dereferenceable(971) [[Q:%.*]]) #[[ATTR2]] {
+; CGSCC-NEXT:    [[X:%.*]] = call i8 @read_arg_2(ptr nocapture nofree noundef nonnull readonly dereferenceable(972) [[P]]) #[[ATTR4]]
+; CGSCC-NEXT:    [[Y:%.*]] = call i8 @read_arg_2(ptr nocapture nofree noundef nonnull readonly dereferenceable(971) [[Q]]) #[[ATTR4]]
 ; CGSCC-NEXT:    [[Z:%.*]] = add nsw i8 [[X]], [[Y]]
 ; CGSCC-NEXT:    ret i8 [[Z]]
 ;
-  %x = call i8 @read_arg_2(i8* %p)
-  %y = call i8 @read_arg_2(i8* %q)
+  %x = call i8 @read_arg_2(ptr %p)
+  %y = call i8 @read_arg_2(ptr %q)
   %z = add nsw i8 %x, %y
   ret i8 %z
 }
@@ -200,12 +199,12 @@ define i8 @call_partially_simplifiable_1() {
 ; TUNIT-SAME: () #[[ATTR0]] {
 ; TUNIT-NEXT:  entry:
 ; TUNIT-NEXT:    [[BYTES:%.*]] = alloca [1024 x i8], align 16
-; TUNIT-NEXT:    [[I2:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 2
-; TUNIT-NEXT:    store i8 2, i8* [[I2]], align 2
-; TUNIT-NEXT:    [[I3:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 3
-; TUNIT-NEXT:    store i8 3, i8* [[I3]], align 1
-; TUNIT-NEXT:    [[I4:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 4
-; TUNIT-NEXT:    [[R:%.*]] = call i8 @sum_two_
diff erent_loads(i8* nocapture nofree noundef nonnull readonly align 2 dereferenceable(1022) [[I2]], i8* nocapture nofree noundef nonnull readonly dereferenceable(1021) [[I3]]) #[[ATTR3]]
+; TUNIT-NEXT:    [[I2:%.*]] = getelementptr inbounds [1024 x i8], ptr [[BYTES]], i64 0, i64 2
+; TUNIT-NEXT:    store i8 2, ptr [[I2]], align 2
+; TUNIT-NEXT:    [[I3:%.*]] = getelementptr inbounds [1024 x i8], ptr [[BYTES]], i64 0, i64 3
+; TUNIT-NEXT:    store i8 3, ptr [[I3]], align 1
+; TUNIT-NEXT:    [[I4:%.*]] = getelementptr inbounds [1024 x i8], ptr [[BYTES]], i64 0, i64 4
+; TUNIT-NEXT:    [[R:%.*]] = call i8 @sum_two_
diff erent_loads(ptr nocapture nofree noundef nonnull readonly align 2 dereferenceable(1022) [[I2]], ptr nocapture nofree noundef nonnull readonly dereferenceable(1021) [[I3]]) #[[ATTR3]]
 ; TUNIT-NEXT:    ret i8 [[R]]
 ;
 ; CGSCC: Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
@@ -213,25 +212,25 @@ define i8 @call_partially_simplifiable_1() {
 ; CGSCC-SAME: () #[[ATTR1]] {
 ; CGSCC-NEXT:  entry:
 ; CGSCC-NEXT:    [[BYTES:%.*]] = alloca [1024 x i8], align 16
-; CGSCC-NEXT:    [[I2:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 2
-; CGSCC-NEXT:    store i8 2, i8* [[I2]], align 2
-; CGSCC-NEXT:    [[I3:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 3
-; CGSCC-NEXT:    store i8 3, i8* [[I3]], align 1
-; CGSCC-NEXT:    [[I4:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 4
-; CGSCC-NEXT:    store i8 4, i8* [[I4]], align 4
-; CGSCC-NEXT:    [[R:%.*]] = call i8 @sum_two_
diff erent_loads(i8* nocapture nofree noundef nonnull readonly align 2 dereferenceable(1022) [[I2]], i8* nocapture nofree noundef nonnull readonly dereferenceable(1021) [[I3]]) #[[ATTR4]]
+; CGSCC-NEXT:    [[I2:%.*]] = getelementptr inbounds [1024 x i8], ptr [[BYTES]], i64 0, i64 2
+; CGSCC-NEXT:    store i8 2, ptr [[I2]], align 2
+; CGSCC-NEXT:    [[I3:%.*]] = getelementptr inbounds [1024 x i8], ptr [[BYTES]], i64 0, i64 3
+; CGSCC-NEXT:    store i8 3, ptr [[I3]], align 1
+; CGSCC-NEXT:    [[I4:%.*]] = getelementptr inbounds [1024 x i8], ptr [[BYTES]], i64 0, i64 4
+; CGSCC-NEXT:    store i8 4, ptr [[I4]], align 4
+; CGSCC-NEXT:    [[R:%.*]] = call i8 @sum_two_
diff erent_loads(ptr nocapture nofree noundef nonnull readonly align 2 dereferenceable(1022) [[I2]], ptr nocapture nofree noundef nonnull readonly dereferenceable(1021) [[I3]]) #[[ATTR4]]
 ; CGSCC-NEXT:    ret i8 [[R]]
 ;
 entry:
   %Bytes = alloca [1024 x i8], align 16
-  %i2 = getelementptr inbounds [1024 x i8], [1024 x i8]* %Bytes, i64 0, i64 2
-  store i8 2, i8* %i2
-  %i3 = getelementptr inbounds [1024 x i8], [1024 x i8]* %Bytes, i64 0, i64 3
-  store i8 3, i8* %i3
-  %i4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %Bytes, i64 0, i64 4
+  %i2 = getelementptr inbounds [1024 x i8], ptr %Bytes, i64 0, i64 2
+  store i8 2, ptr %i2
+  %i3 = getelementptr inbounds [1024 x i8], ptr %Bytes, i64 0, i64 3
+  store i8 3, ptr %i3
+  %i4 = getelementptr inbounds [1024 x i8], ptr %Bytes, i64 0, i64 4
   ;;; This store is redundant, hence removed.
-  store i8 4, i8* %i4
-  %r = call i8 @sum_two_
diff erent_loads(i8* %i2, i8* %i3)
+  store i8 4, ptr %i4
+  %r = call i8 @sum_two_
diff erent_loads(ptr %i2, ptr %i3)
   ret i8 %r
 }
 
@@ -241,14 +240,14 @@ define i8 @call_partially_simplifiable_2(i1 %cond) {
 ; TUNIT-SAME: (i1 [[COND:%.*]]) #[[ATTR2:[0-9]+]] {
 ; TUNIT-NEXT:  entry:
 ; TUNIT-NEXT:    [[BYTES:%.*]] = alloca [1024 x i8], align 16
-; TUNIT-NEXT:    [[I51:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 51
-; TUNIT-NEXT:    [[I52:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 52
-; TUNIT-NEXT:    store i8 2, i8* [[I52]], align 4
-; TUNIT-NEXT:    [[I53:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 53
-; TUNIT-NEXT:    store i8 3, i8* [[I53]], align 1
-; TUNIT-NEXT:    [[I54:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 54
-; TUNIT-NEXT:    [[SEL:%.*]] = select i1 [[COND]], i8* [[I51]], i8* [[I52]]
-; TUNIT-NEXT:    [[R:%.*]] = call i8 @sum_two_
diff erent_loads(i8* nocapture nofree nonnull readonly dereferenceable(972) [[SEL]], i8* nocapture nofree noundef nonnull readonly dereferenceable(971) [[I53]]) #[[ATTR3]]
+; TUNIT-NEXT:    [[I51:%.*]] = getelementptr inbounds [1024 x i8], ptr [[BYTES]], i64 0, i64 51
+; TUNIT-NEXT:    [[I52:%.*]] = getelementptr inbounds [1024 x i8], ptr [[BYTES]], i64 0, i64 52
+; TUNIT-NEXT:    store i8 2, ptr [[I52]], align 4
+; TUNIT-NEXT:    [[I53:%.*]] = getelementptr inbounds [1024 x i8], ptr [[BYTES]], i64 0, i64 53
+; TUNIT-NEXT:    store i8 3, ptr [[I53]], align 1
+; TUNIT-NEXT:    [[I54:%.*]] = getelementptr inbounds [1024 x i8], ptr [[BYTES]], i64 0, i64 54
+; TUNIT-NEXT:    [[SEL:%.*]] = select i1 [[COND]], ptr [[I51]], ptr [[I52]]
+; TUNIT-NEXT:    [[R:%.*]] = call i8 @sum_two_
diff erent_loads(ptr nocapture nofree nonnull readonly dereferenceable(972) [[SEL]], ptr nocapture nofree noundef nonnull readonly dereferenceable(971) [[I53]]) #[[ATTR3]]
 ; TUNIT-NEXT:    ret i8 [[R]]
 ;
 ; CGSCC: Function Attrs: mustprogress nofree nosync nounwind willreturn
@@ -256,29 +255,29 @@ define i8 @call_partially_simplifiable_2(i1 %cond) {
 ; CGSCC-SAME: (i1 [[COND:%.*]]) #[[ATTR3:[0-9]+]] {
 ; CGSCC-NEXT:  entry:
 ; CGSCC-NEXT:    [[BYTES:%.*]] = alloca [1024 x i8], align 16
-; CGSCC-NEXT:    [[I51:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 51
-; CGSCC-NEXT:    [[I52:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 52
-; CGSCC-NEXT:    store i8 2, i8* [[I52]], align 4
-; CGSCC-NEXT:    [[I53:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 53
-; CGSCC-NEXT:    store i8 3, i8* [[I53]], align 1
-; CGSCC-NEXT:    [[I54:%.*]] = getelementptr inbounds [1024 x i8], [1024 x i8]* [[BYTES]], i64 0, i64 54
-; CGSCC-NEXT:    store i8 4, i8* [[I54]], align 2
-; CGSCC-NEXT:    [[SEL:%.*]] = select i1 [[COND]], i8* [[I51]], i8* [[I52]]
-; CGSCC-NEXT:    [[R:%.*]] = call i8 @sum_two_
diff erent_loads(i8* nocapture nofree noundef nonnull readonly dereferenceable(972) [[SEL]], i8* nocapture nofree noundef nonnull readonly dereferenceable(971) [[I53]]) #[[ATTR4]]
+; CGSCC-NEXT:    [[I51:%.*]] = getelementptr inbounds [1024 x i8], ptr [[BYTES]], i64 0, i64 51
+; CGSCC-NEXT:    [[I52:%.*]] = getelementptr inbounds [1024 x i8], ptr [[BYTES]], i64 0, i64 52
+; CGSCC-NEXT:    store i8 2, ptr [[I52]], align 4
+; CGSCC-NEXT:    [[I53:%.*]] = getelementptr inbounds [1024 x i8], ptr [[BYTES]], i64 0, i64 53
+; CGSCC-NEXT:    store i8 3, ptr [[I53]], align 1
+; CGSCC-NEXT:    [[I54:%.*]] = getelementptr inbounds [1024 x i8], ptr [[BYTES]], i64 0, i64 54
+; CGSCC-NEXT:    store i8 4, ptr [[I54]], align 2
+; CGSCC-NEXT:    [[SEL:%.*]] = select i1 [[COND]], ptr [[I51]], ptr [[I52]]
+; CGSCC-NEXT:    [[R:%.*]] = call i8 @sum_two_
diff erent_loads(ptr nocapture nofree noundef nonnull readonly dereferenceable(972) [[SEL]], ptr nocapture nofree noundef nonnull readonly dereferenceable(971) [[I53]]) #[[ATTR4]]
 ; CGSCC-NEXT:    ret i8 [[R]]
 ;
 entry:
   %Bytes = alloca [1024 x i8], align 16
-  %i51 = getelementptr inbounds [1024 x i8], [1024 x i8]* %Bytes, i64 0, i64 51
-  %i52 = getelementptr inbounds [1024 x i8], [1024 x i8]* %Bytes, i64 0, i64 52
-  store i8 2, i8* %i52
-  %i53 = getelementptr inbounds [1024 x i8], [1024 x i8]* %Bytes, i64 0, i64 53
-  store i8 3, i8* %i53
-  %i54 = getelementptr inbounds [1024 x i8], [1024 x i8]* %Bytes, i64 0, i64 54
+  %i51 = getelementptr inbounds [1024 x i8], ptr %Bytes, i64 0, i64 51
+  %i52 = getelementptr inbounds [1024 x i8], ptr %Bytes, i64 0, i64 52
+  store i8 2, ptr %i52
+  %i53 = getelementptr inbounds [1024 x i8], ptr %Bytes, i64 0, i64 53
+  store i8 3, ptr %i53
+  %i54 = getelementptr inbounds [1024 x i8], ptr %Bytes, i64 0, i64 54
   ;;; This store is redundant, hence removed. Not affected by the select.
-  store i8 4, i8* %i54
-  %sel = select i1 %cond, i8* %i51, i8 *%i52
-  %r = call i8 @sum_two_
diff erent_loads(i8* %sel, i8* %i53)
+  store i8 4, ptr %i54
+  %sel = select i1 %cond, ptr %i51, ptr %i52
+  %r = call i8 @sum_two_
diff erent_loads(ptr %sel, ptr %i53)
   ret i8 %r
 }
 

diff  --git a/llvm/test/Transforms/Attributor/convergent.ll b/llvm/test/Transforms/Attributor/convergent.ll
index b4ca2333c35bcc..4b76de164402f4 100644
--- a/llvm/test/Transforms/Attributor/convergent.ll
+++ b/llvm/test/Transforms/Attributor/convergent.ll
@@ -88,9 +88,9 @@ define i32 @calls_defined_with_asm(i32 %a, i32 %b) convergent {
   ret i32 %c
 }
 
-declare void @llvm.memcpy.p0i8.p0i8.i64(i8* %dest, i8* %src, i64 %size, i1 %isVolatile) convergent
+declare void @llvm.memcpy.p0i8.p0i8.i64(ptr %dest, ptr %src, i64 %size, i1 %isVolatile) convergent
 
-define void @calls_intrinsic(i8* %dest, i8* %src, i64 %size) convergent {
+define void @calls_intrinsic(ptr %dest, ptr %src, i64 %size) convergent {
 ; TUNIT: Function Attrs: convergent mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite)
 ; TUNIT-LABEL: define {{[^@]+}}@calls_intrinsic
 ; TUNIT-SAME: (ptr nocapture nofree writeonly [[DEST:%.*]], ptr nocapture nofree readonly [[SRC:%.*]], i64 [[SIZE:%.*]]) #[[ATTR2:[0-9]+]] {
@@ -103,7 +103,7 @@ define void @calls_intrinsic(i8* %dest, i8* %src, i64 %size) convergent {
 ; CGSCC-NEXT:    call void @llvm.memcpy.p0.p0.i64(ptr nocapture nofree writeonly [[DEST]], ptr nocapture nofree readonly [[SRC]], i64 [[SIZE]], i1 noundef false) #[[ATTR5]]
 ; CGSCC-NEXT:    ret void
 ;
-  call void @llvm.memcpy.p0i8.p0i8.i64(i8* %dest, i8* %src, i64 %size, i1 false)
+  call void @llvm.memcpy.p0i8.p0i8.i64(ptr %dest, ptr %src, i64 %size, i1 false)
   ret void
 }
 ;.

diff  --git a/llvm/test/Transforms/Attributor/dereferenceable-2-inseltpoison.ll b/llvm/test/Transforms/Attributor/dereferenceable-2-inseltpoison.ll
index 4742108a59f88f..f3c2cf8c0c7e5b 100644
--- a/llvm/test/Transforms/Attributor/dereferenceable-2-inseltpoison.ll
+++ b/llvm/test/Transforms/Attributor/dereferenceable-2-inseltpoison.ll
@@ -52,7 +52,7 @@ define double @PR21780_only_access3_with_inbounds(ptr %ptr) {
 ; CHECK-NEXT:    ret double [[T3]]
 ;
 
-  %arrayidx3 = getelementptr inbounds double, double* %ptr, i64 3
+  %arrayidx3 = getelementptr inbounds double, ptr %ptr, i64 3
   %t3 = load double, ptr %arrayidx3, align 8
   ret double %t3
 }
@@ -65,7 +65,7 @@ define double @PR21780_only_access3_without_inbounds(ptr %ptr) {
 ; CHECK-NEXT:    [[T3:%.*]] = load double, ptr [[ARRAYIDX3]], align 8
 ; CHECK-NEXT:    ret double [[T3]]
 ;
-  %arrayidx3 = getelementptr double, double* %ptr, i64 3
+  %arrayidx3 = getelementptr double, ptr %ptr, i64 3
   %t3 = load double, ptr %arrayidx3, align 8
   ret double %t3
 }
@@ -79,7 +79,7 @@ define double @PR21780_without_inbounds(ptr %ptr) {
 ; CHECK-NEXT:    ret double [[T3]]
 ;
 
-  %arrayidx1 = getelementptr double, double* %ptr, i64 1
+  %arrayidx1 = getelementptr double, ptr %ptr, i64 1
   %arrayidx2 = getelementptr double, ptr %ptr, i64 2
   %arrayidx3 = getelementptr double, ptr %ptr, i64 3
 
@@ -102,7 +102,7 @@ define void @gep0(ptr %unused, ptr %other, ptr %ptr) {
 ; CHECK-NEXT:    store i8 [[T2]], ptr [[OTHER]], align 1
 ; CHECK-NEXT:    ret void
 ;
-  %arrayidx0 = getelementptr i8, i8* %ptr, i64 0
+  %arrayidx0 = getelementptr i8, ptr %ptr, i64 0
   %arrayidx1 = getelementptr i8, ptr %ptr, i64 1
   %arrayidx2 = getelementptr i8, ptr %ptr, i64 2
   %t0 = load i8, ptr %arrayidx0
@@ -121,7 +121,7 @@ define void @ordering(ptr %ptr1, ptr %ptr2) {
 ; CHECK-SAME: (ptr nocapture nofree noundef nonnull readnone dereferenceable(3) [[PTR1:%.*]], ptr nocapture nofree nonnull readnone align 4 dereferenceable(8) [[PTR2:%.*]]) #[[ATTR2:[0-9]+]] {
 ; CHECK-NEXT:    ret void
 ;
-  %a20 = getelementptr i32, i32* %ptr2, i64 0
+  %a20 = getelementptr i32, ptr %ptr2, i64 0
   %a12 = getelementptr i8, ptr %ptr1, i64 2
   %t12 = load i8, ptr %a12
   %a11 = getelementptr i8, ptr %ptr1, i64 1
@@ -217,7 +217,7 @@ define void @volatile_is_not_dereferenceable(ptr %ptr) {
 ; CHECK-NEXT:    [[T0:%.*]] = load volatile i16, ptr [[PTR]], align 2
 ; CHECK-NEXT:    ret void
 ;
-  %arrayidx0 = getelementptr i16, i16* %ptr, i64 0
+  %arrayidx0 = getelementptr i16, ptr %ptr, i64 0
   %arrayidx1 = getelementptr i16, ptr %ptr, i64 1
   %arrayidx2 = getelementptr i16, ptr %ptr, i64 2
   %t0 = load volatile i16, ptr %arrayidx0
@@ -234,7 +234,7 @@ define void @atomic_is_alright(ptr %ptr) {
 ; CHECK-SAME: (ptr nocapture nofree nonnull readnone align 2 dereferenceable(6) [[PTR:%.*]]) #[[ATTR2]] {
 ; CHECK-NEXT:    ret void
 ;
-  %arrayidx0 = getelementptr i16, i16* %ptr, i64 0
+  %arrayidx0 = getelementptr i16, ptr %ptr, i64 0
   %arrayidx1 = getelementptr i16, ptr %ptr, i64 1
   %arrayidx2 = getelementptr i16, ptr %ptr, i64 2
   %t0 = load atomic i16, ptr %arrayidx0 unordered, align 2
@@ -251,7 +251,7 @@ define void @not_guaranteed_to_transfer_execution(ptr %ptr) {
 ; CHECK-NEXT:    call void @may_not_return()
 ; CHECK-NEXT:    ret void
 ;
-  %arrayidx0 = getelementptr i16, i16* %ptr, i64 0
+  %arrayidx0 = getelementptr i16, ptr %ptr, i64 0
   %arrayidx1 = getelementptr i16, ptr %ptr, i64 1
   %arrayidx2 = getelementptr i16, ptr %ptr, i64 2
   %t0 = load i16, ptr %arrayidx0
@@ -269,7 +269,7 @@ define void @variable_gep_index(ptr %unused, ptr %ptr, i64 %variable_index) {
 ; CHECK-SAME: (ptr nocapture nofree readnone [[UNUSED:%.*]], ptr nocapture nofree noundef nonnull readnone dereferenceable(1) [[PTR:%.*]], i64 [[VARIABLE_INDEX:%.*]]) #[[ATTR2]] {
 ; CHECK-NEXT:    ret void
 ;
-  %arrayidx1 = getelementptr i8, i8* %ptr, i64 %variable_index
+  %arrayidx1 = getelementptr i8, ptr %ptr, i64 %variable_index
   %arrayidx2 = getelementptr i8, ptr %ptr, i64 2
   %t0 = load i8, ptr %ptr
   %t1 = load i8, ptr %arrayidx1
@@ -299,7 +299,7 @@ define void @not_byte_multiple(ptr %ptr) {
 ; CHECK-SAME: (ptr nocapture nofree nonnull readnone align 2 dereferenceable(2) [[PTR:%.*]]) #[[ATTR2]] {
 ; CHECK-NEXT:    ret void
 ;
-  %arrayidx0 = getelementptr i9, i9* %ptr, i64 0
+  %arrayidx0 = getelementptr i9, ptr %ptr, i64 0
   %t0 = load i9, ptr %arrayidx0
   ret void
 }
@@ -312,7 +312,7 @@ define void @no_pointer_deref(ptr %ptr) {
 ; CHECK-SAME: (ptr nocapture nofree readnone align 2 [[PTR:%.*]]) #[[ATTR2]] {
 ; CHECK-NEXT:    ret void
 ;
-  %arrayidx1 = getelementptr i16, i16* %ptr, i64 1
+  %arrayidx1 = getelementptr i16, ptr %ptr, i64 1
   %arrayidx2 = getelementptr i16, ptr %ptr, i64 2
   %t1 = load i16, ptr %arrayidx1
   %t2 = load i16, ptr %arrayidx2
@@ -327,7 +327,7 @@ define void @non_consecutive(ptr %ptr) {
 ; CHECK-SAME: (ptr nocapture nofree noundef nonnull readnone align 4 dereferenceable(8) [[PTR:%.*]]) #[[ATTR2]] {
 ; CHECK-NEXT:    ret void
 ;
-  %arrayidx1 = getelementptr i32, i32* %ptr, i64 1
+  %arrayidx1 = getelementptr i32, ptr %ptr, i64 1
   %arrayidx3 = getelementptr i32, ptr %ptr, i64 3
   %t1 = load i32, ptr %arrayidx1
   %t0 = load i32, ptr %ptr
@@ -343,7 +343,7 @@ define void @more_bytes(ptr dereferenceable(8) %ptr) {
 ; CHECK-SAME: (ptr nocapture nofree noundef nonnull readnone align 4 dereferenceable(16) [[PTR:%.*]]) #[[ATTR2]] {
 ; CHECK-NEXT:    ret void
 ;
-  %arrayidx3 = getelementptr i32, i32* %ptr, i64 3
+  %arrayidx3 = getelementptr i32, ptr %ptr, i64 3
   %arrayidx1 = getelementptr i32, ptr %ptr, i64 1
   %arrayidx2 = getelementptr i32, ptr %ptr, i64 2
   %t3 = load i32, ptr %arrayidx3
@@ -361,7 +361,7 @@ define void @more_bytes_and_not_null(ptr dereferenceable_or_null(8) %ptr) {
 ; CHECK-SAME: (ptr nocapture nofree noundef nonnull readnone align 4 dereferenceable(16) [[PTR:%.*]]) #[[ATTR2]] {
 ; CHECK-NEXT:    ret void
 ;
-  %arrayidx3 = getelementptr i32, i32* %ptr, i64 3
+  %arrayidx3 = getelementptr i32, ptr %ptr, i64 3
   %arrayidx1 = getelementptr i32, ptr %ptr, i64 1
   %arrayidx2 = getelementptr i32, ptr %ptr, i64 2
   %t3 = load i32, ptr %arrayidx3
@@ -379,7 +379,7 @@ define void @better_bytes(ptr dereferenceable(100) %ptr) {
 ; CHECK-SAME: (ptr nocapture nofree noundef nonnull readnone align 4 dereferenceable(100) [[PTR:%.*]]) #[[ATTR2]] {
 ; CHECK-NEXT:    ret void
 ;
-  %arrayidx3 = getelementptr i32, i32* %ptr, i64 3
+  %arrayidx3 = getelementptr i32, ptr %ptr, i64 3
   %arrayidx1 = getelementptr i32, ptr %ptr, i64 1
   %arrayidx2 = getelementptr i32, ptr %ptr, i64 2
   %t3 = load i32, ptr %arrayidx3
@@ -395,7 +395,7 @@ define void @bitcast(ptr %arg) {
 ; CHECK-SAME: (ptr nocapture nofree nonnull readnone align 4 dereferenceable(8) [[ARG:%.*]]) #[[ATTR2]] {
 ; CHECK-NEXT:    ret void
 ;
-  %ptr = bitcast i32* %arg to float*
+  %ptr = bitcast ptr %arg to ptr
   %arrayidx1 = getelementptr float, ptr %ptr, i64 1
   %t0 = load float, ptr %ptr
   %t1 = load float, ptr %arrayidx1
@@ -408,7 +408,7 @@ define void @bitcast_
diff erent_sizes(ptr %arg1, ptr %arg2) {
 ; CHECK-SAME: (ptr nocapture nofree nonnull readnone align 4 dereferenceable(12) [[ARG1:%.*]], ptr nocapture nofree noundef nonnull readnone align 4 dereferenceable(16) [[ARG2:%.*]]) #[[ATTR2]] {
 ; CHECK-NEXT:    ret void
 ;
-  %ptr1 = bitcast double* %arg1 to float*
+  %ptr1 = bitcast ptr %arg1 to ptr
   %a11 = getelementptr float, ptr %ptr1, i64 1
   %a12 = getelementptr float, ptr %ptr1, i64 2
   %ld10 = load float, ptr %ptr1
@@ -427,7 +427,7 @@ define void @negative_offset(ptr %arg) {
 ; CHECK-SAME: (ptr nocapture nofree nonnull readnone align 4 dereferenceable(4) [[ARG:%.*]]) #[[ATTR2]] {
 ; CHECK-NEXT:    ret void
 ;
-  %ptr = bitcast i32* %arg to float*
+  %ptr = bitcast ptr %arg to ptr
   %arrayidx1 = getelementptr float, ptr %ptr, i64 -1
   %t0 = load float, ptr %ptr
   %t1 = load float, ptr %arrayidx1
@@ -443,7 +443,7 @@ define void @stores(ptr %arg) {
 ; CHECK-NEXT:    store float 2.000000e+00, ptr [[ARRAYIDX1]], align 4
 ; CHECK-NEXT:    ret void
 ;
-  %ptr = bitcast i32* %arg to float*
+  %ptr = bitcast ptr %arg to ptr
   %arrayidx1 = getelementptr float, ptr %ptr, i64 1
   store float 1.0, ptr %ptr
   store float 2.0, ptr %arrayidx1
@@ -458,7 +458,7 @@ define void @load_store(ptr %arg) {
 ; CHECK-NEXT:    store float 2.000000e+00, ptr [[ARRAYIDX1]], align 4
 ; CHECK-NEXT:    ret void
 ;
-  %ptr = bitcast i32* %arg to float*
+  %ptr = bitcast ptr %arg to ptr
   %arrayidx1 = getelementptr float, ptr %ptr, i64 1
   %t1 = load float, ptr %ptr
   store float 2.0, ptr %arrayidx1
@@ -473,7 +473,7 @@ define void @
diff erent_size1(ptr %arg) {
 ; CHECK-NEXT:    store i32 0, ptr [[ARG]], align 8
 ; CHECK-NEXT:    ret void
 ;
-  %arg-cast = bitcast i32* %arg to double*
+  %arg-cast = bitcast ptr %arg to ptr
   store double 0.000000e+00, ptr %arg-cast
   store i32 0, ptr %arg
   ret void
@@ -487,7 +487,7 @@ define void @
diff erent_size2(ptr %arg) {
 ; CHECK-NEXT:    store double 0.000000e+00, ptr [[ARG]], align 8
 ; CHECK-NEXT:    ret void
 ;
-  store i32 0, i32* %arg
+  store i32 0, ptr %arg
   store double 0.000000e+00, ptr %arg
   ret void
 }
@@ -509,7 +509,7 @@ define void @
diff erent_size2(ptr %arg) {
 ; According to the above CFG, we can see that instructions in l5 Block must be executed.
 ; Therefore, %p must be dereferenced.
 ;
-; ATTRIBUTOR_CGSCC_NPM-LABEL: define i32 @require_cfg_analysis(i32 %c, i32* {{.*}} dereferenceable(4) %p)
+; ATTRIBUTOR_CGSCC_NPM-LABEL: define i32 @require_cfg_analysis(i32 %c, ptr {{.*}} dereferenceable(4) %p)
 define i32 @require_cfg_analysis(i32 %c, ptr %p) {
 ; CHECK: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: write)
 ; CHECK-LABEL: define {{[^@]+}}@require_cfg_analysis

diff  --git a/llvm/test/Transforms/Attributor/dereferenceable-2.ll b/llvm/test/Transforms/Attributor/dereferenceable-2.ll
index b02637b6ae91e9..e2b7d64242058c 100644
--- a/llvm/test/Transforms/Attributor/dereferenceable-2.ll
+++ b/llvm/test/Transforms/Attributor/dereferenceable-2.ll
@@ -52,7 +52,7 @@ define double @PR21780_only_access3_with_inbounds(ptr %ptr) {
 ; CHECK-NEXT:    ret double [[T3]]
 ;
 
-  %arrayidx3 = getelementptr inbounds double, double* %ptr, i64 3
+  %arrayidx3 = getelementptr inbounds double, ptr %ptr, i64 3
   %t3 = load double, ptr %arrayidx3, align 8
   ret double %t3
 }
@@ -65,7 +65,7 @@ define double @PR21780_only_access3_without_inbounds(ptr %ptr) {
 ; CHECK-NEXT:    [[T3:%.*]] = load double, ptr [[ARRAYIDX3]], align 8
 ; CHECK-NEXT:    ret double [[T3]]
 ;
-  %arrayidx3 = getelementptr double, double* %ptr, i64 3
+  %arrayidx3 = getelementptr double, ptr %ptr, i64 3
   %t3 = load double, ptr %arrayidx3, align 8
   ret double %t3
 }
@@ -79,7 +79,7 @@ define double @PR21780_without_inbounds(ptr %ptr) {
 ; CHECK-NEXT:    ret double [[T3]]
 ;
 
-  %arrayidx1 = getelementptr double, double* %ptr, i64 1
+  %arrayidx1 = getelementptr double, ptr %ptr, i64 1
   %arrayidx2 = getelementptr double, ptr %ptr, i64 2
   %arrayidx3 = getelementptr double, ptr %ptr, i64 3
 
@@ -102,7 +102,7 @@ define void @gep0(ptr %unused, ptr %other, ptr %ptr) {
 ; CHECK-NEXT:    store i8 [[T2]], ptr [[OTHER]], align 1
 ; CHECK-NEXT:    ret void
 ;
-  %arrayidx0 = getelementptr i8, i8* %ptr, i64 0
+  %arrayidx0 = getelementptr i8, ptr %ptr, i64 0
   %arrayidx1 = getelementptr i8, ptr %ptr, i64 1
   %arrayidx2 = getelementptr i8, ptr %ptr, i64 2
   %t0 = load i8, ptr %arrayidx0
@@ -121,7 +121,7 @@ define void @ordering(ptr %ptr1, ptr %ptr2) {
 ; CHECK-SAME: (ptr nocapture nofree noundef nonnull readnone dereferenceable(3) [[PTR1:%.*]], ptr nocapture nofree nonnull readnone align 4 dereferenceable(8) [[PTR2:%.*]]) #[[ATTR2:[0-9]+]] {
 ; CHECK-NEXT:    ret void
 ;
-  %a20 = getelementptr i32, i32* %ptr2, i64 0
+  %a20 = getelementptr i32, ptr %ptr2, i64 0
   %a12 = getelementptr i8, ptr %ptr1, i64 2
   %t12 = load i8, ptr %a12
   %a11 = getelementptr i8, ptr %ptr1, i64 1
@@ -217,7 +217,7 @@ define void @volatile_is_not_dereferenceable(ptr %ptr) {
 ; CHECK-NEXT:    [[T0:%.*]] = load volatile i16, ptr [[PTR]], align 2
 ; CHECK-NEXT:    ret void
 ;
-  %arrayidx0 = getelementptr i16, i16* %ptr, i64 0
+  %arrayidx0 = getelementptr i16, ptr %ptr, i64 0
   %arrayidx1 = getelementptr i16, ptr %ptr, i64 1
   %arrayidx2 = getelementptr i16, ptr %ptr, i64 2
   %t0 = load volatile i16, ptr %arrayidx0
@@ -234,7 +234,7 @@ define void @atomic_is_alright(ptr %ptr) {
 ; CHECK-SAME: (ptr nocapture nofree nonnull readnone align 2 dereferenceable(6) [[PTR:%.*]]) #[[ATTR2]] {
 ; CHECK-NEXT:    ret void
 ;
-  %arrayidx0 = getelementptr i16, i16* %ptr, i64 0
+  %arrayidx0 = getelementptr i16, ptr %ptr, i64 0
   %arrayidx1 = getelementptr i16, ptr %ptr, i64 1
   %arrayidx2 = getelementptr i16, ptr %ptr, i64 2
   %t0 = load atomic i16, ptr %arrayidx0 unordered, align 2
@@ -251,7 +251,7 @@ define void @not_guaranteed_to_transfer_execution(ptr %ptr) {
 ; CHECK-NEXT:    call void @may_not_return()
 ; CHECK-NEXT:    ret void
 ;
-  %arrayidx0 = getelementptr i16, i16* %ptr, i64 0
+  %arrayidx0 = getelementptr i16, ptr %ptr, i64 0
   %arrayidx1 = getelementptr i16, ptr %ptr, i64 1
   %arrayidx2 = getelementptr i16, ptr %ptr, i64 2
   %t0 = load i16, ptr %arrayidx0
@@ -269,7 +269,7 @@ define void @variable_gep_index(ptr %unused, ptr %ptr, i64 %variable_index) {
 ; CHECK-SAME: (ptr nocapture nofree readnone [[UNUSED:%.*]], ptr nocapture nofree noundef nonnull readnone dereferenceable(1) [[PTR:%.*]], i64 [[VARIABLE_INDEX:%.*]]) #[[ATTR2]] {
 ; CHECK-NEXT:    ret void
 ;
-  %arrayidx1 = getelementptr i8, i8* %ptr, i64 %variable_index
+  %arrayidx1 = getelementptr i8, ptr %ptr, i64 %variable_index
   %arrayidx2 = getelementptr i8, ptr %ptr, i64 2
   %t0 = load i8, ptr %ptr
   %t1 = load i8, ptr %arrayidx1
@@ -299,7 +299,7 @@ define void @not_byte_multiple(ptr %ptr) {
 ; CHECK-SAME: (ptr nocapture nofree nonnull readnone align 2 dereferenceable(2) [[PTR:%.*]]) #[[ATTR2]] {
 ; CHECK-NEXT:    ret void
 ;
-  %arrayidx0 = getelementptr i9, i9* %ptr, i64 0
+  %arrayidx0 = getelementptr i9, ptr %ptr, i64 0
   %t0 = load i9, ptr %arrayidx0
   ret void
 }
@@ -312,7 +312,7 @@ define void @no_pointer_deref(ptr %ptr) {
 ; CHECK-SAME: (ptr nocapture nofree readnone align 2 [[PTR:%.*]]) #[[ATTR2]] {
 ; CHECK-NEXT:    ret void
 ;
-  %arrayidx1 = getelementptr i16, i16* %ptr, i64 1
+  %arrayidx1 = getelementptr i16, ptr %ptr, i64 1
   %arrayidx2 = getelementptr i16, ptr %ptr, i64 2
   %t1 = load i16, ptr %arrayidx1
   %t2 = load i16, ptr %arrayidx2
@@ -327,7 +327,7 @@ define void @non_consecutive(ptr %ptr) {
 ; CHECK-SAME: (ptr nocapture nofree noundef nonnull readnone align 4 dereferenceable(8) [[PTR:%.*]]) #[[ATTR2]] {
 ; CHECK-NEXT:    ret void
 ;
-  %arrayidx1 = getelementptr i32, i32* %ptr, i64 1
+  %arrayidx1 = getelementptr i32, ptr %ptr, i64 1
   %arrayidx3 = getelementptr i32, ptr %ptr, i64 3
   %t1 = load i32, ptr %arrayidx1
   %t0 = load i32, ptr %ptr
@@ -343,7 +343,7 @@ define void @more_bytes(ptr dereferenceable(8) %ptr) {
 ; CHECK-SAME: (ptr nocapture nofree noundef nonnull readnone align 4 dereferenceable(16) [[PTR:%.*]]) #[[ATTR2]] {
 ; CHECK-NEXT:    ret void
 ;
-  %arrayidx3 = getelementptr i32, i32* %ptr, i64 3
+  %arrayidx3 = getelementptr i32, ptr %ptr, i64 3
   %arrayidx1 = getelementptr i32, ptr %ptr, i64 1
   %arrayidx2 = getelementptr i32, ptr %ptr, i64 2
   %t3 = load i32, ptr %arrayidx3
@@ -361,7 +361,7 @@ define void @more_bytes_and_not_null(ptr dereferenceable_or_null(8) %ptr) {
 ; CHECK-SAME: (ptr nocapture nofree noundef nonnull readnone align 4 dereferenceable(16) [[PTR:%.*]]) #[[ATTR2]] {
 ; CHECK-NEXT:    ret void
 ;
-  %arrayidx3 = getelementptr i32, i32* %ptr, i64 3
+  %arrayidx3 = getelementptr i32, ptr %ptr, i64 3
   %arrayidx1 = getelementptr i32, ptr %ptr, i64 1
   %arrayidx2 = getelementptr i32, ptr %ptr, i64 2
   %t3 = load i32, ptr %arrayidx3
@@ -379,7 +379,7 @@ define void @better_bytes(ptr dereferenceable(100) %ptr) {
 ; CHECK-SAME: (ptr nocapture nofree noundef nonnull readnone align 4 dereferenceable(100) [[PTR:%.*]]) #[[ATTR2]] {
 ; CHECK-NEXT:    ret void
 ;
-  %arrayidx3 = getelementptr i32, i32* %ptr, i64 3
+  %arrayidx3 = getelementptr i32, ptr %ptr, i64 3
   %arrayidx1 = getelementptr i32, ptr %ptr, i64 1
   %arrayidx2 = getelementptr i32, ptr %ptr, i64 2
   %t3 = load i32, ptr %arrayidx3
@@ -395,7 +395,7 @@ define void @bitcast(ptr %arg) {
 ; CHECK-SAME: (ptr nocapture nofree nonnull readnone align 4 dereferenceable(8) [[ARG:%.*]]) #[[ATTR2]] {
 ; CHECK-NEXT:    ret void
 ;
-  %ptr = bitcast i32* %arg to float*
+  %ptr = bitcast ptr %arg to ptr
   %arrayidx1 = getelementptr float, ptr %ptr, i64 1
   %t0 = load float, ptr %ptr
   %t1 = load float, ptr %arrayidx1
@@ -408,7 +408,7 @@ define void @bitcast_
diff erent_sizes(ptr %arg1, ptr %arg2) {
 ; CHECK-SAME: (ptr nocapture nofree nonnull readnone align 4 dereferenceable(12) [[ARG1:%.*]], ptr nocapture nofree noundef nonnull readnone align 4 dereferenceable(16) [[ARG2:%.*]]) #[[ATTR2]] {
 ; CHECK-NEXT:    ret void
 ;
-  %ptr1 = bitcast double* %arg1 to float*
+  %ptr1 = bitcast ptr %arg1 to ptr
   %a11 = getelementptr float, ptr %ptr1, i64 1
   %a12 = getelementptr float, ptr %ptr1, i64 2
   %ld10 = load float, ptr %ptr1
@@ -427,7 +427,7 @@ define void @negative_offset(ptr %arg) {
 ; CHECK-SAME: (ptr nocapture nofree nonnull readnone align 4 dereferenceable(4) [[ARG:%.*]]) #[[ATTR2]] {
 ; CHECK-NEXT:    ret void
 ;
-  %ptr = bitcast i32* %arg to float*
+  %ptr = bitcast ptr %arg to ptr
   %arrayidx1 = getelementptr float, ptr %ptr, i64 -1
   %t0 = load float, ptr %ptr
   %t1 = load float, ptr %arrayidx1
@@ -443,7 +443,7 @@ define void @stores(ptr %arg) {
 ; CHECK-NEXT:    store float 2.000000e+00, ptr [[ARRAYIDX1]], align 4
 ; CHECK-NEXT:    ret void
 ;
-  %ptr = bitcast i32* %arg to float*
+  %ptr = bitcast ptr %arg to ptr
   %arrayidx1 = getelementptr float, ptr %ptr, i64 1
   store float 1.0, ptr %ptr
   store float 2.0, ptr %arrayidx1
@@ -458,7 +458,7 @@ define void @load_store(ptr %arg) {
 ; CHECK-NEXT:    store float 2.000000e+00, ptr [[ARRAYIDX1]], align 4
 ; CHECK-NEXT:    ret void
 ;
-  %ptr = bitcast i32* %arg to float*
+  %ptr = bitcast ptr %arg to ptr
   %arrayidx1 = getelementptr float, ptr %ptr, i64 1
   %t1 = load float, ptr %ptr
   store float 2.0, ptr %arrayidx1
@@ -473,7 +473,7 @@ define void @
diff erent_size1(ptr %arg) {
 ; CHECK-NEXT:    store i32 0, ptr [[ARG]], align 8
 ; CHECK-NEXT:    ret void
 ;
-  %arg-cast = bitcast i32* %arg to double*
+  %arg-cast = bitcast ptr %arg to ptr
   store double 0.000000e+00, ptr %arg-cast
   store i32 0, ptr %arg
   ret void
@@ -487,7 +487,7 @@ define void @
diff erent_size2(ptr %arg) {
 ; CHECK-NEXT:    store double 0.000000e+00, ptr [[ARG]], align 8
 ; CHECK-NEXT:    ret void
 ;
-  store i32 0, i32* %arg
+  store i32 0, ptr %arg
   store double 0.000000e+00, ptr %arg
   ret void
 }
@@ -509,7 +509,7 @@ define void @
diff erent_size2(ptr %arg) {
 ; According to the above CFG, we can see that instructions in l5 Block must be executed.
 ; Therefore, %p must be dereferenced.
 ;
-; ATTRIBUTOR_CGSCC_NPM-LABEL: define i32 @require_cfg_analysis(i32 %c, i32* {{.*}} dereferenceable(4) %p)
+; ATTRIBUTOR_CGSCC_NPM-LABEL: define i32 @require_cfg_analysis(i32 %c, ptr {{.*}} dereferenceable(4) %p)
 define i32 @require_cfg_analysis(i32 %c, ptr %p) {
 ; CHECK: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: write)
 ; CHECK-LABEL: define {{[^@]+}}@require_cfg_analysis

diff  --git a/llvm/test/Transforms/Attributor/value-simplify-reachability.ll b/llvm/test/Transforms/Attributor/value-simplify-reachability.ll
index e65bbaead4360a..6bdf222aef6ea2 100644
--- a/llvm/test/Transforms/Attributor/value-simplify-reachability.ll
+++ b/llvm/test/Transforms/Attributor/value-simplify-reachability.ll
@@ -418,108 +418,108 @@ define void @exclusion_set1(i1 %c1, i1 %c2, i1 %c3) {
 ; CHECK-NEXT:    ret void
 ;
 entry:
-  %call = call noalias i8* @calloc(i64 1, i64 4) norecurse
-  %gep0 = getelementptr inbounds i8, i8* %call, i64 0
-  %gep1 = getelementptr inbounds i8, i8* %call, i64 1
-  %gep2 = getelementptr inbounds i8, i8* %call, i64 2
-  %gep3 = getelementptr inbounds i8, i8* %call, i64 3
-
-  %l0_a = load i8, i8* %gep0
-  %l1_a = load i8, i8* %gep1
-  %l2_a = load i8, i8* %gep2
-  %l3_a = load i8, i8* %gep3
+  %call = call noalias ptr @calloc(i64 1, i64 4) norecurse
+  %gep0 = getelementptr inbounds i8, ptr %call, i64 0
+  %gep1 = getelementptr inbounds i8, ptr %call, i64 1
+  %gep2 = getelementptr inbounds i8, ptr %call, i64 2
+  %gep3 = getelementptr inbounds i8, ptr %call, i64 3
+
+  %l0_a = load i8, ptr %gep0
+  %l1_a = load i8, ptr %gep1
+  %l2_a = load i8, ptr %gep2
+  %l3_a = load i8, ptr %gep3
   call void @use_4_i8(i8 %l0_a, i8 %l1_a, i8 %l2_a, i8 %l3_a)
 
-  store i8 1, i8* %gep0, align 4
+  store i8 1, ptr %gep0, align 4
 
-  %l0_b = load i8, i8* %gep0
-  %l1_b = load i8, i8* %gep1
-  %l2_b = load i8, i8* %gep2
-  %l3_b = load i8, i8* %gep3
+  %l0_b = load i8, ptr %gep0
+  %l1_b = load i8, ptr %gep1
+  %l2_b = load i8, ptr %gep2
+  %l3_b = load i8, ptr %gep3
   call void @use_4_i8(i8 %l0_b, i8 %l1_b, i8 %l2_b, i8 %l3_b)
 
   br i1 %c1, label %if.merge1, label %if.then
 
 if.then:
-  %l0_c = load i8, i8* %gep0
-  %l1_c = load i8, i8* %gep1
-  %l2_c = load i8, i8* %gep2
-  %l3_c = load i8, i8* %gep3
+  %l0_c = load i8, ptr %gep0
+  %l1_c = load i8, ptr %gep1
+  %l2_c = load i8, ptr %gep2
+  %l3_c = load i8, ptr %gep3
   call void @use_4_i8(i8 %l0_c, i8 %l1_c, i8 %l2_c, i8 %l3_c)
 
-  store i8 2, i8* %gep1, align 4
+  store i8 2, ptr %gep1, align 4
 
-  %l0_d = load i8, i8* %gep0
-  %l1_d = load i8, i8* %gep1
-  %l2_d = load i8, i8* %gep2
-  %l3_d = load i8, i8* %gep3
+  %l0_d = load i8, ptr %gep0
+  %l1_d = load i8, ptr %gep1
+  %l2_d = load i8, ptr %gep2
+  %l3_d = load i8, ptr %gep3
   call void @use_4_i8(i8 %l0_d, i8 %l1_d, i8 %l2_d, i8 %l3_d)
 
   br i1 %c1, label %if.merge1, label %if.then2
 
 if.then2:
-  %l0_e = load i8, i8* %gep0
-  %l1_e = load i8, i8* %gep1
-  %l2_e = load i8, i8* %gep2
-  %l3_e = load i8, i8* %gep3
+  %l0_e = load i8, ptr %gep0
+  %l1_e = load i8, ptr %gep1
+  %l2_e = load i8, ptr %gep2
+  %l3_e = load i8, ptr %gep3
   call void @use_4_i8(i8 %l0_e, i8 %l1_e, i8 %l2_e, i8 %l3_e)
 
-  store i8 3, i8* %gep2, align 4
+  store i8 3, ptr %gep2, align 4
 
-  %l0_f = load i8, i8* %gep0
-  %l1_f = load i8, i8* %gep1
-  %l2_f = load i8, i8* %gep2
-  %l3_f = load i8, i8* %gep3
+  %l0_f = load i8, ptr %gep0
+  %l1_f = load i8, ptr %gep1
+  %l2_f = load i8, ptr %gep2
+  %l3_f = load i8, ptr %gep3
   call void @use_4_i8(i8 %l0_f, i8 %l1_f, i8 %l2_f, i8 %l3_f)
 
   br i1 %c2, label %if.merge2, label %if.then3
 
 if.merge1:
 
-  %l0_g = load i8, i8* %gep0
-  %l1_g = load i8, i8* %gep1
-  %l2_g = load i8, i8* %gep2
-  %l3_g = load i8, i8* %gep3
+  %l0_g = load i8, ptr %gep0
+  %l1_g = load i8, ptr %gep1
+  %l2_g = load i8, ptr %gep2
+  %l3_g = load i8, ptr %gep3
   call void @use_4_i8(i8 %l0_g, i8 %l1_g, i8 %l2_g, i8 %l3_g)
 
   br label %if.merge2
 
 if.merge2:
 
-  %l0_h = load i8, i8* %gep0
-  %l1_h = load i8, i8* %gep1
-  %l2_h = load i8, i8* %gep2
-  %l3_h = load i8, i8* %gep3
+  %l0_h = load i8, ptr %gep0
+  %l1_h = load i8, ptr %gep1
+  %l2_h = load i8, ptr %gep2
+  %l3_h = load i8, ptr %gep3
   call void @use_4_i8(i8 %l0_h, i8 %l1_h, i8 %l2_h, i8 %l3_h)
 
   br label %if.end
 
 if.then3:
 
-  %l0_i = load i8, i8* %gep0
-  %l1_i = load i8, i8* %gep1
-  %l2_i = load i8, i8* %gep2
-  %l3_i = load i8, i8* %gep3
+  %l0_i = load i8, ptr %gep0
+  %l1_i = load i8, ptr %gep1
+  %l2_i = load i8, ptr %gep2
+  %l3_i = load i8, ptr %gep3
   call void @use_4_i8(i8 %l0_i, i8 %l1_i, i8 %l2_i, i8 %l3_i)
 
-  store i8 4, i8* %gep3, align 4
+  store i8 4, ptr %gep3, align 4
 
-  %l0_j = load i8, i8* %gep0
-  %l1_j = load i8, i8* %gep1
-  %l2_j = load i8, i8* %gep2
-  %l3_j = load i8, i8* %gep3
+  %l0_j = load i8, ptr %gep0
+  %l1_j = load i8, ptr %gep1
+  %l2_j = load i8, ptr %gep2
+  %l3_j = load i8, ptr %gep3
   call void @use_4_i8(i8 %l0_j, i8 %l1_j, i8 %l2_j, i8 %l3_j)
 
   br label %if.end
 
 if.end:
-  %l0_k = load i8, i8* %gep0
-  %l1_k = load i8, i8* %gep1
-  %l2_k = load i8, i8* %gep2
-  %l3_k = load i8, i8* %gep3
+  %l0_k = load i8, ptr %gep0
+  %l1_k = load i8, ptr %gep1
+  %l2_k = load i8, ptr %gep2
+  %l3_k = load i8, ptr %gep3
   call void @use_4_i8(i8 %l0_k, i8 %l1_k, i8 %l2_k, i8 %l3_k)
 
-  call void @free(i8* %call) norecurse
+  call void @free(ptr %call) norecurse
   ret void
 }
 

diff  --git a/llvm/test/Transforms/Attributor/value-simplify.ll b/llvm/test/Transforms/Attributor/value-simplify.ll
index 8e8896c065c064..087b5715f10c32 100644
--- a/llvm/test/Transforms/Attributor/value-simplify.ll
+++ b/llvm/test/Transforms/Attributor/value-simplify.ll
@@ -1384,11 +1384,11 @@ define internal void @indirect() {
 ; CGSCC-NEXT:    store i32 0, ptr @x, align 4
 ; CGSCC-NEXT:    ret void
 ;
-  store i32 0, i32* @x
+  store i32 0, ptr @x
   ret void
 }
 
-define internal void @broker(void ()* %ptr) {
+define internal void @broker(ptr %ptr) {
 ; TUNIT-LABEL: define {{[^@]+}}@broker() {
 ; TUNIT-NEXT:  entry:
 ; TUNIT-NEXT:    call void @indirect()
@@ -1414,7 +1414,7 @@ define void @entry() {
 ; CHECK-NEXT:    ret void
 ;
 entry:
-  call void @broker(void ()* @indirect)
+  call void @broker(ptr @indirect)
   ret void
 }
 


        


More information about the llvm-commits mailing list