[llvm] 7ac6b2f - [CVP] Convert tests to opaque pointers (NFC)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 5 03:35:21 PST 2023


Author: Nikita Popov
Date: 2023-01-05T12:34:36+01:00
New Revision: 7ac6b2fdaf18d7d7c9e80dab647b1c8722205259

URL: https://github.com/llvm/llvm-project/commit/7ac6b2fdaf18d7d7c9e80dab647b1c8722205259
DIFF: https://github.com/llvm/llvm-project/commit/7ac6b2fdaf18d7d7c9e80dab647b1c8722205259.diff

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

Added: 
    

Modified: 
    llvm/test/Transforms/CorrelatedValuePropagation/2010-09-26-MergeConstantRange.ll
    llvm/test/Transforms/CorrelatedValuePropagation/add.ll
    llvm/test/Transforms/CorrelatedValuePropagation/alloca.ll
    llvm/test/Transforms/CorrelatedValuePropagation/basic.ll
    llvm/test/Transforms/CorrelatedValuePropagation/deopt.ll
    llvm/test/Transforms/CorrelatedValuePropagation/icmp.ll
    llvm/test/Transforms/CorrelatedValuePropagation/minmaxabs.ll
    llvm/test/Transforms/CorrelatedValuePropagation/overflow_predicate.ll
    llvm/test/Transforms/CorrelatedValuePropagation/phi-common-val.ll
    llvm/test/Transforms/CorrelatedValuePropagation/pointer.ll
    llvm/test/Transforms/CorrelatedValuePropagation/range.ll
    llvm/test/Transforms/CorrelatedValuePropagation/select.ll
    llvm/test/Transforms/CorrelatedValuePropagation/srem.ll
    llvm/test/Transforms/CorrelatedValuePropagation/sub.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Transforms/CorrelatedValuePropagation/2010-09-26-MergeConstantRange.ll b/llvm/test/Transforms/CorrelatedValuePropagation/2010-09-26-MergeConstantRange.ll
index b873f47ca5a8c..de2b47c669c0d 100644
--- a/llvm/test/Transforms/CorrelatedValuePropagation/2010-09-26-MergeConstantRange.ll
+++ b/llvm/test/Transforms/CorrelatedValuePropagation/2010-09-26-MergeConstantRange.ll
@@ -35,7 +35,7 @@ lbl_133.us:                                       ; preds = %lbl_134.us, %for.co
   br i1 undef, label %if.else14.us-lcssa.us, label %if.then.us
 
 lbl_134.us:                                       ; preds = %if.then.us
-  br i1 icmp eq (i16 ptrtoint (%struct.S2* @g_128 to i16), i16 0), label %for.cond9.preheader.us-lcssa.us, label %lbl_133.us
+  br i1 icmp eq (i16 ptrtoint (ptr @g_128 to i16), i16 0), label %for.cond9.preheader.us-lcssa.us, label %lbl_133.us
 
 if.then.us:                                       ; preds = %lbl_133.us
   br i1 true, label %for.cond.loopexit4.us-lcssa.us, label %lbl_134.us
@@ -50,7 +50,7 @@ for.cond.loopexit4.us-lcssa.us:                   ; preds = %if.then.us
   br label %for.cond.loopexit4
 
 lbl_133:                                          ; preds = %lbl_134, %for.cond.for.cond.split_crit_edge
-  %l_109.0 = phi i16 [ 0, %for.cond.for.cond.split_crit_edge ], [ ptrtoint (%struct.S2* @g_128 to i16), %lbl_134 ]
+  %l_109.0 = phi i16 [ 0, %for.cond.for.cond.split_crit_edge ], [ ptrtoint (ptr @g_128 to i16), %lbl_134 ]
   %tobool = icmp eq i32 undef, 0
   br i1 %tobool, label %if.else14.us-lcssa, label %if.then
 
@@ -58,7 +58,7 @@ if.then:                                          ; preds = %lbl_133
   br i1 false, label %for.cond.loopexit4.us-lcssa, label %lbl_134
 
 lbl_134:                                          ; preds = %if.then
-  br i1 icmp eq (i16 ptrtoint (%struct.S2* @g_128 to i16), i16 0), label %for.cond9.preheader.us-lcssa, label %lbl_133
+  br i1 icmp eq (i16 ptrtoint (ptr @g_128 to i16), i16 0), label %for.cond9.preheader.us-lcssa, label %lbl_133
 
 for.cond9.preheader.us-lcssa:                     ; preds = %lbl_134
   br label %for.cond9.preheader
@@ -74,7 +74,7 @@ if.else14.us-lcssa:                               ; preds = %lbl_133
 
 if.else14:                                        ; preds = %if.else14.us-lcssa, %if.else14.us-lcssa.us
   %l_109.0.lcssa = phi i16 [ %l_109.0, %if.else14.us-lcssa ], [ 0, %if.else14.us-lcssa.us ]
-  store i16 undef, i16* @g_106, align 2
+  store i16 undef, ptr @g_106, align 2
   br label %for.cond.backedge
 
 for.cond.backedge:                                ; preds = %if.else14, %for.cond.loopexit4

diff  --git a/llvm/test/Transforms/CorrelatedValuePropagation/add.ll b/llvm/test/Transforms/CorrelatedValuePropagation/add.ll
index 6c94d4c943916..9ddb7dace104e 100644
--- a/llvm/test/Transforms/CorrelatedValuePropagation/add.ll
+++ b/llvm/test/Transforms/CorrelatedValuePropagation/add.ll
@@ -96,7 +96,7 @@ exit:
 @b = global i32 0, align 4
 define void @test6(i32 %a) {
 bb:
-  %add = add i32 %a, ptrtoint (i32* @b to i32)
+  %add = add i32 %a, ptrtoint (ptr @b to i32)
   ret void
 }
 
@@ -196,8 +196,8 @@ exit:
 
 @limit = external global i32
 ; CHECK-LABEL: @test11(
-define i32 @test11(i32* %p, i32 %i) {
-  %limit = load i32, i32* %p, !range !{i32 0, i32 2147483647}
+define i32 @test11(ptr %p, i32 %i) {
+  %limit = load i32, ptr %p, !range !{i32 0, i32 2147483647}
   %within.1 = icmp ugt i32 %limit, %i
   %i.plus.7 = add i32 %i, 7
   %within.2 = icmp ugt i32 %limit, %i.plus.7
@@ -311,7 +311,7 @@ exit:
 ; because the loop exit condition is SLT, we can supplement the iv add
 ; (iv.next def) with an nsw.
 ; CHECK-LABEL: @test16(
-define i32 @test16(i32* %n, i32* %a) {
+define i32 @test16(ptr %n, ptr %a) {
 preheader:
   br label %loop
 
@@ -319,11 +319,11 @@ loop:
 ; CHECK: %iv.next = add nsw i32 %iv, 1
   %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ]
   %acc = phi i32 [ 0, %preheader ], [ %acc.curr, %loop ]
-  %x = load atomic i32, i32* %a unordered, align 8
+  %x = load atomic i32, ptr %a unordered, align 8
   fence acquire
   %acc.curr = add i32 %acc, %x
   %iv.next = add i32 %iv, 1
-  %nval = load atomic i32, i32* %n unordered, align 8
+  %nval = load atomic i32, ptr %n unordered, align 8
   %cmp = icmp slt i32 %iv.next, %nval
   br i1 %cmp, label %loop, label %exit
 

diff  --git a/llvm/test/Transforms/CorrelatedValuePropagation/alloca.ll b/llvm/test/Transforms/CorrelatedValuePropagation/alloca.ll
index 7c2aaa64a0978..9e47bd283e3b5 100644
--- a/llvm/test/Transforms/CorrelatedValuePropagation/alloca.ll
+++ b/llvm/test/Transforms/CorrelatedValuePropagation/alloca.ll
@@ -6,27 +6,24 @@
 ; defined by alloca + bitcast. We know the ret value of alloca is nonnull.
 ;
 ; CHECK-NOT: LVI Getting edge value   %a.i = alloca i64, align 8 at 'for.body'
-; CHECK-NOT: LVI Getting edge value   %tmp = bitcast i64* %a.i to i8* from 'for.cond' to 'for.body'
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"
 
 @.str = private unnamed_addr constant [8 x i8] c"a = %l\0A\00", align 1
 
 ; Function Attrs: argmemonly nounwind
-declare void @llvm.lifetime.start.p0i8(i64, i8* nocapture)
+declare void @llvm.lifetime.start.p0(i64, ptr nocapture)
 
-declare void @hoo(i64*)
+declare void @hoo(ptr)
 
-declare i32 @printf(i8* nocapture readonly, ...)
+declare i32 @printf(ptr nocapture readonly, ...)
 
 ; Function Attrs: argmemonly nounwind
-declare void @llvm.lifetime.end.p0i8(i64, i8* nocapture)
+declare void @llvm.lifetime.end.p0(i64, ptr nocapture)
 
-define void @goo(i32 %N, i64* %b) {
+define void @goo(i32 %N, ptr %b) {
 entry:
   %a.i = alloca i64, align 8
-  %tmp = bitcast i64* %a.i to i8*
-  %c = getelementptr inbounds i64, i64* %b, i64 0
   br label %for.cond
 
 for.cond:                                         ; preds = %for.body, %entry
@@ -35,12 +32,12 @@ for.cond:                                         ; preds = %for.body, %entry
   br i1 %cmp, label %for.body, label %for.end
 
 for.body:                                         ; preds = %for.cond
-  call void @llvm.lifetime.start.p0i8(i64 8, i8* %tmp)
-  call void @hoo(i64* %a.i)
-  call void @hoo(i64* %c)
-  %tmp1 = load volatile i64, i64* %a.i, align 8
-  %call.i = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i64 %tmp1)
-  call void @llvm.lifetime.end.p0i8(i64 8, i8* %tmp)
+  call void @llvm.lifetime.start.p0(i64 8, ptr %a.i)
+  call void @hoo(ptr %a.i)
+  call void @hoo(ptr %b)
+  %tmp1 = load volatile i64, ptr %a.i, align 8
+  %call.i = call i32 (ptr, ...) @printf(ptr @.str, i64 %tmp1)
+  call void @llvm.lifetime.end.p0(i64 8, ptr %a.i)
   %inc = add nsw i32 %i.0, 1
   br label %for.cond
 

diff  --git a/llvm/test/Transforms/CorrelatedValuePropagation/basic.ll b/llvm/test/Transforms/CorrelatedValuePropagation/basic.ll
index 7a08f4d2bd270..b7f1c80565f83 100644
--- a/llvm/test/Transforms/CorrelatedValuePropagation/basic.ll
+++ b/llvm/test/Transforms/CorrelatedValuePropagation/basic.ll
@@ -55,26 +55,26 @@ bb3:
 
 ; PR4855
 @gv = internal constant i8 7
-define i8 @test3(i8* %a) nounwind {
+define i8 @test3(ptr %a) nounwind {
 ; CHECK-LABEL: @test3(
 ; CHECK-NEXT:  entry:
-; CHECK-NEXT:    [[COND:%.*]] = icmp eq i8* [[A:%.*]], @gv
+; CHECK-NEXT:    [[COND:%.*]] = icmp eq ptr [[A:%.*]], @gv
 ; CHECK-NEXT:    br i1 [[COND]], label [[BB2:%.*]], label [[BB:%.*]]
 ; CHECK:       bb:
 ; CHECK-NEXT:    ret i8 0
 ; CHECK:       bb2:
-; CHECK-NEXT:    [[SHOULD_BE_CONST:%.*]] = load i8, i8* @gv, align 1
+; CHECK-NEXT:    [[SHOULD_BE_CONST:%.*]] = load i8, ptr @gv, align 1
 ; CHECK-NEXT:    ret i8 [[SHOULD_BE_CONST]]
 ;
 entry:
-  %cond = icmp eq i8* %a, @gv
+  %cond = icmp eq ptr %a, @gv
   br i1 %cond, label %bb2, label %bb
 
 bb:
   ret i8 0
 
 bb2:
-  %should_be_const = load i8, i8* %a
+  %should_be_const = load i8, ptr %a
   ret i8 %should_be_const
 }
 
@@ -111,32 +111,32 @@ LessThanOrEqualToTwo:
   ret i32 0
 }
 
-declare i32* @f(i32*)
-define void @test5(i32* %x, i32* %y) {
+declare ptr @f(ptr)
+define void @test5(ptr %x, ptr %y) {
 ; CHECK-LABEL: @test5(
 ; CHECK-NEXT:  entry:
-; CHECK-NEXT:    [[PRE:%.*]] = icmp eq i32* [[X:%.*]], null
+; CHECK-NEXT:    [[PRE:%.*]] = icmp eq ptr [[X:%.*]], null
 ; CHECK-NEXT:    br i1 [[PRE]], label [[RETURN:%.*]], label [[LOOP:%.*]]
 ; CHECK:       loop:
-; CHECK-NEXT:    [[PHI:%.*]] = phi i32* [ [[F:%.*]], [[LOOP]] ], [ [[X]], [[ENTRY:%.*]] ]
-; CHECK-NEXT:    [[F]] = tail call i32* @f(i32* [[PHI]])
-; CHECK-NEXT:    [[CMP1:%.*]] = icmp ne i32* [[F]], [[Y:%.*]]
-; CHECK-NEXT:    [[SEL:%.*]] = select i1 [[CMP1]], i32* [[F]], i32* null
-; CHECK-NEXT:    [[CMP2:%.*]] = icmp eq i32* [[SEL]], null
+; CHECK-NEXT:    [[PHI:%.*]] = phi ptr [ [[F:%.*]], [[LOOP]] ], [ [[X]], [[ENTRY:%.*]] ]
+; CHECK-NEXT:    [[F]] = tail call ptr @f(ptr [[PHI]])
+; CHECK-NEXT:    [[CMP1:%.*]] = icmp ne ptr [[F]], [[Y:%.*]]
+; CHECK-NEXT:    [[SEL:%.*]] = select i1 [[CMP1]], ptr [[F]], ptr null
+; CHECK-NEXT:    [[CMP2:%.*]] = icmp eq ptr [[SEL]], null
 ; CHECK-NEXT:    br i1 [[CMP2]], label [[RETURN]], label [[LOOP]]
 ; CHECK:       return:
 ; CHECK-NEXT:    ret void
 ;
 entry:
-  %pre = icmp eq i32* %x, null
+  %pre = icmp eq ptr %x, null
   br i1 %pre, label %return, label %loop
 
 loop:
-  %phi = phi i32* [ %sel, %loop ], [ %x, %entry ]
-  %f = tail call i32* @f(i32* %phi)
-  %cmp1 = icmp ne i32* %f, %y
-  %sel = select i1 %cmp1, i32* %f, i32* null
-  %cmp2 = icmp eq i32* %sel, null
+  %phi = phi ptr [ %sel, %loop ], [ %x, %entry ]
+  %f = tail call ptr @f(ptr %phi)
+  %cmp1 = icmp ne ptr %f, %y
+  %sel = select i1 %cmp1, ptr %f, ptr null
+  %cmp2 = icmp eq ptr %sel, null
   br i1 %cmp2, label %return, label %loop
 
 return:
@@ -144,16 +144,16 @@ return:
 }
 
 ; "false" case for CorrelatedValuePropagation
-define void @loop1(i32* %x, i32* %y) {
+define void @loop1(ptr %x, ptr %y) {
 ; CHECK-LABEL: @loop1(
 ; CHECK-NEXT:  entry:
 ; CHECK-NEXT:    br label [[LOOP:%.*]]
 ; CHECK:       loop:
-; CHECK-NEXT:    [[PHI:%.*]] = phi i32* [ [[F:%.*]], [[LOOP]] ], [ [[X:%.*]], [[ENTRY:%.*]] ]
-; CHECK-NEXT:    [[F]] = tail call i32* @f(i32* [[PHI]])
-; CHECK-NEXT:    [[CMP1:%.*]] = icmp ne i32* [[F]], [[Y:%.*]]
-; CHECK-NEXT:    [[SEL:%.*]] = select i1 [[CMP1]], i32* [[F]], i32* null
-; CHECK-NEXT:    [[CMP2:%.*]] = icmp eq i32* [[SEL]], null
+; CHECK-NEXT:    [[PHI:%.*]] = phi ptr [ [[F:%.*]], [[LOOP]] ], [ [[X:%.*]], [[ENTRY:%.*]] ]
+; CHECK-NEXT:    [[F]] = tail call ptr @f(ptr [[PHI]])
+; CHECK-NEXT:    [[CMP1:%.*]] = icmp ne ptr [[F]], [[Y:%.*]]
+; CHECK-NEXT:    [[SEL:%.*]] = select i1 [[CMP1]], ptr [[F]], ptr null
+; CHECK-NEXT:    [[CMP2:%.*]] = icmp eq ptr [[SEL]], null
 ; CHECK-NEXT:    br i1 [[CMP2]], label [[RETURN:%.*]], label [[LOOP]]
 ; CHECK:       return:
 ; CHECK-NEXT:    ret void
@@ -162,11 +162,11 @@ entry:
   br label %loop
 
 loop:
-  %phi = phi i32* [ %sel, %loop ], [ %x, %entry ]
-  %f = tail call i32* @f(i32* %phi)
-  %cmp1 = icmp ne i32* %f, %y
-  %sel = select i1 %cmp1, i32* %f, i32* null
-  %cmp2 = icmp eq i32* %sel, null
+  %phi = phi ptr [ %sel, %loop ], [ %x, %entry ]
+  %f = tail call ptr @f(ptr %phi)
+  %cmp1 = icmp ne ptr %f, %y
+  %sel = select i1 %cmp1, ptr %f, ptr null
+  %cmp2 = icmp eq ptr %sel, null
   br i1 %cmp2, label %return, label %loop
 
 return:
@@ -174,16 +174,16 @@ return:
 }
 
 ; "true" case for CorrelatedValuePropagation
-define void @loop2(i32* %x, i32* %y) {
+define void @loop2(ptr %x, ptr %y) {
 ; CHECK-LABEL: @loop2(
 ; CHECK-NEXT:  entry:
 ; CHECK-NEXT:    br label [[LOOP:%.*]]
 ; CHECK:       loop:
-; CHECK-NEXT:    [[PHI:%.*]] = phi i32* [ [[F:%.*]], [[LOOP]] ], [ [[X:%.*]], [[ENTRY:%.*]] ]
-; CHECK-NEXT:    [[F]] = tail call i32* @f(i32* [[PHI]])
-; CHECK-NEXT:    [[CMP1:%.*]] = icmp eq i32* [[F]], [[Y:%.*]]
-; CHECK-NEXT:    [[SEL:%.*]] = select i1 [[CMP1]], i32* null, i32* [[F]]
-; CHECK-NEXT:    [[CMP2:%.*]] = icmp eq i32* [[SEL]], null
+; CHECK-NEXT:    [[PHI:%.*]] = phi ptr [ [[F:%.*]], [[LOOP]] ], [ [[X:%.*]], [[ENTRY:%.*]] ]
+; CHECK-NEXT:    [[F]] = tail call ptr @f(ptr [[PHI]])
+; CHECK-NEXT:    [[CMP1:%.*]] = icmp eq ptr [[F]], [[Y:%.*]]
+; CHECK-NEXT:    [[SEL:%.*]] = select i1 [[CMP1]], ptr null, ptr [[F]]
+; CHECK-NEXT:    [[CMP2:%.*]] = icmp eq ptr [[SEL]], null
 ; CHECK-NEXT:    br i1 [[CMP2]], label [[RETURN:%.*]], label [[LOOP]]
 ; CHECK:       return:
 ; CHECK-NEXT:    ret void
@@ -192,11 +192,11 @@ entry:
   br label %loop
 
 loop:
-  %phi = phi i32* [ %sel, %loop ], [ %x, %entry ]
-  %f = tail call i32* @f(i32* %phi)
-  %cmp1 = icmp eq i32* %f, %y
-  %sel = select i1 %cmp1, i32* null, i32* %f
-  %cmp2 = icmp eq i32* %sel, null
+  %phi = phi ptr [ %sel, %loop ], [ %x, %entry ]
+  %f = tail call ptr @f(ptr %phi)
+  %cmp1 = icmp eq ptr %f, %y
+  %sel = select i1 %cmp1, ptr null, ptr %f
+  %cmp2 = icmp eq ptr %sel, null
   br i1 %cmp2, label %return, label %loop
 
 return:
@@ -532,7 +532,7 @@ exit:
   ret i8 0
 }
 
-define i1 @arg_attribute(i8* nonnull %a) {
+define i1 @arg_attribute(ptr nonnull %a) {
 ; CHECK-LABEL: @arg_attribute(
 ; CHECK-NEXT:    ret i1 false
 ;
@@ -540,14 +540,14 @@ define i1 @arg_attribute(i8* nonnull %a) {
   ret i1 %cmp
 }
 
-declare nonnull i8* @return_nonnull()
+declare nonnull ptr @return_nonnull()
 define i1 @call_attribute() {
 ; CHECK-LABEL: @call_attribute(
-; CHECK-NEXT:    [[A:%.*]] = call i8* @return_nonnull()
+; CHECK-NEXT:    [[A:%.*]] = call ptr @return_nonnull()
 ; CHECK-NEXT:    ret i1 false
 ;
   %a = call i8* @return_nonnull()
-  %cmp = icmp eq i8* %a, null
+  %cmp = icmp eq ptr %a, null
   ret i1 %cmp
 }
 
@@ -979,7 +979,7 @@ out:
   ret i1 false
 }
 
-define void @abs1(i32 %a, i1* %p) {
+define void @abs1(i32 %a, ptr %p) {
 ; CHECK-LABEL: @abs1(
 ; CHECK-NEXT:  entry:
 ; CHECK-NEXT:    [[CMP1:%.*]] = icmp slt i32 [[A:%.*]], 10
@@ -990,12 +990,12 @@ define void @abs1(i32 %a, i1* %p) {
 ; CHECK-NEXT:    [[SUB:%.*]] = sub nsw i32 0, [[A]]
 ; CHECK-NEXT:    [[CMP:%.*]] = icmp slt i32 [[A]], 0
 ; CHECK-NEXT:    [[ABS:%.*]] = select i1 [[CMP]], i32 [[SUB]], i32 [[A]]
-; CHECK-NEXT:    store i1 true, i1* [[P:%.*]], align 1
+; CHECK-NEXT:    store i1 true, ptr [[P:%.*]], align 1
 ; CHECK-NEXT:    [[C2:%.*]] = icmp ult i32 [[ABS]], 19
-; CHECK-NEXT:    store i1 [[C2]], i1* [[P]], align 1
-; CHECK-NEXT:    store i1 true, i1* [[P]], align 1
+; CHECK-NEXT:    store i1 [[C2]], ptr [[P]], align 1
+; CHECK-NEXT:    store i1 true, ptr [[P]], align 1
 ; CHECK-NEXT:    [[C4:%.*]] = icmp uge i32 [[ABS]], 1
-; CHECK-NEXT:    store i1 [[C4]], i1* [[P]], align 1
+; CHECK-NEXT:    store i1 [[C4]], ptr [[P]], align 1
 ; CHECK-NEXT:    br label [[EXIT]]
 ; CHECK:       exit:
 ; CHECK-NEXT:    ret void
@@ -1011,20 +1011,20 @@ guard:
   %cmp = icmp slt i32 %a, 0
   %abs = select i1 %cmp, i32 %sub, i32 %a
   %c1 = icmp slt i32 %abs, 20
-  store i1 %c1, i1* %p
+  store i1 %c1, ptr %p
   %c2 = icmp slt i32 %abs, 19
-  store i1 %c2, i1* %p
+  store i1 %c2, ptr %p
   %c3 = icmp sge i32 %abs, 0
-  store i1 %c3, i1* %p
+  store i1 %c3, ptr %p
   %c4 = icmp sge i32 %abs, 1
-  store i1 %c4, i1* %p
+  store i1 %c4, ptr %p
   br label %exit
 
 exit:
   ret void
 }
 
-define void @abs2(i32 %a, i1* %p) {
+define void @abs2(i32 %a, ptr %p) {
 ; CHECK-LABEL: @abs2(
 ; CHECK-NEXT:  entry:
 ; CHECK-NEXT:    [[CMP1:%.*]] = icmp slt i32 [[A:%.*]], 10
@@ -1035,12 +1035,12 @@ define void @abs2(i32 %a, i1* %p) {
 ; CHECK-NEXT:    [[SUB:%.*]] = sub nsw i32 0, [[A]]
 ; CHECK-NEXT:    [[CMP:%.*]] = icmp sge i32 [[A]], 0
 ; CHECK-NEXT:    [[ABS:%.*]] = select i1 [[CMP]], i32 [[A]], i32 [[SUB]]
-; CHECK-NEXT:    store i1 true, i1* [[P:%.*]], align 1
+; CHECK-NEXT:    store i1 true, ptr [[P:%.*]], align 1
 ; CHECK-NEXT:    [[C2:%.*]] = icmp ult i32 [[ABS]], 19
-; CHECK-NEXT:    store i1 [[C2]], i1* [[P]], align 1
-; CHECK-NEXT:    store i1 true, i1* [[P]], align 1
+; CHECK-NEXT:    store i1 [[C2]], ptr [[P]], align 1
+; CHECK-NEXT:    store i1 true, ptr [[P]], align 1
 ; CHECK-NEXT:    [[C4:%.*]] = icmp uge i32 [[ABS]], 1
-; CHECK-NEXT:    store i1 [[C4]], i1* [[P]], align 1
+; CHECK-NEXT:    store i1 [[C4]], ptr [[P]], align 1
 ; CHECK-NEXT:    br label [[EXIT]]
 ; CHECK:       exit:
 ; CHECK-NEXT:    ret void
@@ -1056,20 +1056,20 @@ guard:
   %cmp = icmp sge i32 %a, 0
   %abs = select i1 %cmp, i32 %a, i32 %sub
   %c1 = icmp slt i32 %abs, 20
-  store i1 %c1, i1* %p
+  store i1 %c1, ptr %p
   %c2 = icmp slt i32 %abs, 19
-  store i1 %c2, i1* %p
+  store i1 %c2, ptr %p
   %c3 = icmp sge i32 %abs, 0
-  store i1 %c3, i1* %p
+  store i1 %c3, ptr %p
   %c4 = icmp sge i32 %abs, 1
-  store i1 %c4, i1* %p
+  store i1 %c4, ptr %p
   br label %exit
 
 exit:
   ret void
 }
 
-define void @nabs1(i32 %a, i1* %p) {
+define void @nabs1(i32 %a, ptr %p) {
 ; CHECK-LABEL: @nabs1(
 ; CHECK-NEXT:  entry:
 ; CHECK-NEXT:    [[CMP1:%.*]] = icmp slt i32 [[A:%.*]], 10
@@ -1080,12 +1080,12 @@ define void @nabs1(i32 %a, i1* %p) {
 ; CHECK-NEXT:    [[SUB:%.*]] = sub nsw i32 0, [[A]]
 ; CHECK-NEXT:    [[CMP:%.*]] = icmp sgt i32 [[A]], 0
 ; CHECK-NEXT:    [[NABS:%.*]] = select i1 [[CMP]], i32 [[SUB]], i32 [[A]]
-; CHECK-NEXT:    store i1 true, i1* [[P:%.*]], align 1
+; CHECK-NEXT:    store i1 true, ptr [[P:%.*]], align 1
 ; CHECK-NEXT:    [[C2:%.*]] = icmp sgt i32 [[NABS]], -19
-; CHECK-NEXT:    store i1 [[C2]], i1* [[P]], align 1
-; CHECK-NEXT:    store i1 true, i1* [[P]], align 1
+; CHECK-NEXT:    store i1 [[C2]], ptr [[P]], align 1
+; CHECK-NEXT:    store i1 true, ptr [[P]], align 1
 ; CHECK-NEXT:    [[C4:%.*]] = icmp sle i32 [[NABS]], -1
-; CHECK-NEXT:    store i1 [[C4]], i1* [[P]], align 1
+; CHECK-NEXT:    store i1 [[C4]], ptr [[P]], align 1
 ; CHECK-NEXT:    br label [[EXIT]]
 ; CHECK:       exit:
 ; CHECK-NEXT:    ret void
@@ -1101,20 +1101,20 @@ guard:
   %cmp = icmp sgt i32 %a, 0
   %nabs = select i1 %cmp, i32 %sub, i32 %a
   %c1 = icmp sgt i32 %nabs, -20
-  store i1 %c1, i1* %p
+  store i1 %c1, ptr %p
   %c2 = icmp sgt i32 %nabs, -19
-  store i1 %c2, i1* %p
+  store i1 %c2, ptr %p
   %c3 = icmp sle i32 %nabs, 0
-  store i1 %c3, i1* %p
+  store i1 %c3, ptr %p
   %c4 = icmp sle i32 %nabs, -1
-  store i1 %c4, i1* %p
+  store i1 %c4, ptr %p
   br label %exit
 
 exit:
   ret void
 }
 
-define void @nabs2(i32 %a, i1* %p) {
+define void @nabs2(i32 %a, ptr %p) {
 ; CHECK-LABEL: @nabs2(
 ; CHECK-NEXT:  entry:
 ; CHECK-NEXT:    [[CMP1:%.*]] = icmp slt i32 [[A:%.*]], 10
@@ -1125,12 +1125,12 @@ define void @nabs2(i32 %a, i1* %p) {
 ; CHECK-NEXT:    [[SUB:%.*]] = sub nsw i32 0, [[A]]
 ; CHECK-NEXT:    [[CMP:%.*]] = icmp slt i32 [[A]], 0
 ; CHECK-NEXT:    [[NABS:%.*]] = select i1 [[CMP]], i32 [[A]], i32 [[SUB]]
-; CHECK-NEXT:    store i1 true, i1* [[P:%.*]], align 1
+; CHECK-NEXT:    store i1 true, ptr [[P:%.*]], align 1
 ; CHECK-NEXT:    [[C2:%.*]] = icmp sgt i32 [[NABS]], -19
-; CHECK-NEXT:    store i1 [[C2]], i1* [[P]], align 1
-; CHECK-NEXT:    store i1 true, i1* [[P]], align 1
+; CHECK-NEXT:    store i1 [[C2]], ptr [[P]], align 1
+; CHECK-NEXT:    store i1 true, ptr [[P]], align 1
 ; CHECK-NEXT:    [[C4:%.*]] = icmp sle i32 [[NABS]], -1
-; CHECK-NEXT:    store i1 [[C4]], i1* [[P]], align 1
+; CHECK-NEXT:    store i1 [[C4]], ptr [[P]], align 1
 ; CHECK-NEXT:    br label [[EXIT]]
 ; CHECK:       exit:
 ; CHECK-NEXT:    ret void
@@ -1146,13 +1146,13 @@ guard:
   %cmp = icmp slt i32 %a, 0
   %nabs = select i1 %cmp, i32 %a, i32 %sub
   %c1 = icmp sgt i32 %nabs, -20
-  store i1 %c1, i1* %p
+  store i1 %c1, ptr %p
   %c2 = icmp sgt i32 %nabs, -19
-  store i1 %c2, i1* %p
+  store i1 %c2, ptr %p
   %c3 = icmp sle i32 %nabs, 0
-  store i1 %c3, i1* %p
+  store i1 %c3, ptr %p
   %c4 = icmp sle i32 %nabs, -1
-  store i1 %c4, i1* %p
+  store i1 %c4, ptr %p
   br label %exit
 
 exit:
@@ -1185,28 +1185,28 @@ entry:
   ret i1 %cmp
 }
 
-define void @trunc_icmp_ule(i32 %x, i1* %p) {
+define void @trunc_icmp_ule(i32 %x, ptr %p) {
 ; CHECK-LABEL: @trunc_icmp_ule(
 ; CHECK-NEXT:    [[T:%.*]] = trunc i32 [[X:%.*]] to i8
 ; CHECK-NEXT:    [[C:%.*]] = icmp uge i8 [[T]], 5
 ; CHECK-NEXT:    br i1 [[C]], label [[TRUE:%.*]], label [[FALSE:%.*]]
 ; CHECK:       true:
-; CHECK-NEXT:    store i1 true, i1* [[P:%.*]], align 1
+; CHECK-NEXT:    store i1 true, ptr [[P:%.*]], align 1
 ; CHECK-NEXT:    [[C2:%.*]] = icmp ugt i32 [[X]], 5
-; CHECK-NEXT:    store i1 [[C2]], i1* [[P]], align 1
+; CHECK-NEXT:    store i1 [[C2]], ptr [[P]], align 1
 ; CHECK-NEXT:    [[C3:%.*]] = icmp ule i32 [[X]], 5
-; CHECK-NEXT:    store i1 [[C3]], i1* [[P]], align 1
-; CHECK-NEXT:    store i1 false, i1* [[P]], align 1
+; CHECK-NEXT:    store i1 [[C3]], ptr [[P]], align 1
+; CHECK-NEXT:    store i1 false, ptr [[P]], align 1
 ; CHECK-NEXT:    ret void
 ; CHECK:       false:
 ; CHECK-NEXT:    [[C1_2:%.*]] = icmp uge i32 [[X]], 5
-; CHECK-NEXT:    store i1 [[C1_2]], i1* [[P]], align 1
+; CHECK-NEXT:    store i1 [[C1_2]], ptr [[P]], align 1
 ; CHECK-NEXT:    [[C2_2:%.*]] = icmp ugt i32 [[X]], 5
-; CHECK-NEXT:    store i1 [[C2_2]], i1* [[P]], align 1
+; CHECK-NEXT:    store i1 [[C2_2]], ptr [[P]], align 1
 ; CHECK-NEXT:    [[C3_2:%.*]] = icmp ule i32 [[X]], 5
-; CHECK-NEXT:    store i1 [[C3_2]], i1* [[P]], align 1
+; CHECK-NEXT:    store i1 [[C3_2]], ptr [[P]], align 1
 ; CHECK-NEXT:    [[C4_2:%.*]] = icmp ult i32 [[X]], 5
-; CHECK-NEXT:    store i1 [[C4_2]], i1* [[P]], align 1
+; CHECK-NEXT:    store i1 [[C4_2]], ptr [[P]], align 1
 ; CHECK-NEXT:    ret void
 ;
   %t = trunc i32 %x to i8
@@ -1215,49 +1215,49 @@ define void @trunc_icmp_ule(i32 %x, i1* %p) {
 
 true:
   %c1 = icmp uge i32 %x, 5
-  store i1 %c1, i1* %p
+  store i1 %c1, ptr %p
   %c2 = icmp ugt i32 %x, 5
-  store i1 %c2, i1* %p
+  store i1 %c2, ptr %p
   %c3 = icmp ule i32 %x, 5
-  store i1 %c3, i1* %p
+  store i1 %c3, ptr %p
   %c4 = icmp ult i32 %x, 5
-  store i1 %c4, i1* %p
+  store i1 %c4, ptr %p
   ret void
 
 false:
   %c1.2 = icmp uge i32 %x, 5
-  store i1 %c1.2, i1* %p
+  store i1 %c1.2, ptr %p
   %c2.2 = icmp ugt i32 %x, 5
-  store i1 %c2.2, i1* %p
+  store i1 %c2.2, ptr %p
   %c3.2 = icmp ule i32 %x, 5
-  store i1 %c3.2, i1* %p
+  store i1 %c3.2, ptr %p
   %c4.2 = icmp ult i32 %x, 5
-  store i1 %c4.2, i1* %p
+  store i1 %c4.2, ptr %p
   ret void
 }
 
-define void @trunc_icmp_eq(i32 %x, i1* %p) {
+define void @trunc_icmp_eq(i32 %x, ptr %p) {
 ; CHECK-LABEL: @trunc_icmp_eq(
 ; CHECK-NEXT:    [[T:%.*]] = trunc i32 [[X:%.*]] to i8
 ; CHECK-NEXT:    [[C:%.*]] = icmp eq i8 [[T]], 5
 ; CHECK-NEXT:    br i1 [[C]], label [[TRUE:%.*]], label [[FALSE:%.*]]
 ; CHECK:       true:
-; CHECK-NEXT:    store i1 true, i1* [[P:%.*]], align 1
+; CHECK-NEXT:    store i1 true, ptr [[P:%.*]], align 1
 ; CHECK-NEXT:    [[C2:%.*]] = icmp ugt i32 [[X]], 5
-; CHECK-NEXT:    store i1 [[C2]], i1* [[P]], align 1
+; CHECK-NEXT:    store i1 [[C2]], ptr [[P]], align 1
 ; CHECK-NEXT:    [[C3:%.*]] = icmp ule i32 [[X]], 5
-; CHECK-NEXT:    store i1 [[C3]], i1* [[P]], align 1
-; CHECK-NEXT:    store i1 false, i1* [[P]], align 1
+; CHECK-NEXT:    store i1 [[C3]], ptr [[P]], align 1
+; CHECK-NEXT:    store i1 false, ptr [[P]], align 1
 ; CHECK-NEXT:    ret void
 ; CHECK:       false:
 ; CHECK-NEXT:    [[C1_2:%.*]] = icmp uge i32 [[X]], 5
-; CHECK-NEXT:    store i1 [[C1_2]], i1* [[P]], align 1
+; CHECK-NEXT:    store i1 [[C1_2]], ptr [[P]], align 1
 ; CHECK-NEXT:    [[C2_2:%.*]] = icmp ugt i32 [[X]], 5
-; CHECK-NEXT:    store i1 [[C2_2]], i1* [[P]], align 1
+; CHECK-NEXT:    store i1 [[C2_2]], ptr [[P]], align 1
 ; CHECK-NEXT:    [[C3_2:%.*]] = icmp ule i32 [[X]], 5
-; CHECK-NEXT:    store i1 [[C3_2]], i1* [[P]], align 1
+; CHECK-NEXT:    store i1 [[C3_2]], ptr [[P]], align 1
 ; CHECK-NEXT:    [[C4_2:%.*]] = icmp ult i32 [[X]], 5
-; CHECK-NEXT:    store i1 [[C4_2]], i1* [[P]], align 1
+; CHECK-NEXT:    store i1 [[C4_2]], ptr [[P]], align 1
 ; CHECK-NEXT:    ret void
 ;
   %t = trunc i32 %x to i8
@@ -1266,24 +1266,24 @@ define void @trunc_icmp_eq(i32 %x, i1* %p) {
 
 true:
   %c1 = icmp uge i32 %x, 5
-  store i1 %c1, i1* %p
+  store i1 %c1, ptr %p
   %c2 = icmp ugt i32 %x, 5
-  store i1 %c2, i1* %p
+  store i1 %c2, ptr %p
   %c3 = icmp ule i32 %x, 5
-  store i1 %c3, i1* %p
+  store i1 %c3, ptr %p
   %c4 = icmp ult i32 %x, 5
-  store i1 %c4, i1* %p
+  store i1 %c4, ptr %p
   ret void
 
 false:
   %c1.2 = icmp uge i32 %x, 5
-  store i1 %c1.2, i1* %p
+  store i1 %c1.2, ptr %p
   %c2.2 = icmp ugt i32 %x, 5
-  store i1 %c2.2, i1* %p
+  store i1 %c2.2, ptr %p
   %c3.2 = icmp ule i32 %x, 5
-  store i1 %c3.2, i1* %p
+  store i1 %c3.2, ptr %p
   %c4.2 = icmp ult i32 %x, 5
-  store i1 %c4.2, i1* %p
+  store i1 %c4.2, ptr %p
   ret void
 }
 
@@ -1302,15 +1302,15 @@ entry:
   ret i1 %cmp
 }
 
-define i1 @bitcast_unknown2(i8* %p) {
+define i1 @bitcast_unknown2(ptr %p) {
 ; CHECK-LABEL: @bitcast_unknown2(
 ; CHECK-NEXT:  entry:
-; CHECK-NEXT:    [[P64:%.*]] = ptrtoint i8* [[P:%.*]] to i64
+; CHECK-NEXT:    [[P64:%.*]] = ptrtoint ptr [[P:%.*]] to i64
 ; CHECK-NEXT:    [[CMP:%.*]] = icmp sle i64 [[P64]], 128
 ; CHECK-NEXT:    ret i1 [[CMP]]
 ;
 entry:
-  %p64 = ptrtoint i8* %p to i64
+  %p64 = ptrtoint ptr %p to i64
   %cmp = icmp sle i64 %p64, 128
   ret i1 %cmp
 }
@@ -1482,7 +1482,7 @@ exit2:
   ret i1 %cmp2
 }
 
-define void @select_and(i32 %a, i1* %p) {
+define void @select_and(i32 %a, ptr %p) {
 ; CHECK-LABEL: @select_and(
 ; CHECK-NEXT:  entry:
 ; CHECK-NEXT:    [[CMP1:%.*]] = icmp sgt i32 [[A:%.*]], -10
@@ -1490,8 +1490,8 @@ define void @select_and(i32 %a, i1* %p) {
 ; CHECK-NEXT:    [[AND:%.*]] = select i1 [[CMP1]], i1 [[CMP2]], i1 false
 ; CHECK-NEXT:    br i1 [[AND]], label [[GUARD:%.*]], label [[EXIT:%.*]]
 ; CHECK:       guard:
-; CHECK-NEXT:    store i1 false, i1* [[P:%.*]], align 1
-; CHECK-NEXT:    store i1 false, i1* [[P]], align 1
+; CHECK-NEXT:    store i1 false, ptr [[P:%.*]], align 1
+; CHECK-NEXT:    store i1 false, ptr [[P]], align 1
 ; CHECK-NEXT:    br label [[EXIT]]
 ; CHECK:       exit:
 ; CHECK-NEXT:    ret void
@@ -1504,16 +1504,16 @@ entry:
 
 guard:
   %c1 = icmp sgt i32 %a, 20
-  store i1 %c1, i1* %p
+  store i1 %c1, ptr %p
   %c2 = icmp slt i32 %a, -20
-  store i1 %c2, i1* %p
+  store i1 %c2, ptr %p
   br label %exit
 
 exit:
   ret void
 }
 
-define void @select_and_wrong_const(i32 %a, i1* %p) {
+define void @select_and_wrong_const(i32 %a, ptr %p) {
 ; CHECK-LABEL: @select_and_wrong_const(
 ; CHECK-NEXT:  entry:
 ; CHECK-NEXT:    [[CMP1:%.*]] = icmp sgt i32 [[A:%.*]], -10
@@ -1522,9 +1522,9 @@ define void @select_and_wrong_const(i32 %a, i1* %p) {
 ; CHECK-NEXT:    br i1 [[AND]], label [[GUARD:%.*]], label [[EXIT:%.*]]
 ; CHECK:       guard:
 ; CHECK-NEXT:    [[C1:%.*]] = icmp sgt i32 [[A]], 20
-; CHECK-NEXT:    store i1 [[C1]], i1* [[P:%.*]], align 1
+; CHECK-NEXT:    store i1 [[C1]], ptr [[P:%.*]], align 1
 ; CHECK-NEXT:    [[C2:%.*]] = icmp slt i32 [[A]], -20
-; CHECK-NEXT:    store i1 [[C2]], i1* [[P]], align 1
+; CHECK-NEXT:    store i1 [[C2]], ptr [[P]], align 1
 ; CHECK-NEXT:    br label [[EXIT]]
 ; CHECK:       exit:
 ; CHECK-NEXT:    ret void
@@ -1537,16 +1537,16 @@ entry:
 
 guard:
   %c1 = icmp sgt i32 %a, 20
-  store i1 %c1, i1* %p
+  store i1 %c1, ptr %p
   %c2 = icmp slt i32 %a, -20
-  store i1 %c2, i1* %p
+  store i1 %c2, ptr %p
   br label %exit
 
 exit:
   ret void
 }
 
-define void @select_and_wrong_operand(i32 %a, i1* %p) {
+define void @select_and_wrong_operand(i32 %a, ptr %p) {
 ; CHECK-LABEL: @select_and_wrong_operand(
 ; CHECK-NEXT:  entry:
 ; CHECK-NEXT:    [[CMP1:%.*]] = icmp sgt i32 [[A:%.*]], -10
@@ -1555,9 +1555,9 @@ define void @select_and_wrong_operand(i32 %a, i1* %p) {
 ; CHECK-NEXT:    br i1 [[AND]], label [[GUARD:%.*]], label [[EXIT:%.*]]
 ; CHECK:       guard:
 ; CHECK-NEXT:    [[C1:%.*]] = icmp sgt i32 [[A]], 20
-; CHECK-NEXT:    store i1 [[C1]], i1* [[P:%.*]], align 1
+; CHECK-NEXT:    store i1 [[C1]], ptr [[P:%.*]], align 1
 ; CHECK-NEXT:    [[C2:%.*]] = icmp slt i32 [[A]], -20
-; CHECK-NEXT:    store i1 [[C2]], i1* [[P]], align 1
+; CHECK-NEXT:    store i1 [[C2]], ptr [[P]], align 1
 ; CHECK-NEXT:    br label [[EXIT]]
 ; CHECK:       exit:
 ; CHECK-NEXT:    ret void
@@ -1570,16 +1570,16 @@ entry:
 
 guard:
   %c1 = icmp sgt i32 %a, 20
-  store i1 %c1, i1* %p
+  store i1 %c1, ptr %p
   %c2 = icmp slt i32 %a, -20
-  store i1 %c2, i1* %p
+  store i1 %c2, ptr %p
   br label %exit
 
 exit:
   ret void
 }
 
-define void @select_or(i32 %a, i1* %p) {
+define void @select_or(i32 %a, ptr %p) {
 ; CHECK-LABEL: @select_or(
 ; CHECK-NEXT:  entry:
 ; CHECK-NEXT:    [[CMP1:%.*]] = icmp slt i32 [[A:%.*]], -10
@@ -1587,8 +1587,8 @@ define void @select_or(i32 %a, i1* %p) {
 ; CHECK-NEXT:    [[OR:%.*]] = select i1 [[CMP1]], i1 true, i1 [[CMP2]]
 ; CHECK-NEXT:    br i1 [[OR]], label [[EXIT:%.*]], label [[GUARD:%.*]]
 ; CHECK:       guard:
-; CHECK-NEXT:    store i1 false, i1* [[P:%.*]], align 1
-; CHECK-NEXT:    store i1 false, i1* [[P]], align 1
+; CHECK-NEXT:    store i1 false, ptr [[P:%.*]], align 1
+; CHECK-NEXT:    store i1 false, ptr [[P]], align 1
 ; CHECK-NEXT:    br label [[EXIT]]
 ; CHECK:       exit:
 ; CHECK-NEXT:    ret void
@@ -1601,16 +1601,16 @@ entry:
 
 guard:
   %c1 = icmp sgt i32 %a, 20
-  store i1 %c1, i1* %p
+  store i1 %c1, ptr %p
   %c2 = icmp slt i32 %a, -20
-  store i1 %c2, i1* %p
+  store i1 %c2, ptr %p
   br label %exit
 
 exit:
   ret void
 }
 
-define void @select_or_wrong_const(i32 %a, i1* %p) {
+define void @select_or_wrong_const(i32 %a, ptr %p) {
 ; CHECK-LABEL: @select_or_wrong_const(
 ; CHECK-NEXT:  entry:
 ; CHECK-NEXT:    [[CMP1:%.*]] = icmp slt i32 [[A:%.*]], -10
@@ -1619,9 +1619,9 @@ define void @select_or_wrong_const(i32 %a, i1* %p) {
 ; CHECK-NEXT:    br i1 [[OR]], label [[EXIT:%.*]], label [[GUARD:%.*]]
 ; CHECK:       guard:
 ; CHECK-NEXT:    [[C1:%.*]] = icmp sgt i32 [[A]], 20
-; CHECK-NEXT:    store i1 [[C1]], i1* [[P:%.*]], align 1
+; CHECK-NEXT:    store i1 [[C1]], ptr [[P:%.*]], align 1
 ; CHECK-NEXT:    [[C2:%.*]] = icmp slt i32 [[A]], -20
-; CHECK-NEXT:    store i1 [[C2]], i1* [[P]], align 1
+; CHECK-NEXT:    store i1 [[C2]], ptr [[P]], align 1
 ; CHECK-NEXT:    br label [[EXIT]]
 ; CHECK:       exit:
 ; CHECK-NEXT:    ret void
@@ -1634,16 +1634,16 @@ entry:
 
 guard:
   %c1 = icmp sgt i32 %a, 20
-  store i1 %c1, i1* %p
+  store i1 %c1, ptr %p
   %c2 = icmp slt i32 %a, -20
-  store i1 %c2, i1* %p
+  store i1 %c2, ptr %p
   br label %exit
 
 exit:
   ret void
 }
 
-define void @select_or_wrong_operand(i32 %a, i1* %p) {
+define void @select_or_wrong_operand(i32 %a, ptr %p) {
 ; CHECK-LABEL: @select_or_wrong_operand(
 ; CHECK-NEXT:  entry:
 ; CHECK-NEXT:    [[CMP1:%.*]] = icmp slt i32 [[A:%.*]], -10
@@ -1652,9 +1652,9 @@ define void @select_or_wrong_operand(i32 %a, i1* %p) {
 ; CHECK-NEXT:    br i1 [[OR]], label [[EXIT:%.*]], label [[GUARD:%.*]]
 ; CHECK:       guard:
 ; CHECK-NEXT:    [[C1:%.*]] = icmp sgt i32 [[A]], 20
-; CHECK-NEXT:    store i1 [[C1]], i1* [[P:%.*]], align 1
+; CHECK-NEXT:    store i1 [[C1]], ptr [[P:%.*]], align 1
 ; CHECK-NEXT:    [[C2:%.*]] = icmp slt i32 [[A]], -20
-; CHECK-NEXT:    store i1 [[C2]], i1* [[P]], align 1
+; CHECK-NEXT:    store i1 [[C2]], ptr [[P]], align 1
 ; CHECK-NEXT:    br label [[EXIT]]
 ; CHECK:       exit:
 ; CHECK-NEXT:    ret void
@@ -1667,30 +1667,30 @@ entry:
 
 guard:
   %c1 = icmp sgt i32 %a, 20
-  store i1 %c1, i1* %p
+  store i1 %c1, ptr %p
   %c2 = icmp slt i32 %a, -20
-  store i1 %c2, i1* %p
+  store i1 %c2, ptr %p
   br label %exit
 
 exit:
   ret void
 }
 
-define void @or_union(i32 %a, i1* %p) {
+define void @or_union(i32 %a, ptr %p) {
 ; CHECK-LABEL: @or_union(
 ; CHECK-NEXT:    [[CMP1:%.*]] = icmp eq i32 [[A:%.*]], 10
 ; CHECK-NEXT:    [[CMP2:%.*]] = icmp eq i32 [[A]], 12
 ; CHECK-NEXT:    [[OR:%.*]] = or i1 [[CMP1]], [[CMP2]]
 ; CHECK-NEXT:    br i1 [[OR]], label [[GUARD:%.*]], label [[EXIT:%.*]]
 ; CHECK:       guard:
-; CHECK-NEXT:    store i1 false, i1* [[P:%.*]], align 1
+; CHECK-NEXT:    store i1 false, ptr [[P:%.*]], align 1
 ; CHECK-NEXT:    [[C2:%.*]] = icmp eq i32 [[A]], 10
-; CHECK-NEXT:    store i1 [[C2]], i1* [[P]], align 1
+; CHECK-NEXT:    store i1 [[C2]], ptr [[P]], align 1
 ; CHECK-NEXT:    [[C3:%.*]] = icmp eq i32 [[A]], 11
-; CHECK-NEXT:    store i1 [[C3]], i1* [[P]], align 1
+; CHECK-NEXT:    store i1 [[C3]], ptr [[P]], align 1
 ; CHECK-NEXT:    [[C4:%.*]] = icmp eq i32 [[A]], 12
-; CHECK-NEXT:    store i1 [[C4]], i1* [[P]], align 1
-; CHECK-NEXT:    store i1 false, i1* [[P]], align 1
+; CHECK-NEXT:    store i1 [[C4]], ptr [[P]], align 1
+; CHECK-NEXT:    store i1 false, ptr [[P]], align 1
 ; CHECK-NEXT:    br label [[EXIT]]
 ; CHECK:       exit:
 ; CHECK-NEXT:    ret void
@@ -1702,15 +1702,15 @@ define void @or_union(i32 %a, i1* %p) {
 
 guard:
   %c1 = icmp eq i32 %a, 9
-  store i1 %c1, i1* %p
+  store i1 %c1, ptr %p
   %c2 = icmp eq i32 %a, 10
-  store i1 %c2, i1* %p
+  store i1 %c2, ptr %p
   %c3 = icmp eq i32 %a, 11
-  store i1 %c3, i1* %p
+  store i1 %c3, ptr %p
   %c4 = icmp eq i32 %a, 12
-  store i1 %c4, i1* %p
+  store i1 %c4, ptr %p
   %c5 = icmp eq i32 %a, 13
-  store i1 %c5, i1* %p
+  store i1 %c5, ptr %p
   br label %exit
 
 exit:
@@ -1740,21 +1740,21 @@ exit:
   ret i1 false
 }
 
-define void @and_union(i32 %a, i1* %p) {
+define void @and_union(i32 %a, ptr %p) {
 ; CHECK-LABEL: @and_union(
 ; CHECK-NEXT:    [[CMP1:%.*]] = icmp ne i32 [[A:%.*]], 10
 ; CHECK-NEXT:    [[CMP2:%.*]] = icmp ne i32 [[A]], 12
 ; CHECK-NEXT:    [[AND:%.*]] = and i1 [[CMP1]], [[CMP2]]
 ; CHECK-NEXT:    br i1 [[AND]], label [[EXIT:%.*]], label [[GUARD:%.*]]
 ; CHECK:       guard:
-; CHECK-NEXT:    store i1 false, i1* [[P:%.*]], align 1
+; CHECK-NEXT:    store i1 false, ptr [[P:%.*]], align 1
 ; CHECK-NEXT:    [[C2:%.*]] = icmp eq i32 [[A]], 10
-; CHECK-NEXT:    store i1 [[C2]], i1* [[P]], align 1
+; CHECK-NEXT:    store i1 [[C2]], ptr [[P]], align 1
 ; CHECK-NEXT:    [[C3:%.*]] = icmp eq i32 [[A]], 11
-; CHECK-NEXT:    store i1 [[C3]], i1* [[P]], align 1
+; CHECK-NEXT:    store i1 [[C3]], ptr [[P]], align 1
 ; CHECK-NEXT:    [[C4:%.*]] = icmp eq i32 [[A]], 12
-; CHECK-NEXT:    store i1 [[C4]], i1* [[P]], align 1
-; CHECK-NEXT:    store i1 false, i1* [[P]], align 1
+; CHECK-NEXT:    store i1 [[C4]], ptr [[P]], align 1
+; CHECK-NEXT:    store i1 false, ptr [[P]], align 1
 ; CHECK-NEXT:    br label [[EXIT]]
 ; CHECK:       exit:
 ; CHECK-NEXT:    ret void
@@ -1766,15 +1766,15 @@ define void @and_union(i32 %a, i1* %p) {
 
 guard:
   %c1 = icmp eq i32 %a, 9
-  store i1 %c1, i1* %p
+  store i1 %c1, ptr %p
   %c2 = icmp eq i32 %a, 10
-  store i1 %c2, i1* %p
+  store i1 %c2, ptr %p
   %c3 = icmp eq i32 %a, 11
-  store i1 %c3, i1* %p
+  store i1 %c3, ptr %p
   %c4 = icmp eq i32 %a, 12
-  store i1 %c4, i1* %p
+  store i1 %c4, ptr %p
   %c5 = icmp eq i32 %a, 13
-  store i1 %c5, i1* %p
+  store i1 %c5, ptr %p
   br label %exit
 
 exit:
@@ -1804,7 +1804,7 @@ exit:
   ret i1 false
 }
 
-define void @select_assume(i32 %a, i32 %b, i1 %c, i1* %p) {
+define void @select_assume(i32 %a, i32 %b, i1 %c, ptr %p) {
 ; CHECK-LABEL: @select_assume(
 ; CHECK-NEXT:    [[C1:%.*]] = icmp ult i32 [[A:%.*]], 10
 ; CHECK-NEXT:    call void @llvm.assume(i1 [[C1]])
@@ -1812,8 +1812,8 @@ define void @select_assume(i32 %a, i32 %b, i1 %c, i1* %p) {
 ; CHECK-NEXT:    call void @llvm.assume(i1 [[C2]])
 ; CHECK-NEXT:    [[S:%.*]] = select i1 [[C:%.*]], i32 [[A]], i32 [[B]]
 ; CHECK-NEXT:    [[C3:%.*]] = icmp ult i32 [[S]], 19
-; CHECK-NEXT:    store i1 [[C3]], i1* [[P:%.*]], align 1
-; CHECK-NEXT:    store i1 true, i1* [[P]], align 1
+; CHECK-NEXT:    store i1 [[C3]], ptr [[P:%.*]], align 1
+; CHECK-NEXT:    store i1 true, ptr [[P]], align 1
 ; CHECK-NEXT:    ret void
 ;
   %c1 = icmp ult i32 %a, 10
@@ -1822,34 +1822,34 @@ define void @select_assume(i32 %a, i32 %b, i1 %c, i1* %p) {
   call void @llvm.assume(i1 %c2)
   %s = select i1 %c, i32 %a, i32 %b
   %c3 = icmp ult i32 %s, 19
-  store i1 %c3, i1* %p
+  store i1 %c3, ptr %p
   %c4 = icmp ult i32 %s, 20
-  store i1 %c4, i1* %p
+  store i1 %c4, ptr %p
   ret void
 }
 
-define void @xor(i8 %a, i1* %p) {
+define void @xor(i8 %a, ptr %p) {
 ; CHECK-LABEL: @xor(
 ; CHECK-NEXT:    [[A_MASK:%.*]] = and i8 [[A:%.*]], 15
 ; CHECK-NEXT:    [[XOR:%.*]] = xor i8 [[A_MASK]], -86
-; CHECK-NEXT:    store i1 true, i1* [[P:%.*]], align 1
+; CHECK-NEXT:    store i1 true, ptr [[P:%.*]], align 1
 ; CHECK-NEXT:    [[C2:%.*]] = icmp ugt i8 [[XOR]], -96
-; CHECK-NEXT:    store i1 [[C2]], i1* [[P]], align 1
-; CHECK-NEXT:    store i1 true, i1* [[P]], align 1
+; CHECK-NEXT:    store i1 [[C2]], ptr [[P]], align 1
+; CHECK-NEXT:    store i1 true, ptr [[P]], align 1
 ; CHECK-NEXT:    [[C4:%.*]] = icmp ult i8 [[XOR]], -81
-; CHECK-NEXT:    store i1 [[C4]], i1* [[P]], align 1
+; CHECK-NEXT:    store i1 [[C4]], ptr [[P]], align 1
 ; CHECK-NEXT:    ret void
 ;
   %a.mask = and i8 %a, 15 ; 0b0000????
   %xor = xor i8 %a.mask, 170 ; ^ 0b10101010 == 0b1010????
   %c1 = icmp uge i8 %xor, 160
-  store i1 %c1, i1* %p
+  store i1 %c1, ptr %p
   %c2 = icmp ugt i8 %xor, 160
-  store i1 %c2, i1* %p
+  store i1 %c2, ptr %p
   %c3 = icmp ule i8 %xor, 175
-  store i1 %c3, i1* %p
+  store i1 %c3, ptr %p
   %c4 = icmp ult i8 %xor, 175
-  store i1 %c4, i1* %p
+  store i1 %c4, ptr %p
   ret void
 }
 

diff  --git a/llvm/test/Transforms/CorrelatedValuePropagation/deopt.ll b/llvm/test/Transforms/CorrelatedValuePropagation/deopt.ll
index d5f72d8ab5141..96cc6c1750312 100644
--- a/llvm/test/Transforms/CorrelatedValuePropagation/deopt.ll
+++ b/llvm/test/Transforms/CorrelatedValuePropagation/deopt.ll
@@ -2,7 +2,7 @@
 ; RUN: opt -passes=correlated-propagation -S < %s | FileCheck %s
 
 declare void @use()
-declare void @use_ptr(i8*)
+declare void @use_ptr(ptr)
 
 ; test requires a mix of context sensative refinement, and analysis
 ; of the originating IR pattern.  Neither part is enough in isolation.
@@ -144,12 +144,12 @@ untaken:
 }
 
 
-define void @test5(i64 %a, i8* nonnull %p) {
+define void @test5(i64 %a, ptr nonnull %p) {
 ; CHECK-LABEL: @test5(
 ; CHECK-NEXT:    [[CMP:%.*]] = icmp eq i64 [[A:%.*]], 0
 ; CHECK-NEXT:    br i1 [[CMP]], label [[TAKEN:%.*]], label [[UNTAKEN:%.*]]
 ; CHECK:       taken:
-; CHECK-NEXT:    call void @use_ptr(i8* nonnull [[P:%.*]]) [ "deopt"(i64 0) ]
+; CHECK-NEXT:    call void @use_ptr(ptr nonnull [[P:%.*]]) [ "deopt"(i64 0) ]
 ; CHECK-NEXT:    ret void
 ; CHECK:       untaken:
 ; CHECK-NEXT:    ret void
@@ -157,7 +157,7 @@ define void @test5(i64 %a, i8* nonnull %p) {
   %cmp = icmp eq i64 %a, 0
   br i1 %cmp, label %taken, label %untaken
 taken:
-  call void @use_ptr(i8* %p) ["deopt" (i64 %a)]
+  call void @use_ptr(ptr %p) ["deopt" (i64 %a)]
   ret void
 untaken:
   ret void

diff  --git a/llvm/test/Transforms/CorrelatedValuePropagation/icmp.ll b/llvm/test/Transforms/CorrelatedValuePropagation/icmp.ll
index 506aac79358f6..c4f0ade39942a 100644
--- a/llvm/test/Transforms/CorrelatedValuePropagation/icmp.ll
+++ b/llvm/test/Transforms/CorrelatedValuePropagation/icmp.ll
@@ -350,18 +350,18 @@ define i1 @test12(i32 %x) {
   ret i1 %cmp
 }
 
-define i1 @test13(i8 %x, i64* %p) {
+define i1 @test13(i8 %x, ptr %p) {
 ; CHECK-LABEL: @test13(
 ; CHECK-NEXT:    [[ZEXT:%.*]] = zext i8 [[X:%.*]] to i64
 ; CHECK-NEXT:    [[ADD:%.*]] = add nuw nsw i64 [[ZEXT]], 128
-; CHECK-NEXT:    store i64 [[ADD]], i64* [[P:%.*]], align 8
+; CHECK-NEXT:    store i64 [[ADD]], ptr [[P:%.*]], align 8
 ; CHECK-NEXT:    ret i1 true
 ;
   %zext = zext i8 %x to i64
   %add = add nuw nsw i64 %zext, 128
   %cmp = icmp ult i64 %add, 384
   ; Without this extra use, InstSimplify could handle this
-  store i64 %add, i64* %p
+  store i64 %add, ptr %p
   ret i1 %cmp
 }
 

diff  --git a/llvm/test/Transforms/CorrelatedValuePropagation/minmaxabs.ll b/llvm/test/Transforms/CorrelatedValuePropagation/minmaxabs.ll
index cb0d5f7963136..bd8497c9634ca 100644
--- a/llvm/test/Transforms/CorrelatedValuePropagation/minmaxabs.ll
+++ b/llvm/test/Transforms/CorrelatedValuePropagation/minmaxabs.ll
@@ -72,9 +72,9 @@ define void @test_smax(i32 %x) {
   ret void
 }
 
-define void @test_abs1(i32* %p) {
+define void @test_abs1(ptr %p) {
 ; CHECK-LABEL: @test_abs1(
-; CHECK-NEXT:    [[X:%.*]] = load i32, i32* [[P:%.*]], align 4, !range [[RNG0:![0-9]+]]
+; CHECK-NEXT:    [[X:%.*]] = load i32, ptr [[P:%.*]], align 4, !range [[RNG0:![0-9]+]]
 ; CHECK-NEXT:    [[A:%.*]] = call i32 @llvm.abs.i32(i32 [[X]], i1 true)
 ; CHECK-NEXT:    call void @use(i1 true)
 ; CHECK-NEXT:    [[C2:%.*]] = icmp ult i32 [[A]], 15

diff  --git a/llvm/test/Transforms/CorrelatedValuePropagation/overflow_predicate.ll b/llvm/test/Transforms/CorrelatedValuePropagation/overflow_predicate.ll
index e6d6b7c17a929..75f66c5a89e7e 100644
--- a/llvm/test/Transforms/CorrelatedValuePropagation/overflow_predicate.ll
+++ b/llvm/test/Transforms/CorrelatedValuePropagation/overflow_predicate.ll
@@ -9,16 +9,16 @@ declare {i8, i1} @llvm.ssub.with.overflow(i8, i8)
 declare {i8, i1} @llvm.umul.with.overflow(i8, i8)
 declare {i8, i1} @llvm.smul.with.overflow(i8, i8)
 
-define i1 @uadd_ov_false(i8 %x, i8* %px, i1* %pc) {
+define i1 @uadd_ov_false(i8 %x, ptr %px, ptr %pc) {
 ; CHECK-LABEL: @uadd_ov_false(
 ; CHECK-NEXT:    [[VAL_OV:%.*]] = call { i8, i1 } @llvm.uadd.with.overflow.i8(i8 [[X:%.*]], i8 100)
 ; CHECK-NEXT:    [[VAL:%.*]] = extractvalue { i8, i1 } [[VAL_OV]], 0
-; CHECK-NEXT:    store i8 [[VAL]], i8* [[PX:%.*]], align 1
+; CHECK-NEXT:    store i8 [[VAL]], ptr [[PX:%.*]], align 1
 ; CHECK-NEXT:    [[OV:%.*]] = extractvalue { i8, i1 } [[VAL_OV]], 1
 ; CHECK-NEXT:    br i1 [[OV]], label [[TRAP:%.*]], label [[NO_OVERFLOW:%.*]]
 ; CHECK:       no_overflow:
 ; CHECK-NEXT:    [[C1:%.*]] = icmp ugt i8 [[X]], -102
-; CHECK-NEXT:    store i1 [[C1]], i1* [[PC:%.*]], align 1
+; CHECK-NEXT:    store i1 [[C1]], ptr [[PC:%.*]], align 1
 ; CHECK-NEXT:    ret i1 false
 ; CHECK:       trap:
 ; CHECK-NEXT:    call void @llvm.trap()
@@ -26,13 +26,13 @@ define i1 @uadd_ov_false(i8 %x, i8* %px, i1* %pc) {
 ;
   %val_ov = call {i8, i1} @llvm.uadd.with.overflow(i8 %x, i8 100)
   %val = extractvalue {i8, i1} %val_ov, 0
-  store i8 %val, i8* %px
+  store i8 %val, ptr %px
   %ov = extractvalue {i8, i1} %val_ov, 1
   br i1 %ov, label %trap, label %no_overflow
 
 no_overflow:
   %c1 = icmp ugt i8 %x, 154
-  store i1 %c1, i1* %pc
+  store i1 %c1, ptr %pc
   %c2 = icmp ugt i8 %x, 155
   ret i1 %c2
 
@@ -41,16 +41,16 @@ trap:
   unreachable
 }
 
-define i1 @uadd_ov_true(i8 %x, i8* %px, i1* %pc) {
+define i1 @uadd_ov_true(i8 %x, ptr %px, ptr %pc) {
 ; CHECK-LABEL: @uadd_ov_true(
 ; CHECK-NEXT:    [[VAL_OV:%.*]] = call { i8, i1 } @llvm.uadd.with.overflow.i8(i8 [[X:%.*]], i8 100)
 ; CHECK-NEXT:    [[VAL:%.*]] = extractvalue { i8, i1 } [[VAL_OV]], 0
-; CHECK-NEXT:    store i8 [[VAL]], i8* [[PX:%.*]], align 1
+; CHECK-NEXT:    store i8 [[VAL]], ptr [[PX:%.*]], align 1
 ; CHECK-NEXT:    [[OV:%.*]] = extractvalue { i8, i1 } [[VAL_OV]], 1
 ; CHECK-NEXT:    br i1 [[OV]], label [[OVERFLOW:%.*]], label [[TRAP:%.*]]
 ; CHECK:       overflow:
 ; CHECK-NEXT:    [[C1:%.*]] = icmp ugt i8 [[X]], -100
-; CHECK-NEXT:    store i1 [[C1]], i1* [[PC:%.*]], align 1
+; CHECK-NEXT:    store i1 [[C1]], ptr [[PC:%.*]], align 1
 ; CHECK-NEXT:    ret i1 true
 ; CHECK:       trap:
 ; CHECK-NEXT:    call void @llvm.trap()
@@ -58,13 +58,13 @@ define i1 @uadd_ov_true(i8 %x, i8* %px, i1* %pc) {
 ;
   %val_ov = call {i8, i1} @llvm.uadd.with.overflow(i8 %x, i8 100)
   %val = extractvalue {i8, i1} %val_ov, 0
-  store i8 %val, i8* %px
+  store i8 %val, ptr %px
   %ov = extractvalue {i8, i1} %val_ov, 1
   br i1 %ov, label %overflow, label %trap
 
 overflow:
   %c1 = icmp ugt i8 %x, 156
-  store i1 %c1, i1* %pc
+  store i1 %c1, ptr %pc
   %c2 = icmp ugt i8 %x, 155
   ret i1 %c2
 
@@ -73,16 +73,16 @@ trap:
   unreachable
 }
 
-define i1 @sadd_ov_false(i8 %x, i8* %px, i1* %pc) {
+define i1 @sadd_ov_false(i8 %x, ptr %px, ptr %pc) {
 ; CHECK-LABEL: @sadd_ov_false(
 ; CHECK-NEXT:    [[VAL_OV:%.*]] = call { i8, i1 } @llvm.sadd.with.overflow.i8(i8 [[X:%.*]], i8 100)
 ; CHECK-NEXT:    [[VAL:%.*]] = extractvalue { i8, i1 } [[VAL_OV]], 0
-; CHECK-NEXT:    store i8 [[VAL]], i8* [[PX:%.*]], align 1
+; CHECK-NEXT:    store i8 [[VAL]], ptr [[PX:%.*]], align 1
 ; CHECK-NEXT:    [[OV:%.*]] = extractvalue { i8, i1 } [[VAL_OV]], 1
 ; CHECK-NEXT:    br i1 [[OV]], label [[TRAP:%.*]], label [[NO_OVERFLOW:%.*]]
 ; CHECK:       no_overflow:
 ; CHECK-NEXT:    [[C1:%.*]] = icmp sgt i8 [[X]], 26
-; CHECK-NEXT:    store i1 [[C1]], i1* [[PC:%.*]], align 1
+; CHECK-NEXT:    store i1 [[C1]], ptr [[PC:%.*]], align 1
 ; CHECK-NEXT:    ret i1 false
 ; CHECK:       trap:
 ; CHECK-NEXT:    call void @llvm.trap()
@@ -90,13 +90,13 @@ define i1 @sadd_ov_false(i8 %x, i8* %px, i1* %pc) {
 ;
   %val_ov = call {i8, i1} @llvm.sadd.with.overflow(i8 %x, i8 100)
   %val = extractvalue {i8, i1} %val_ov, 0
-  store i8 %val, i8* %px
+  store i8 %val, ptr %px
   %ov = extractvalue {i8, i1} %val_ov, 1
   br i1 %ov, label %trap, label %no_overflow
 
 no_overflow:
   %c1 = icmp sgt i8 %x, 26
-  store i1 %c1, i1* %pc
+  store i1 %c1, ptr %pc
   %c2 = icmp sgt i8 %x, 27
   ret i1 %c2
 
@@ -105,16 +105,16 @@ trap:
   unreachable
 }
 
-define i1 @sadd_ov_true(i8 %x, i8* %px, i1* %pc) {
+define i1 @sadd_ov_true(i8 %x, ptr %px, ptr %pc) {
 ; CHECK-LABEL: @sadd_ov_true(
 ; CHECK-NEXT:    [[VAL_OV:%.*]] = call { i8, i1 } @llvm.sadd.with.overflow.i8(i8 [[X:%.*]], i8 100)
 ; CHECK-NEXT:    [[VAL:%.*]] = extractvalue { i8, i1 } [[VAL_OV]], 0
-; CHECK-NEXT:    store i8 [[VAL]], i8* [[PX:%.*]], align 1
+; CHECK-NEXT:    store i8 [[VAL]], ptr [[PX:%.*]], align 1
 ; CHECK-NEXT:    [[OV:%.*]] = extractvalue { i8, i1 } [[VAL_OV]], 1
 ; CHECK-NEXT:    br i1 [[OV]], label [[OVERFLOW:%.*]], label [[TRAP:%.*]]
 ; CHECK:       overflow:
 ; CHECK-NEXT:    [[C1:%.*]] = icmp ugt i8 [[X]], 28
-; CHECK-NEXT:    store i1 [[C1]], i1* [[PC:%.*]], align 1
+; CHECK-NEXT:    store i1 [[C1]], ptr [[PC:%.*]], align 1
 ; CHECK-NEXT:    ret i1 true
 ; CHECK:       trap:
 ; CHECK-NEXT:    call void @llvm.trap()
@@ -122,13 +122,13 @@ define i1 @sadd_ov_true(i8 %x, i8* %px, i1* %pc) {
 ;
   %val_ov = call {i8, i1} @llvm.sadd.with.overflow(i8 %x, i8 100)
   %val = extractvalue {i8, i1} %val_ov, 0
-  store i8 %val, i8* %px
+  store i8 %val, ptr %px
   %ov = extractvalue {i8, i1} %val_ov, 1
   br i1 %ov, label %overflow, label %trap
 
 overflow:
   %c1 = icmp sgt i8 %x, 28
-  store i1 %c1, i1* %pc
+  store i1 %c1, ptr %pc
   %c2 = icmp sgt i8 %x, 27
   ret i1 %c2
 
@@ -137,16 +137,16 @@ trap:
   unreachable
 }
 
-define i1 @usub_ov_false(i8 %x, i8* %px, i1* %pc) {
+define i1 @usub_ov_false(i8 %x, ptr %px, ptr %pc) {
 ; CHECK-LABEL: @usub_ov_false(
 ; CHECK-NEXT:    [[VAL_OV:%.*]] = call { i8, i1 } @llvm.usub.with.overflow.i8(i8 [[X:%.*]], i8 100)
 ; CHECK-NEXT:    [[VAL:%.*]] = extractvalue { i8, i1 } [[VAL_OV]], 0
-; CHECK-NEXT:    store i8 [[VAL]], i8* [[PX:%.*]], align 1
+; CHECK-NEXT:    store i8 [[VAL]], ptr [[PX:%.*]], align 1
 ; CHECK-NEXT:    [[OV:%.*]] = extractvalue { i8, i1 } [[VAL_OV]], 1
 ; CHECK-NEXT:    br i1 [[OV]], label [[TRAP:%.*]], label [[NO_OVERFLOW:%.*]]
 ; CHECK:       no_overflow:
 ; CHECK-NEXT:    [[C1:%.*]] = icmp ult i8 [[X]], 101
-; CHECK-NEXT:    store i1 [[C1]], i1* [[PC:%.*]], align 1
+; CHECK-NEXT:    store i1 [[C1]], ptr [[PC:%.*]], align 1
 ; CHECK-NEXT:    ret i1 false
 ; CHECK:       trap:
 ; CHECK-NEXT:    call void @llvm.trap()
@@ -154,13 +154,13 @@ define i1 @usub_ov_false(i8 %x, i8* %px, i1* %pc) {
 ;
   %val_ov = call {i8, i1} @llvm.usub.with.overflow(i8 %x, i8 100)
   %val = extractvalue {i8, i1} %val_ov, 0
-  store i8 %val, i8* %px
+  store i8 %val, ptr %px
   %ov = extractvalue {i8, i1} %val_ov, 1
   br i1 %ov, label %trap, label %no_overflow
 
 no_overflow:
   %c1 = icmp ult i8 %x, 101
-  store i1 %c1, i1* %pc
+  store i1 %c1, ptr %pc
   %c2 = icmp ult i8 %x, 100
   ret i1 %c2
 
@@ -169,16 +169,16 @@ trap:
   unreachable
 }
 
-define i1 @usub_ov_true(i8 %x, i8* %px, i1* %pc) {
+define i1 @usub_ov_true(i8 %x, ptr %px, ptr %pc) {
 ; CHECK-LABEL: @usub_ov_true(
 ; CHECK-NEXT:    [[VAL_OV:%.*]] = call { i8, i1 } @llvm.usub.with.overflow.i8(i8 [[X:%.*]], i8 100)
 ; CHECK-NEXT:    [[VAL:%.*]] = extractvalue { i8, i1 } [[VAL_OV]], 0
-; CHECK-NEXT:    store i8 [[VAL]], i8* [[PX:%.*]], align 1
+; CHECK-NEXT:    store i8 [[VAL]], ptr [[PX:%.*]], align 1
 ; CHECK-NEXT:    [[OV:%.*]] = extractvalue { i8, i1 } [[VAL_OV]], 1
 ; CHECK-NEXT:    br i1 [[OV]], label [[OVERFLOW:%.*]], label [[TRAP:%.*]]
 ; CHECK:       overflow:
 ; CHECK-NEXT:    [[C1:%.*]] = icmp ult i8 [[X]], 99
-; CHECK-NEXT:    store i1 [[C1]], i1* [[PC:%.*]], align 1
+; CHECK-NEXT:    store i1 [[C1]], ptr [[PC:%.*]], align 1
 ; CHECK-NEXT:    ret i1 true
 ; CHECK:       trap:
 ; CHECK-NEXT:    call void @llvm.trap()
@@ -186,13 +186,13 @@ define i1 @usub_ov_true(i8 %x, i8* %px, i1* %pc) {
 ;
   %val_ov = call {i8, i1} @llvm.usub.with.overflow(i8 %x, i8 100)
   %val = extractvalue {i8, i1} %val_ov, 0
-  store i8 %val, i8* %px
+  store i8 %val, ptr %px
   %ov = extractvalue {i8, i1} %val_ov, 1
   br i1 %ov, label %overflow, label %trap
 
 overflow:
   %c1 = icmp ult i8 %x, 99
-  store i1 %c1, i1* %pc
+  store i1 %c1, ptr %pc
   %c2 = icmp ult i8 %x, 100
   ret i1 %c2
 
@@ -201,16 +201,16 @@ trap:
   unreachable
 }
 
-define i1 @ssub_ov_false(i8 %x, i8* %px, i1* %pc) {
+define i1 @ssub_ov_false(i8 %x, ptr %px, ptr %pc) {
 ; CHECK-LABEL: @ssub_ov_false(
 ; CHECK-NEXT:    [[VAL_OV:%.*]] = call { i8, i1 } @llvm.ssub.with.overflow.i8(i8 [[X:%.*]], i8 100)
 ; CHECK-NEXT:    [[VAL:%.*]] = extractvalue { i8, i1 } [[VAL_OV]], 0
-; CHECK-NEXT:    store i8 [[VAL]], i8* [[PX:%.*]], align 1
+; CHECK-NEXT:    store i8 [[VAL]], ptr [[PX:%.*]], align 1
 ; CHECK-NEXT:    [[OV:%.*]] = extractvalue { i8, i1 } [[VAL_OV]], 1
 ; CHECK-NEXT:    br i1 [[OV]], label [[TRAP:%.*]], label [[NO_OVERFLOW:%.*]]
 ; CHECK:       no_overflow:
 ; CHECK-NEXT:    [[C1:%.*]] = icmp slt i8 [[X]], -27
-; CHECK-NEXT:    store i1 [[C1]], i1* [[PC:%.*]], align 1
+; CHECK-NEXT:    store i1 [[C1]], ptr [[PC:%.*]], align 1
 ; CHECK-NEXT:    ret i1 false
 ; CHECK:       trap:
 ; CHECK-NEXT:    call void @llvm.trap()
@@ -218,13 +218,13 @@ define i1 @ssub_ov_false(i8 %x, i8* %px, i1* %pc) {
 ;
   %val_ov = call {i8, i1} @llvm.ssub.with.overflow(i8 %x, i8 100)
   %val = extractvalue {i8, i1} %val_ov, 0
-  store i8 %val, i8* %px
+  store i8 %val, ptr %px
   %ov = extractvalue {i8, i1} %val_ov, 1
   br i1 %ov, label %trap, label %no_overflow
 
 no_overflow:
   %c1 = icmp slt i8 %x, -27
-  store i1 %c1, i1* %pc
+  store i1 %c1, ptr %pc
   %c2 = icmp slt i8 %x, -28
   ret i1 %c2
 
@@ -233,16 +233,16 @@ trap:
   unreachable
 }
 
-define i1 @ssub_ov_true(i8 %x, i8* %px, i1* %pc) {
+define i1 @ssub_ov_true(i8 %x, ptr %px, ptr %pc) {
 ; CHECK-LABEL: @ssub_ov_true(
 ; CHECK-NEXT:    [[VAL_OV:%.*]] = call { i8, i1 } @llvm.ssub.with.overflow.i8(i8 [[X:%.*]], i8 100)
 ; CHECK-NEXT:    [[VAL:%.*]] = extractvalue { i8, i1 } [[VAL_OV]], 0
-; CHECK-NEXT:    store i8 [[VAL]], i8* [[PX:%.*]], align 1
+; CHECK-NEXT:    store i8 [[VAL]], ptr [[PX:%.*]], align 1
 ; CHECK-NEXT:    [[OV:%.*]] = extractvalue { i8, i1 } [[VAL_OV]], 1
 ; CHECK-NEXT:    br i1 [[OV]], label [[OVERFLOW:%.*]], label [[TRAP:%.*]]
 ; CHECK:       overflow:
 ; CHECK-NEXT:    [[C1:%.*]] = icmp ult i8 [[X]], -29
-; CHECK-NEXT:    store i1 [[C1]], i1* [[PC:%.*]], align 1
+; CHECK-NEXT:    store i1 [[C1]], ptr [[PC:%.*]], align 1
 ; CHECK-NEXT:    ret i1 true
 ; CHECK:       trap:
 ; CHECK-NEXT:    call void @llvm.trap()
@@ -250,13 +250,13 @@ define i1 @ssub_ov_true(i8 %x, i8* %px, i1* %pc) {
 ;
   %val_ov = call {i8, i1} @llvm.ssub.with.overflow(i8 %x, i8 100)
   %val = extractvalue {i8, i1} %val_ov, 0
-  store i8 %val, i8* %px
+  store i8 %val, ptr %px
   %ov = extractvalue {i8, i1} %val_ov, 1
   br i1 %ov, label %overflow, label %trap
 
 overflow:
   %c1 = icmp slt i8 %x, -29
-  store i1 %c1, i1* %pc
+  store i1 %c1, ptr %pc
   %c2 = icmp slt i8 %x, -28
   ret i1 %c2
 
@@ -265,16 +265,16 @@ trap:
   unreachable
 }
 
-define i1 @umul_ov_false(i8 %x, i8* %px, i1* %pc) {
+define i1 @umul_ov_false(i8 %x, ptr %px, ptr %pc) {
 ; CHECK-LABEL: @umul_ov_false(
 ; CHECK-NEXT:    [[VAL_OV:%.*]] = call { i8, i1 } @llvm.umul.with.overflow.i8(i8 [[X:%.*]], i8 10)
 ; CHECK-NEXT:    [[VAL:%.*]] = extractvalue { i8, i1 } [[VAL_OV]], 0
-; CHECK-NEXT:    store i8 [[VAL]], i8* [[PX:%.*]], align 1
+; CHECK-NEXT:    store i8 [[VAL]], ptr [[PX:%.*]], align 1
 ; CHECK-NEXT:    [[OV:%.*]] = extractvalue { i8, i1 } [[VAL_OV]], 1
 ; CHECK-NEXT:    br i1 [[OV]], label [[TRAP:%.*]], label [[NO_OVERFLOW:%.*]]
 ; CHECK:       no_overflow:
 ; CHECK-NEXT:    [[C1:%.*]] = icmp ugt i8 [[X]], 24
-; CHECK-NEXT:    store i1 [[C1]], i1* [[PC:%.*]], align 1
+; CHECK-NEXT:    store i1 [[C1]], ptr [[PC:%.*]], align 1
 ; CHECK-NEXT:    ret i1 false
 ; CHECK:       trap:
 ; CHECK-NEXT:    call void @llvm.trap()
@@ -282,13 +282,13 @@ define i1 @umul_ov_false(i8 %x, i8* %px, i1* %pc) {
 ;
   %val_ov = call {i8, i1} @llvm.umul.with.overflow(i8 %x, i8 10)
   %val = extractvalue {i8, i1} %val_ov, 0
-  store i8 %val, i8* %px
+  store i8 %val, ptr %px
   %ov = extractvalue {i8, i1} %val_ov, 1
   br i1 %ov, label %trap, label %no_overflow
 
 no_overflow:
   %c1 = icmp ugt i8 %x, 24
-  store i1 %c1, i1* %pc
+  store i1 %c1, ptr %pc
   %c2 = icmp ugt i8 %x, 25
   ret i1 %c2
 
@@ -297,16 +297,16 @@ trap:
   unreachable
 }
 
-define i1 @umul_ov_true(i8 %x, i8* %px, i1* %pc) {
+define i1 @umul_ov_true(i8 %x, ptr %px, ptr %pc) {
 ; CHECK-LABEL: @umul_ov_true(
 ; CHECK-NEXT:    [[VAL_OV:%.*]] = call { i8, i1 } @llvm.umul.with.overflow.i8(i8 [[X:%.*]], i8 10)
 ; CHECK-NEXT:    [[VAL:%.*]] = extractvalue { i8, i1 } [[VAL_OV]], 0
-; CHECK-NEXT:    store i8 [[VAL]], i8* [[PX:%.*]], align 1
+; CHECK-NEXT:    store i8 [[VAL]], ptr [[PX:%.*]], align 1
 ; CHECK-NEXT:    [[OV:%.*]] = extractvalue { i8, i1 } [[VAL_OV]], 1
 ; CHECK-NEXT:    br i1 [[OV]], label [[OVERFLOW:%.*]], label [[TRAP:%.*]]
 ; CHECK:       overflow:
 ; CHECK-NEXT:    [[C1:%.*]] = icmp ugt i8 [[X]], 26
-; CHECK-NEXT:    store i1 [[C1]], i1* [[PC:%.*]], align 1
+; CHECK-NEXT:    store i1 [[C1]], ptr [[PC:%.*]], align 1
 ; CHECK-NEXT:    ret i1 true
 ; CHECK:       trap:
 ; CHECK-NEXT:    call void @llvm.trap()
@@ -314,13 +314,13 @@ define i1 @umul_ov_true(i8 %x, i8* %px, i1* %pc) {
 ;
   %val_ov = call {i8, i1} @llvm.umul.with.overflow(i8 %x, i8 10)
   %val = extractvalue {i8, i1} %val_ov, 0
-  store i8 %val, i8* %px
+  store i8 %val, ptr %px
   %ov = extractvalue {i8, i1} %val_ov, 1
   br i1 %ov, label %overflow, label %trap
 
 overflow:
   %c1 = icmp ugt i8 %x, 26
-  store i1 %c1, i1* %pc
+  store i1 %c1, ptr %pc
   %c2 = icmp ugt i8 %x, 25
   ret i1 %c2
 
@@ -330,16 +330,16 @@ trap:
 }
 
 ; Signed mul is constrained from both sides.
-define i1 @smul_ov_false_bound1(i8 %x, i8* %px, i1* %pc) {
+define i1 @smul_ov_false_bound1(i8 %x, ptr %px, ptr %pc) {
 ; CHECK-LABEL: @smul_ov_false_bound1(
 ; CHECK-NEXT:    [[VAL_OV:%.*]] = call { i8, i1 } @llvm.smul.with.overflow.i8(i8 [[X:%.*]], i8 10)
 ; CHECK-NEXT:    [[VAL:%.*]] = extractvalue { i8, i1 } [[VAL_OV]], 0
-; CHECK-NEXT:    store i8 [[VAL]], i8* [[PX:%.*]], align 1
+; CHECK-NEXT:    store i8 [[VAL]], ptr [[PX:%.*]], align 1
 ; CHECK-NEXT:    [[OV:%.*]] = extractvalue { i8, i1 } [[VAL_OV]], 1
 ; CHECK-NEXT:    br i1 [[OV]], label [[TRAP:%.*]], label [[NO_OVERFLOW:%.*]]
 ; CHECK:       no_overflow:
 ; CHECK-NEXT:    [[C1:%.*]] = icmp slt i8 [[X]], -11
-; CHECK-NEXT:    store i1 [[C1]], i1* [[PC:%.*]], align 1
+; CHECK-NEXT:    store i1 [[C1]], ptr [[PC:%.*]], align 1
 ; CHECK-NEXT:    ret i1 false
 ; CHECK:       trap:
 ; CHECK-NEXT:    call void @llvm.trap()
@@ -347,13 +347,13 @@ define i1 @smul_ov_false_bound1(i8 %x, i8* %px, i1* %pc) {
 ;
   %val_ov = call {i8, i1} @llvm.smul.with.overflow(i8 %x, i8 10)
   %val = extractvalue {i8, i1} %val_ov, 0
-  store i8 %val, i8* %px
+  store i8 %val, ptr %px
   %ov = extractvalue {i8, i1} %val_ov, 1
   br i1 %ov, label %trap, label %no_overflow
 
 no_overflow:
   %c1 = icmp slt i8 %x, -11
-  store i1 %c1, i1* %pc
+  store i1 %c1, ptr %pc
   %c2 = icmp slt i8 %x, -12
   ret i1 %c2
 
@@ -362,16 +362,16 @@ trap:
   unreachable
 }
 
-define i1 @smul_ov_false_bound2(i8 %x, i8* %px, i1* %pc) {
+define i1 @smul_ov_false_bound2(i8 %x, ptr %px, ptr %pc) {
 ; CHECK-LABEL: @smul_ov_false_bound2(
 ; CHECK-NEXT:    [[VAL_OV:%.*]] = call { i8, i1 } @llvm.smul.with.overflow.i8(i8 [[X:%.*]], i8 10)
 ; CHECK-NEXT:    [[VAL:%.*]] = extractvalue { i8, i1 } [[VAL_OV]], 0
-; CHECK-NEXT:    store i8 [[VAL]], i8* [[PX:%.*]], align 1
+; CHECK-NEXT:    store i8 [[VAL]], ptr [[PX:%.*]], align 1
 ; CHECK-NEXT:    [[OV:%.*]] = extractvalue { i8, i1 } [[VAL_OV]], 1
 ; CHECK-NEXT:    br i1 [[OV]], label [[TRAP:%.*]], label [[NO_OVERFLOW:%.*]]
 ; CHECK:       no_overflow:
 ; CHECK-NEXT:    [[C1:%.*]] = icmp sgt i8 [[X]], 11
-; CHECK-NEXT:    store i1 [[C1]], i1* [[PC:%.*]], align 1
+; CHECK-NEXT:    store i1 [[C1]], ptr [[PC:%.*]], align 1
 ; CHECK-NEXT:    ret i1 false
 ; CHECK:       trap:
 ; CHECK-NEXT:    call void @llvm.trap()
@@ -379,13 +379,13 @@ define i1 @smul_ov_false_bound2(i8 %x, i8* %px, i1* %pc) {
 ;
   %val_ov = call {i8, i1} @llvm.smul.with.overflow(i8 %x, i8 10)
   %val = extractvalue {i8, i1} %val_ov, 0
-  store i8 %val, i8* %px
+  store i8 %val, ptr %px
   %ov = extractvalue {i8, i1} %val_ov, 1
   br i1 %ov, label %trap, label %no_overflow
 
 no_overflow:
   %c1 = icmp sgt i8 %x, 11
-  store i1 %c1, i1* %pc
+  store i1 %c1, ptr %pc
   %c2 = icmp sgt i8 %x, 12
   ret i1 %c2
 
@@ -395,16 +395,16 @@ trap:
 }
 
 ; Can't use slt/sgt to test for a hole in the range, check equality instead.
-define i1 @smul_ov_true_bound1(i8 %x, i8* %px, i1* %pc) {
+define i1 @smul_ov_true_bound1(i8 %x, ptr %px, ptr %pc) {
 ; CHECK-LABEL: @smul_ov_true_bound1(
 ; CHECK-NEXT:    [[VAL_OV:%.*]] = call { i8, i1 } @llvm.smul.with.overflow.i8(i8 [[X:%.*]], i8 10)
 ; CHECK-NEXT:    [[VAL:%.*]] = extractvalue { i8, i1 } [[VAL_OV]], 0
-; CHECK-NEXT:    store i8 [[VAL]], i8* [[PX:%.*]], align 1
+; CHECK-NEXT:    store i8 [[VAL]], ptr [[PX:%.*]], align 1
 ; CHECK-NEXT:    [[OV:%.*]] = extractvalue { i8, i1 } [[VAL_OV]], 1
 ; CHECK-NEXT:    br i1 [[OV]], label [[OVERFLOW:%.*]], label [[TRAP:%.*]]
 ; CHECK:       overflow:
 ; CHECK-NEXT:    [[C1:%.*]] = icmp eq i8 [[X]], -13
-; CHECK-NEXT:    store i1 [[C1]], i1* [[PC:%.*]], align 1
+; CHECK-NEXT:    store i1 [[C1]], ptr [[PC:%.*]], align 1
 ; CHECK-NEXT:    ret i1 false
 ; CHECK:       trap:
 ; CHECK-NEXT:    call void @llvm.trap()
@@ -412,13 +412,13 @@ define i1 @smul_ov_true_bound1(i8 %x, i8* %px, i1* %pc) {
 ;
   %val_ov = call {i8, i1} @llvm.smul.with.overflow(i8 %x, i8 10)
   %val = extractvalue {i8, i1} %val_ov, 0
-  store i8 %val, i8* %px
+  store i8 %val, ptr %px
   %ov = extractvalue {i8, i1} %val_ov, 1
   br i1 %ov, label %overflow, label %trap
 
 overflow:
   %c1 = icmp eq i8 %x, -13
-  store i1 %c1, i1* %pc
+  store i1 %c1, ptr %pc
   %c2 = icmp eq i8 %x, -12
   ret i1 %c2
 
@@ -427,16 +427,16 @@ trap:
   unreachable
 }
 
-define i1 @smul_ov_true_bound2(i8 %x, i8* %px, i1* %pc) {
+define i1 @smul_ov_true_bound2(i8 %x, ptr %px, ptr %pc) {
 ; CHECK-LABEL: @smul_ov_true_bound2(
 ; CHECK-NEXT:    [[VAL_OV:%.*]] = call { i8, i1 } @llvm.smul.with.overflow.i8(i8 [[X:%.*]], i8 10)
 ; CHECK-NEXT:    [[VAL:%.*]] = extractvalue { i8, i1 } [[VAL_OV]], 0
-; CHECK-NEXT:    store i8 [[VAL]], i8* [[PX:%.*]], align 1
+; CHECK-NEXT:    store i8 [[VAL]], ptr [[PX:%.*]], align 1
 ; CHECK-NEXT:    [[OV:%.*]] = extractvalue { i8, i1 } [[VAL_OV]], 1
 ; CHECK-NEXT:    br i1 [[OV]], label [[OVERFLOW:%.*]], label [[TRAP:%.*]]
 ; CHECK:       overflow:
 ; CHECK-NEXT:    [[C1:%.*]] = icmp eq i8 [[X]], 13
-; CHECK-NEXT:    store i1 [[C1]], i1* [[PC:%.*]], align 1
+; CHECK-NEXT:    store i1 [[C1]], ptr [[PC:%.*]], align 1
 ; CHECK-NEXT:    ret i1 false
 ; CHECK:       trap:
 ; CHECK-NEXT:    call void @llvm.trap()
@@ -444,13 +444,13 @@ define i1 @smul_ov_true_bound2(i8 %x, i8* %px, i1* %pc) {
 ;
   %val_ov = call {i8, i1} @llvm.smul.with.overflow(i8 %x, i8 10)
   %val = extractvalue {i8, i1} %val_ov, 0
-  store i8 %val, i8* %px
+  store i8 %val, ptr %px
   %ov = extractvalue {i8, i1} %val_ov, 1
   br i1 %ov, label %overflow, label %trap
 
 overflow:
   %c1 = icmp eq i8 %x, 13
-  store i1 %c1, i1* %pc
+  store i1 %c1, ptr %pc
   %c2 = icmp eq i8 %x, 12
   ret i1 %c2
 
@@ -459,7 +459,7 @@ trap:
   unreachable
 }
 
-define i1 @uadd_val(i8 %x, i1* %pc) {
+define i1 @uadd_val(i8 %x, ptr %pc) {
 ; CHECK-LABEL: @uadd_val(
 ; CHECK-NEXT:    [[VAL_OV:%.*]] = call { i8, i1 } @llvm.uadd.with.overflow.i8(i8 [[X:%.*]], i8 100)
 ; CHECK-NEXT:    [[OV:%.*]] = extractvalue { i8, i1 } [[VAL_OV]], 1
@@ -467,7 +467,7 @@ define i1 @uadd_val(i8 %x, i1* %pc) {
 ; CHECK:       no_overflow:
 ; CHECK-NEXT:    [[VAL:%.*]] = extractvalue { i8, i1 } [[VAL_OV]], 0
 ; CHECK-NEXT:    [[C1:%.*]] = icmp ugt i8 [[VAL]], 100
-; CHECK-NEXT:    store i1 [[C1]], i1* [[PC:%.*]], align 1
+; CHECK-NEXT:    store i1 [[C1]], ptr [[PC:%.*]], align 1
 ; CHECK-NEXT:    ret i1 true
 ; CHECK:       trap:
 ; CHECK-NEXT:    call void @llvm.trap()
@@ -480,7 +480,7 @@ define i1 @uadd_val(i8 %x, i1* %pc) {
 no_overflow:
   %val = extractvalue {i8, i1} %val_ov, 0
   %c1 = icmp ugt i8 %val, 100
-  store i1 %c1, i1* %pc
+  store i1 %c1, ptr %pc
   %c2 = icmp uge i8 %val, 100
   ret i1 %c2
 
@@ -489,7 +489,7 @@ trap:
   unreachable
 }
 
-define i1 @sadd_val(i8 %x, i1* %pc) {
+define i1 @sadd_val(i8 %x, ptr %pc) {
 ; CHECK-LABEL: @sadd_val(
 ; CHECK-NEXT:    [[VAL_OV:%.*]] = call { i8, i1 } @llvm.sadd.with.overflow.i8(i8 [[X:%.*]], i8 100)
 ; CHECK-NEXT:    [[OV:%.*]] = extractvalue { i8, i1 } [[VAL_OV]], 1
@@ -497,7 +497,7 @@ define i1 @sadd_val(i8 %x, i1* %pc) {
 ; CHECK:       no_overflow:
 ; CHECK-NEXT:    [[VAL:%.*]] = extractvalue { i8, i1 } [[VAL_OV]], 0
 ; CHECK-NEXT:    [[C1:%.*]] = icmp sgt i8 [[VAL]], -28
-; CHECK-NEXT:    store i1 [[C1]], i1* [[PC:%.*]], align 1
+; CHECK-NEXT:    store i1 [[C1]], ptr [[PC:%.*]], align 1
 ; CHECK-NEXT:    ret i1 true
 ; CHECK:       trap:
 ; CHECK-NEXT:    call void @llvm.trap()
@@ -510,7 +510,7 @@ define i1 @sadd_val(i8 %x, i1* %pc) {
 no_overflow:
   %val = extractvalue {i8, i1} %val_ov, 0
   %c1 = icmp sgt i8 %val, -28
-  store i1 %c1, i1* %pc
+  store i1 %c1, ptr %pc
   %c2 = icmp sge i8 %val, -28
   ret i1 %c2
 
@@ -519,7 +519,7 @@ trap:
   unreachable
 }
 
-define i1 @usub_val(i8 %x, i1* %pc) {
+define i1 @usub_val(i8 %x, ptr %pc) {
 ; CHECK-LABEL: @usub_val(
 ; CHECK-NEXT:    [[VAL_OV:%.*]] = call { i8, i1 } @llvm.usub.with.overflow.i8(i8 [[X:%.*]], i8 100)
 ; CHECK-NEXT:    [[OV:%.*]] = extractvalue { i8, i1 } [[VAL_OV]], 1
@@ -527,7 +527,7 @@ define i1 @usub_val(i8 %x, i1* %pc) {
 ; CHECK:       no_overflow:
 ; CHECK-NEXT:    [[VAL:%.*]] = extractvalue { i8, i1 } [[VAL_OV]], 0
 ; CHECK-NEXT:    [[C1:%.*]] = icmp ult i8 [[VAL]], -101
-; CHECK-NEXT:    store i1 [[C1]], i1* [[PC:%.*]], align 1
+; CHECK-NEXT:    store i1 [[C1]], ptr [[PC:%.*]], align 1
 ; CHECK-NEXT:    ret i1 true
 ; CHECK:       trap:
 ; CHECK-NEXT:    call void @llvm.trap()
@@ -540,7 +540,7 @@ define i1 @usub_val(i8 %x, i1* %pc) {
 no_overflow:
   %val = extractvalue {i8, i1} %val_ov, 0
   %c1 = icmp ult i8 %val, 155
-  store i1 %c1, i1* %pc
+  store i1 %c1, ptr %pc
   %c2 = icmp ule i8 %val, 155
   ret i1 %c2
 
@@ -549,7 +549,7 @@ trap:
   unreachable
 }
 
-define i1 @ssub_val(i8 %x, i1* %pc) {
+define i1 @ssub_val(i8 %x, ptr %pc) {
 ; CHECK-LABEL: @ssub_val(
 ; CHECK-NEXT:    [[VAL_OV:%.*]] = call { i8, i1 } @llvm.ssub.with.overflow.i8(i8 [[X:%.*]], i8 100)
 ; CHECK-NEXT:    [[OV:%.*]] = extractvalue { i8, i1 } [[VAL_OV]], 1
@@ -557,7 +557,7 @@ define i1 @ssub_val(i8 %x, i1* %pc) {
 ; CHECK:       no_overflow:
 ; CHECK-NEXT:    [[VAL:%.*]] = extractvalue { i8, i1 } [[VAL_OV]], 0
 ; CHECK-NEXT:    [[C1:%.*]] = icmp slt i8 [[VAL]], 27
-; CHECK-NEXT:    store i1 [[C1]], i1* [[PC:%.*]], align 1
+; CHECK-NEXT:    store i1 [[C1]], ptr [[PC:%.*]], align 1
 ; CHECK-NEXT:    ret i1 true
 ; CHECK:       trap:
 ; CHECK-NEXT:    call void @llvm.trap()
@@ -570,7 +570,7 @@ define i1 @ssub_val(i8 %x, i1* %pc) {
 no_overflow:
   %val = extractvalue {i8, i1} %val_ov, 0
   %c1 = icmp slt i8 %val, 27
-  store i1 %c1, i1* %pc
+  store i1 %c1, ptr %pc
   %c2 = icmp sle i8 %val, 27
   ret i1 %c2
 
@@ -579,7 +579,7 @@ trap:
   unreachable
 }
 
-define i1 @umul_val(i8 %x, i1* %pc) {
+define i1 @umul_val(i8 %x, ptr %pc) {
 ; CHECK-LABEL: @umul_val(
 ; CHECK-NEXT:    [[VAL_OV:%.*]] = call { i8, i1 } @llvm.umul.with.overflow.i8(i8 [[X:%.*]], i8 10)
 ; CHECK-NEXT:    [[OV:%.*]] = extractvalue { i8, i1 } [[VAL_OV]], 1
@@ -587,7 +587,7 @@ define i1 @umul_val(i8 %x, i1* %pc) {
 ; CHECK:       no_overflow:
 ; CHECK-NEXT:    [[VAL:%.*]] = extractvalue { i8, i1 } [[VAL_OV]], 0
 ; CHECK-NEXT:    [[C1:%.*]] = icmp ult i8 [[VAL]], -6
-; CHECK-NEXT:    store i1 [[C1]], i1* [[PC:%.*]], align 1
+; CHECK-NEXT:    store i1 [[C1]], ptr [[PC:%.*]], align 1
 ; CHECK-NEXT:    ret i1 true
 ; CHECK:       trap:
 ; CHECK-NEXT:    call void @llvm.trap()
@@ -600,7 +600,7 @@ define i1 @umul_val(i8 %x, i1* %pc) {
 no_overflow:
   %val = extractvalue {i8, i1} %val_ov, 0
   %c1 = icmp ult i8 %val, 250
-  store i1 %c1, i1* %pc
+  store i1 %c1, ptr %pc
   %c2 = icmp ule i8 %val, 250
   ret i1 %c2
 
@@ -609,7 +609,7 @@ trap:
   unreachable
 }
 
-define i1 @smul_val_bound1(i8 %x, i1* %pc) {
+define i1 @smul_val_bound1(i8 %x, ptr %pc) {
 ; CHECK-LABEL: @smul_val_bound1(
 ; CHECK-NEXT:    [[VAL_OV:%.*]] = call { i8, i1 } @llvm.smul.with.overflow.i8(i8 [[X:%.*]], i8 10)
 ; CHECK-NEXT:    [[OV:%.*]] = extractvalue { i8, i1 } [[VAL_OV]], 1
@@ -617,7 +617,7 @@ define i1 @smul_val_bound1(i8 %x, i1* %pc) {
 ; CHECK:       no_overflow:
 ; CHECK-NEXT:    [[VAL:%.*]] = extractvalue { i8, i1 } [[VAL_OV]], 0
 ; CHECK-NEXT:    [[C1:%.*]] = icmp slt i8 [[VAL]], 120
-; CHECK-NEXT:    store i1 [[C1]], i1* [[PC:%.*]], align 1
+; CHECK-NEXT:    store i1 [[C1]], ptr [[PC:%.*]], align 1
 ; CHECK-NEXT:    ret i1 true
 ; CHECK:       trap:
 ; CHECK-NEXT:    call void @llvm.trap()
@@ -630,7 +630,7 @@ define i1 @smul_val_bound1(i8 %x, i1* %pc) {
 no_overflow:
   %val = extractvalue {i8, i1} %val_ov, 0
   %c1 = icmp slt i8 %val, 120
-  store i1 %c1, i1* %pc
+  store i1 %c1, ptr %pc
   %c2 = icmp sle i8 %val, 120
   ret i1 %c2
 
@@ -639,7 +639,7 @@ trap:
   unreachable
 }
 
-define i1 @smul_val_bound2(i8 %x, i1* %pc) {
+define i1 @smul_val_bound2(i8 %x, ptr %pc) {
 ; CHECK-LABEL: @smul_val_bound2(
 ; CHECK-NEXT:    [[VAL_OV:%.*]] = call { i8, i1 } @llvm.smul.with.overflow.i8(i8 [[X:%.*]], i8 10)
 ; CHECK-NEXT:    [[OV:%.*]] = extractvalue { i8, i1 } [[VAL_OV]], 1
@@ -647,7 +647,7 @@ define i1 @smul_val_bound2(i8 %x, i1* %pc) {
 ; CHECK:       no_overflow:
 ; CHECK-NEXT:    [[VAL:%.*]] = extractvalue { i8, i1 } [[VAL_OV]], 0
 ; CHECK-NEXT:    [[C1:%.*]] = icmp sgt i8 [[VAL]], -120
-; CHECK-NEXT:    store i1 [[C1]], i1* [[PC:%.*]], align 1
+; CHECK-NEXT:    store i1 [[C1]], ptr [[PC:%.*]], align 1
 ; CHECK-NEXT:    ret i1 true
 ; CHECK:       trap:
 ; CHECK-NEXT:    call void @llvm.trap()
@@ -660,7 +660,7 @@ define i1 @smul_val_bound2(i8 %x, i1* %pc) {
 no_overflow:
   %val = extractvalue {i8, i1} %val_ov, 0
   %c1 = icmp sgt i8 %val, -120
-  store i1 %c1, i1* %pc
+  store i1 %c1, ptr %pc
   %c2 = icmp sge i8 %val, -120
   ret i1 %c2
 

diff  --git a/llvm/test/Transforms/CorrelatedValuePropagation/phi-common-val.ll b/llvm/test/Transforms/CorrelatedValuePropagation/phi-common-val.ll
index 261f9b2e9a802..7f102bc1e4fe2 100644
--- a/llvm/test/Transforms/CorrelatedValuePropagation/phi-common-val.ll
+++ b/llvm/test/Transforms/CorrelatedValuePropagation/phi-common-val.ll
@@ -1,63 +1,63 @@
 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
 ; RUN: opt < %s -passes=correlated-propagation -S | FileCheck %s
 
-define i8* @simplify_phi_common_value_op0(i8* %ptr, i32* %b) {
+define ptr @simplify_phi_common_value_op0(ptr %ptr, ptr %b) {
 ; CHECK-LABEL: @simplify_phi_common_value_op0(
 ; CHECK-NEXT:  entry:
-; CHECK-NEXT:    [[ISNULL:%.*]] = icmp eq i8* [[PTR:%.*]], null
+; CHECK-NEXT:    [[ISNULL:%.*]] = icmp eq ptr [[PTR:%.*]], null
 ; CHECK-NEXT:    br i1 [[ISNULL]], label [[RETURN:%.*]], label [[ELSE:%.*]]
 ; CHECK:       else:
-; CHECK-NEXT:    [[LB:%.*]] = load i32, i32* [[B:%.*]], align 4
+; CHECK-NEXT:    [[LB:%.*]] = load i32, ptr [[B:%.*]], align 4
 ; CHECK-NEXT:    [[ADD:%.*]] = add nsw i32 [[LB]], 1
-; CHECK-NEXT:    store i32 [[ADD]], i32* [[B]], align 4
+; CHECK-NEXT:    store i32 [[ADD]], ptr [[B]], align 4
 ; CHECK-NEXT:    br label [[RETURN]]
 ; CHECK:       return:
-; CHECK-NEXT:    ret i8* [[PTR]]
+; CHECK-NEXT:    ret ptr [[PTR]]
 ;
 entry:
-  %isnull = icmp eq i8* %ptr, null
+  %isnull = icmp eq ptr %ptr, null
   br i1 %isnull, label %return, label %else
 
 else:
-  %lb = load i32, i32* %b
+  %lb = load i32, ptr %b
   %add = add nsw i32 %lb, 1
-  store i32 %add, i32* %b
+  store i32 %add, ptr %b
   br label %return
 
 return:
-  %r = phi i8* [ %ptr, %else ], [ null, %entry ]
-  ret i8* %r
+  %r = phi ptr [ %ptr, %else ], [ null, %entry ]
+  ret ptr %r
 }
 
-define i8* @simplify_phi_common_value_op1(i8* %ptr, i32* %b) {
+define ptr @simplify_phi_common_value_op1(ptr %ptr, ptr %b) {
 ; CHECK-LABEL: @simplify_phi_common_value_op1(
 ; CHECK-NEXT:  entry:
-; CHECK-NEXT:    [[ISNULL:%.*]] = icmp eq i8* [[PTR:%.*]], null
+; CHECK-NEXT:    [[ISNULL:%.*]] = icmp eq ptr [[PTR:%.*]], null
 ; CHECK-NEXT:    br i1 [[ISNULL]], label [[RETURN:%.*]], label [[ELSE:%.*]]
 ; CHECK:       else:
-; CHECK-NEXT:    [[LB:%.*]] = load i32, i32* [[B:%.*]], align 4
+; CHECK-NEXT:    [[LB:%.*]] = load i32, ptr [[B:%.*]], align 4
 ; CHECK-NEXT:    [[ADD:%.*]] = add i32 [[LB]], 1
-; CHECK-NEXT:    store i32 [[ADD]], i32* [[B]], align 4
+; CHECK-NEXT:    store i32 [[ADD]], ptr [[B]], align 4
 ; CHECK-NEXT:    br label [[RETURN]]
 ; CHECK:       return:
-; CHECK-NEXT:    ret i8* [[PTR]]
+; CHECK-NEXT:    ret ptr [[PTR]]
 ;
 entry:
-  %isnull = icmp eq i8* %ptr, null
+  %isnull = icmp eq ptr %ptr, null
   br i1 %isnull, label %return, label %else
 
 else:
-  %lb = load i32, i32* %b
+  %lb = load i32, ptr %b
   %add = add i32 %lb, 1
-  store i32 %add, i32* %b
+  store i32 %add, ptr %b
   br label %return
 
 return:
-  %r = phi i8* [ null, %entry], [ %ptr, %else ]
-  ret i8* %r
+  %r = phi ptr [ null, %entry], [ %ptr, %else ]
+  ret ptr %r
 }
 
-define i8 @simplify_phi_multiple_constants(i8 %x, i32* %b) {
+define i8 @simplify_phi_multiple_constants(i8 %x, ptr %b) {
 ; CHECK-LABEL: @simplify_phi_multiple_constants(
 ; CHECK-NEXT:  entry:
 ; CHECK-NEXT:    [[IS0:%.*]] = icmp eq i8 [[X:%.*]], 0
@@ -66,9 +66,9 @@ define i8 @simplify_phi_multiple_constants(i8 %x, i32* %b) {
 ; CHECK-NEXT:    [[IS42:%.*]] = icmp eq i8 [[X]], 42
 ; CHECK-NEXT:    br i1 [[IS42]], label [[RETURN]], label [[ELSE2:%.*]]
 ; CHECK:       else2:
-; CHECK-NEXT:    [[LB:%.*]] = load i32, i32* [[B:%.*]], align 4
+; CHECK-NEXT:    [[LB:%.*]] = load i32, ptr [[B:%.*]], align 4
 ; CHECK-NEXT:    [[ADD:%.*]] = add i32 [[LB]], 1
-; CHECK-NEXT:    store i32 [[ADD]], i32* [[B]], align 4
+; CHECK-NEXT:    store i32 [[ADD]], ptr [[B]], align 4
 ; CHECK-NEXT:    br label [[RETURN]]
 ; CHECK:       return:
 ; CHECK-NEXT:    ret i8 [[X]]
@@ -82,9 +82,9 @@ else1:
   br i1 %is42, label %return, label %else2
 
 else2:
-  %lb = load i32, i32* %b
+  %lb = load i32, ptr %b
   %add = add i32 %lb, 1
-  store i32 %add, i32* %b
+  store i32 %add, ptr %b
   br label %return
 
 return:
@@ -92,34 +92,34 @@ return:
   ret i8 %r
 }
 
-define i8* @simplify_phi_common_value_from_instruction(i8* %ptr_op, i32* %b, i32 %i) {
+define ptr @simplify_phi_common_value_from_instruction(ptr %ptr_op, ptr %b, i32 %i) {
 ; CHECK-LABEL: @simplify_phi_common_value_from_instruction(
 ; CHECK-NEXT:  entry:
-; CHECK-NEXT:    [[PTR:%.*]] = getelementptr i8, i8* [[PTR_OP:%.*]], i32 [[I:%.*]]
-; CHECK-NEXT:    [[ISNULL:%.*]] = icmp eq i8* [[PTR]], null
+; CHECK-NEXT:    [[PTR:%.*]] = getelementptr i8, ptr [[PTR_OP:%.*]], i32 [[I:%.*]]
+; CHECK-NEXT:    [[ISNULL:%.*]] = icmp eq ptr [[PTR]], null
 ; CHECK-NEXT:    br i1 [[ISNULL]], label [[RETURN:%.*]], label [[ELSE:%.*]]
 ; CHECK:       else:
-; CHECK-NEXT:    [[LB:%.*]] = load i32, i32* [[B:%.*]], align 4
+; CHECK-NEXT:    [[LB:%.*]] = load i32, ptr [[B:%.*]], align 4
 ; CHECK-NEXT:    [[ADD:%.*]] = add nsw i32 [[LB]], 1
-; CHECK-NEXT:    store i32 [[ADD]], i32* [[B]], align 4
+; CHECK-NEXT:    store i32 [[ADD]], ptr [[B]], align 4
 ; CHECK-NEXT:    br label [[RETURN]]
 ; CHECK:       return:
-; CHECK-NEXT:    ret i8* [[PTR]]
+; CHECK-NEXT:    ret ptr [[PTR]]
 ;
 entry:
-  %ptr = getelementptr i8, i8* %ptr_op, i32 %i
-  %isnull = icmp eq i8* %ptr, null
+  %ptr = getelementptr i8, ptr %ptr_op, i32 %i
+  %isnull = icmp eq ptr %ptr, null
   br i1 %isnull, label %return, label %else
 
 else:
-  %lb = load i32, i32* %b
+  %lb = load i32, ptr %b
   %add = add nsw i32 %lb, 1
-  store i32 %add, i32* %b
+  store i32 %add, ptr %b
   br label %return
 
 return:
-  %r = phi i8* [ %ptr, %else ], [ null, %entry ]
-  ret i8* %r
+  %r = phi ptr [ %ptr, %else ], [ null, %entry ]
+  ret ptr %r
 }
 
 ; The sub has 'nsw', so it is not safe to propagate that value along

diff  --git a/llvm/test/Transforms/CorrelatedValuePropagation/pointer.ll b/llvm/test/Transforms/CorrelatedValuePropagation/pointer.ll
index b5d2b4da4acae..cf66e71c8c51f 100644
--- a/llvm/test/Transforms/CorrelatedValuePropagation/pointer.ll
+++ b/llvm/test/Transforms/CorrelatedValuePropagation/pointer.ll
@@ -4,17 +4,17 @@
 ; Testcase that checks that we don't end in a neverending recursion resulting in
 ; a segmentation fault. The checks below verify that nothing is changed.
 
-declare dso_local i16* @f2(i16* readnone returned) local_unnamed_addr
+declare dso_local ptr @f2(ptr readnone returned) local_unnamed_addr
 
 define dso_local void @f3() local_unnamed_addr {
 ; CHECK-LABEL: @f3(
 ; CHECK-NEXT:  entry:
 ; CHECK-NEXT:    br label [[FOR_COND:%.*]]
 ; CHECK:       for.end:
-; CHECK-NEXT:    [[CALL6:%.*]] = call i16* @f2(i16* [[CALL6]])
+; CHECK-NEXT:    [[CALL6:%.*]] = call ptr @f2(ptr [[CALL6]])
 ; CHECK-NEXT:    br i1 false, label [[FOR_COND]], label [[FOR_COND3:%.*]]
 ; CHECK:       for.cond:
-; CHECK-NEXT:    [[C_0:%.*]] = phi i16* [ undef, [[ENTRY:%.*]] ], [ [[CALL6]], [[FOR_END:%.*]] ]
+; CHECK-NEXT:    [[C_0:%.*]] = phi ptr [ undef, [[ENTRY:%.*]] ], [ [[CALL6]], [[FOR_END:%.*]] ]
 ; CHECK-NEXT:    br label [[FOR_COND3]]
 ; CHECK:       for.cond3:
 ; CHECK-NEXT:    ret void
@@ -23,11 +23,11 @@ entry:
   br label %for.cond
 
 for.end:
-  %call6 = call i16* @f2(i16* %call6)
+  %call6 = call ptr @f2(ptr %call6)
   br i1 false, label %for.cond, label %for.cond3
 
 for.cond:
-  %c.0 = phi i16* [ undef, %entry ], [ %call6, %for.end ]
+  %c.0 = phi ptr [ undef, %entry ], [ %call6, %for.end ]
   br label %for.cond3
 
 for.cond3:

diff  --git a/llvm/test/Transforms/CorrelatedValuePropagation/range.ll b/llvm/test/Transforms/CorrelatedValuePropagation/range.ll
index 82d88992531fa..435a096a6e1ef 100644
--- a/llvm/test/Transforms/CorrelatedValuePropagation/range.ll
+++ b/llvm/test/Transforms/CorrelatedValuePropagation/range.ll
@@ -238,9 +238,9 @@ sw.default:
   ret i1 false
 }
 
-define i1 @test8(i64* %p) {
+define i1 @test8(ptr %p) {
 ; CHECK-LABEL: @test8(
-; CHECK-NEXT:    [[A:%.*]] = load i64, i64* [[P:%.*]], align 4, !range [[RNG0:![0-9]+]]
+; CHECK-NEXT:    [[A:%.*]] = load i64, ptr [[P:%.*]], align 4, !range [[RNG0:![0-9]+]]
 ; CHECK-NEXT:    ret i1 false
 ;
   %a = load i64, i64* %p, !range !{i64 4, i64 255}
@@ -248,9 +248,9 @@ define i1 @test8(i64* %p) {
   ret i1 %res
 }
 
-define i1 @test9(i64* %p) {
+define i1 @test9(ptr %p) {
 ; CHECK-LABEL: @test9(
-; CHECK-NEXT:    [[A:%.*]] = load i64, i64* [[P:%.*]], align 4, !range [[RNG1:![0-9]+]]
+; CHECK-NEXT:    [[A:%.*]] = load i64, ptr [[P:%.*]], align 4, !range [[RNG1:![0-9]+]]
 ; CHECK-NEXT:    ret i1 true
 ;
   %a = load i64, i64* %p, !range !{i64 0, i64 1}
@@ -258,9 +258,9 @@ define i1 @test9(i64* %p) {
   ret i1 %res
 }
 
-define i1 @test10(i64* %p) {
+define i1 @test10(ptr %p) {
 ; CHECK-LABEL: @test10(
-; CHECK-NEXT:    [[A:%.*]] = load i64, i64* [[P:%.*]], align 4, !range [[RNG2:![0-9]+]]
+; CHECK-NEXT:    [[A:%.*]] = load i64, ptr [[P:%.*]], align 4, !range [[RNG2:![0-9]+]]
 ; CHECK-NEXT:    ret i1 false
 ;
   %a = load i64, i64* %p, !range !{i64 4, i64 8, i64 15, i64 20}
@@ -272,7 +272,7 @@ define i1 @test10(i64* %p) {
 
 define i1 @test11() {
 ; CHECK-LABEL: @test11(
-; CHECK-NEXT:    [[POSITIVE:%.*]] = load i32, i32* @g, align 4, !range [[RNG3:![0-9]+]]
+; CHECK-NEXT:    [[POSITIVE:%.*]] = load i32, ptr @g, align 4, !range [[RNG3:![0-9]+]]
 ; CHECK-NEXT:    [[ADD:%.*]] = add nuw nsw i32 [[POSITIVE]], 1
 ; CHECK-NEXT:    br label [[NEXT:%.*]]
 ; CHECK:       next:
@@ -653,7 +653,7 @@ else:
 @limit = external global i32
 define i1 @test15(i32 %a) {
 ; CHECK-LABEL: @test15(
-; CHECK-NEXT:    [[LIMIT:%.*]] = load i32, i32* @limit, align 4, !range [[RNG4:![0-9]+]]
+; CHECK-NEXT:    [[LIMIT:%.*]] = load i32, ptr @limit, align 4, !range [[RNG4:![0-9]+]]
 ; CHECK-NEXT:    [[CMP:%.*]] = icmp ult i32 [[A:%.*]], [[LIMIT]]
 ; CHECK-NEXT:    br i1 [[CMP]], label [[THEN:%.*]], label [[ELSE:%.*]]
 ; CHECK:       then:

diff  --git a/llvm/test/Transforms/CorrelatedValuePropagation/select.ll b/llvm/test/Transforms/CorrelatedValuePropagation/select.ll
index e7d65ed3e809c..923b6ac427578 100644
--- a/llvm/test/Transforms/CorrelatedValuePropagation/select.ll
+++ b/llvm/test/Transforms/CorrelatedValuePropagation/select.ll
@@ -82,7 +82,7 @@ define i32 @PR23752() {
 ; CHECK-NEXT:  entry:
 ; CHECK-NEXT:    br label [[FOR_BODY:%.*]]
 ; CHECK:       for.body:
-; CHECK-NEXT:    [[SEL:%.*]] = select i1 icmp sgt (i32* @b, i32* @c), i32 0, i32 1
+; CHECK-NEXT:    [[SEL:%.*]] = select i1 icmp sgt (ptr @b, ptr @c), i32 0, i32 1
 ; CHECK-NEXT:    [[CMP:%.*]] = icmp ne i32 [[SEL]], 1
 ; CHECK-NEXT:    br i1 [[CMP]], label [[FOR_BODY]], label [[IF_END:%.*]]
 ; CHECK:       if.end:
@@ -93,7 +93,7 @@ entry:
 
 for.body:
   %phi = phi i32 [ 0, %entry ], [ %sel, %for.body ]
-  %sel = select i1 icmp sgt (i32* @b, i32* @c), i32 %phi, i32 1
+  %sel = select i1 icmp sgt (ptr @b, ptr @c), i32 %phi, i32 1
   %cmp = icmp ne i32 %sel, 1
   br i1 %cmp, label %for.body, label %if.end
 
@@ -102,9 +102,9 @@ if.end:
   ret i32 %sel
 }
 
-define i1 @test1(i32* %p, i1 %unknown) {
+define i1 @test1(ptr %p, i1 %unknown) {
 ; CHECK-LABEL: @test1(
-; CHECK-NEXT:    [[PVAL:%.*]] = load i32, i32* [[P:%.*]], align 4
+; CHECK-NEXT:    [[PVAL:%.*]] = load i32, ptr [[P:%.*]], align 4
 ; CHECK-NEXT:    [[CMP1:%.*]] = icmp slt i32 [[PVAL]], 255
 ; CHECK-NEXT:    br i1 [[CMP1]], label [[NEXT:%.*]], label [[EXIT:%.*]]
 ; CHECK:       next:
@@ -127,9 +127,9 @@ exit:
 }
 
 ; Check that we take a conservative meet
-define i1 @test2(i32* %p, i32 %qval, i1 %unknown) {
+define i1 @test2(ptr %p, i32 %qval, i1 %unknown) {
 ; CHECK-LABEL: @test2(
-; CHECK-NEXT:    [[PVAL:%.*]] = load i32, i32* [[P:%.*]], align 4
+; CHECK-NEXT:    [[PVAL:%.*]] = load i32, ptr [[P:%.*]], align 4
 ; CHECK-NEXT:    [[CMP1:%.*]] = icmp slt i32 [[PVAL]], 255
 ; CHECK-NEXT:    br i1 [[CMP1]], label [[NEXT:%.*]], label [[EXIT:%.*]]
 ; CHECK:       next:
@@ -153,9 +153,9 @@ exit:
 }
 
 ; Same as @test2, but for the opposite select input
-define i1 @test3(i32* %p, i32 %qval, i1 %unknown) {
+define i1 @test3(ptr %p, i32 %qval, i1 %unknown) {
 ; CHECK-LABEL: @test3(
-; CHECK-NEXT:    [[PVAL:%.*]] = load i32, i32* [[P:%.*]], align 4
+; CHECK-NEXT:    [[PVAL:%.*]] = load i32, ptr [[P:%.*]], align 4
 ; CHECK-NEXT:    [[CMP1:%.*]] = icmp slt i32 [[PVAL]], 255
 ; CHECK-NEXT:    br i1 [[CMP1]], label [[NEXT:%.*]], label [[EXIT:%.*]]
 ; CHECK:       next:
@@ -182,9 +182,9 @@ exit:
 ; NOTE: Using doubles in this version is a bit of a hack.  This
 ; is to get around the fact that all integers (including constants
 ; and non-constants) are actually represented as constant-ranges.
-define i1 @test4(i32* %p, i32 %qval, i1 %unknown) {
+define i1 @test4(ptr %p, i32 %qval, i1 %unknown) {
 ; CHECK-LABEL: @test4(
-; CHECK-NEXT:    [[PVAL:%.*]] = load i32, i32* [[P:%.*]], align 4
+; CHECK-NEXT:    [[PVAL:%.*]] = load i32, ptr [[P:%.*]], align 4
 ; CHECK-NEXT:    [[CMP1:%.*]] = icmp slt i32 [[PVAL]], 255
 ; CHECK-NEXT:    br i1 [[CMP1]], label [[NEXT:%.*]], label [[EXIT:%.*]]
 ; CHECK:       next:
@@ -210,9 +210,9 @@ exit:
 ;; Using the condition to clamp the result
 ;;
 
-define i1 @test5(i32* %p, i1 %unknown) {
+define i1 @test5(ptr %p, i1 %unknown) {
 ; CHECK-LABEL: @test5(
-; CHECK-NEXT:    [[PVAL:%.*]] = load i32, i32* [[P:%.*]], align 4
+; CHECK-NEXT:    [[PVAL:%.*]] = load i32, ptr [[P:%.*]], align 4
 ; CHECK-NEXT:    [[CMP1:%.*]] = icmp slt i32 [[PVAL]], 255
 ; CHECK-NEXT:    br i1 [[CMP1]], label [[NEXT:%.*]], label [[EXIT:%.*]]
 ; CHECK:       next:
@@ -236,9 +236,9 @@ exit:
   ret i1 true
 }
 
-define i1 @test6(i32* %p, i1 %unknown) {
+define i1 @test6(ptr %p, i1 %unknown) {
 ; CHECK-LABEL: @test6(
-; CHECK-NEXT:    [[PVAL:%.*]] = load i32, i32* [[P:%.*]], align 4
+; CHECK-NEXT:    [[PVAL:%.*]] = load i32, ptr [[P:%.*]], align 4
 ; CHECK-NEXT:    [[CMP1:%.*]] = icmp ult i32 [[PVAL]], 255
 ; CHECK-NEXT:    br i1 [[CMP1]], label [[NEXT:%.*]], label [[EXIT:%.*]]
 ; CHECK:       next:

diff  --git a/llvm/test/Transforms/CorrelatedValuePropagation/srem.ll b/llvm/test/Transforms/CorrelatedValuePropagation/srem.ll
index 5f6facd85f9d1..bc2b0aec269b9 100644
--- a/llvm/test/Transforms/CorrelatedValuePropagation/srem.ll
+++ b/llvm/test/Transforms/CorrelatedValuePropagation/srem.ll
@@ -4,14 +4,14 @@
 target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
 target triple = "thumbv7m-arm-none-eabi"
 
-define void @h(i32* nocapture %p, i32 %x) local_unnamed_addr #0 {
+define void @h(ptr nocapture %p, i32 %x) local_unnamed_addr #0 {
 ; CHECK-LABEL: @h(
 ; CHECK-NEXT:  entry:
 ; CHECK-NEXT:    [[CMP:%.*]] = icmp sgt i32 [[X:%.*]], 0
 ; CHECK-NEXT:    br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
 ; CHECK:       if.then:
 ; CHECK-NEXT:    [[REM21:%.*]] = urem i32 [[X]], 10
-; CHECK-NEXT:    store i32 [[REM21]], i32* [[P:%.*]], align 4
+; CHECK-NEXT:    store i32 [[REM21]], ptr [[P:%.*]], align 4
 ; CHECK-NEXT:    br label [[IF_END]]
 ; CHECK:       if.end:
 ; CHECK-NEXT:    ret void
@@ -23,7 +23,7 @@ entry:
 
 if.then:
   %rem2 = srem i32 %x, 10
-  store i32 %rem2, i32* %p, align 4
+  store i32 %rem2, ptr %p, align 4
   br label %if.end
 
 if.end:

diff  --git a/llvm/test/Transforms/CorrelatedValuePropagation/sub.ll b/llvm/test/Transforms/CorrelatedValuePropagation/sub.ll
index 1341db196ac9a..8b67574c06cd9 100644
--- a/llvm/test/Transforms/CorrelatedValuePropagation/sub.ll
+++ b/llvm/test/Transforms/CorrelatedValuePropagation/sub.ll
@@ -146,11 +146,11 @@ exit:
 define void @test6(i32 %a) {
 ; CHECK-LABEL: @test6(
 ; CHECK-NEXT:  bb:
-; CHECK-NEXT:    [[SUB:%.*]] = sub i32 [[A:%.*]], ptrtoint (i32* @b to i32)
+; CHECK-NEXT:    [[SUB:%.*]] = sub i32 [[A:%.*]], ptrtoint (ptr @b to i32)
 ; CHECK-NEXT:    ret void
 ;
 bb:
-  %sub = sub i32 %a, ptrtoint (i32* @b to i32)
+  %sub = sub i32 %a, ptrtoint (ptr @b to i32)
   ret void
 }
 
@@ -298,9 +298,9 @@ exit:
 }
 
 @limit = external global i32
-define i32 @test11(i32* %p, i32 %i) {
+define i32 @test11(ptr %p, i32 %i) {
 ; CHECK-LABEL: @test11(
-; CHECK-NEXT:    [[LIMIT:%.*]] = load i32, i32* [[P:%.*]], !range !0
+; CHECK-NEXT:    [[LIMIT:%.*]] = load i32, ptr [[P:%.*]], !range !0
 ; CHECK-NEXT:    [[WITHIN_1:%.*]] = icmp slt i32 [[LIMIT]], [[I:%.*]]
 ; CHECK-NEXT:    [[I_MINUS_7:%.*]] = add i32 [[I]], -7
 ; CHECK-NEXT:    [[WITHIN_2:%.*]] = icmp slt i32 [[LIMIT]], [[I_MINUS_7]]
@@ -473,18 +473,18 @@ exit:
 ; single basic block loop
 ; because the loop exit condition is SLT, we can supplement the iv sub
 ; (iv.next def) with an nsw.
-define i32 @test16(i32* %n, i32* %a) {
+define i32 @test16(ptr %n, ptr %a) {
 ; CHECK-LABEL: @test16(
 ; CHECK-NEXT:  preheader:
 ; CHECK-NEXT:    br label [[LOOP:%.*]]
 ; CHECK:       loop:
 ; CHECK-NEXT:    [[IV:%.*]] = phi i32 [ 0, [[PREHEADER:%.*]] ], [ [[IV_NEXT:%.*]], [[LOOP]] ]
 ; CHECK-NEXT:    [[ACC:%.*]] = phi i32 [ 0, [[PREHEADER]] ], [ [[ACC_CURR:%.*]], [[LOOP]] ]
-; CHECK-NEXT:    [[X:%.*]] = load atomic i32, i32* [[A:%.*]] unordered, align 8
+; CHECK-NEXT:    [[X:%.*]] = load atomic i32, ptr [[A:%.*]] unordered, align 8
 ; CHECK-NEXT:    fence acquire
 ; CHECK-NEXT:    [[ACC_CURR]] = sub i32 [[ACC]], [[X]]
 ; CHECK-NEXT:    [[IV_NEXT]] = sub nsw i32 [[IV]], -1
-; CHECK-NEXT:    [[NVAL:%.*]] = load atomic i32, i32* [[N:%.*]] unordered, align 8
+; CHECK-NEXT:    [[NVAL:%.*]] = load atomic i32, ptr [[N:%.*]] unordered, align 8
 ; CHECK-NEXT:    [[CMP:%.*]] = icmp slt i32 [[IV_NEXT]], [[NVAL]]
 ; CHECK-NEXT:    br i1 [[CMP]], label [[LOOP]], label [[EXIT:%.*]]
 ; CHECK:       exit:
@@ -496,11 +496,11 @@ preheader:
 loop:
   %iv = phi i32 [ 0, %preheader ], [ %iv.next, %loop ]
   %acc = phi i32 [ 0, %preheader ], [ %acc.curr, %loop ]
-  %x = load atomic i32, i32* %a unordered, align 8
+  %x = load atomic i32, ptr %a unordered, align 8
   fence acquire
   %acc.curr = sub i32 %acc, %x
   %iv.next = sub i32 %iv, -1
-  %nval = load atomic i32, i32* %n unordered, align 8
+  %nval = load atomic i32, ptr %n unordered, align 8
   %cmp = icmp slt i32 %iv.next, %nval
   br i1 %cmp, label %loop, label %exit
 


        


More information about the llvm-commits mailing list