[llvm] 2d56d8c - ExecutionEngine: Convert tests to opaque pointers

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 5 08:12:23 PST 2022


Author: Matt Arsenault
Date: 2022-12-05T11:12:17-05:00
New Revision: 2d56d8c4e8751c7e2cab927cdeb4e519af3f3585

URL: https://github.com/llvm/llvm-project/commit/2d56d8c4e8751c7e2cab927cdeb4e519af3f3585
DIFF: https://github.com/llvm/llvm-project/commit/2d56d8c4e8751c7e2cab927cdeb4e519af3f3585.diff

LOG: ExecutionEngine: Convert tests to opaque pointers

Added: 
    

Modified: 
    llvm/test/ExecutionEngine/Interpreter/alias.ll
    llvm/test/ExecutionEngine/MCJIT/2002-12-16-ArgTest.ll
    llvm/test/ExecutionEngine/MCJIT/2003-01-15-AlignmentTest.ll
    llvm/test/ExecutionEngine/MCJIT/2003-05-06-LivenessClobber.ll
    llvm/test/ExecutionEngine/MCJIT/2003-05-07-ArgumentTest.ll
    llvm/test/ExecutionEngine/MCJIT/2003-08-15-AllocaAssertion.ll
    llvm/test/ExecutionEngine/MCJIT/2003-08-21-EnvironmentTest.ll
    llvm/test/ExecutionEngine/MCJIT/2003-08-23-RegisterAllocatePhysReg.ll
    llvm/test/ExecutionEngine/MCJIT/2003-10-18-PHINode-ConstantExpr-CondCode-Failure.ll
    llvm/test/ExecutionEngine/MCJIT/2005-12-02-TailCallBug.ll
    llvm/test/ExecutionEngine/MCJIT/2007-12-10-APIntLoadStore.ll
    llvm/test/ExecutionEngine/MCJIT/2008-06-05-APInt-OverAShr.ll
    llvm/test/ExecutionEngine/MCJIT/2013-04-04-RelocAddend.ll
    llvm/test/ExecutionEngine/MCJIT/Inputs/multi-module-eh-b.ll
    llvm/test/ExecutionEngine/MCJIT/Inputs/weak-function-2.ll
    llvm/test/ExecutionEngine/MCJIT/eh-lg-pic.ll
    llvm/test/ExecutionEngine/MCJIT/eh.ll
    llvm/test/ExecutionEngine/MCJIT/fpbitcast.ll
    llvm/test/ExecutionEngine/MCJIT/hello.ll
    llvm/test/ExecutionEngine/MCJIT/hello2.ll
    llvm/test/ExecutionEngine/MCJIT/multi-module-eh-a.ll
    llvm/test/ExecutionEngine/MCJIT/pr13727.ll
    llvm/test/ExecutionEngine/MCJIT/remote/eh.ll
    llvm/test/ExecutionEngine/MCJIT/remote/stubs-remote.ll
    llvm/test/ExecutionEngine/MCJIT/remote/stubs-sm-pic.ll
    llvm/test/ExecutionEngine/MCJIT/remote/test-common-symbols-remote.ll
    llvm/test/ExecutionEngine/MCJIT/remote/test-data-align-remote.ll
    llvm/test/ExecutionEngine/MCJIT/remote/test-fp-no-external-funcs-remote.ll
    llvm/test/ExecutionEngine/MCJIT/remote/test-global-init-nonzero-remote.ll
    llvm/test/ExecutionEngine/MCJIT/remote/test-global-init-nonzero-sm-pic.ll
    llvm/test/ExecutionEngine/MCJIT/remote/test-ptr-reloc-remote.ll
    llvm/test/ExecutionEngine/MCJIT/remote/test-ptr-reloc-sm-pic.ll
    llvm/test/ExecutionEngine/MCJIT/stubs-sm-pic.ll
    llvm/test/ExecutionEngine/MCJIT/stubs.ll
    llvm/test/ExecutionEngine/MCJIT/test-call-no-external-funcs.ll
    llvm/test/ExecutionEngine/MCJIT/test-call.ll
    llvm/test/ExecutionEngine/MCJIT/test-common-symbols-alignment.ll
    llvm/test/ExecutionEngine/MCJIT/test-common-symbols.ll
    llvm/test/ExecutionEngine/MCJIT/test-constantexpr.ll
    llvm/test/ExecutionEngine/MCJIT/test-data-align.ll
    llvm/test/ExecutionEngine/MCJIT/test-fp-no-external-funcs.ll
    llvm/test/ExecutionEngine/MCJIT/test-fp.ll
    llvm/test/ExecutionEngine/MCJIT/test-global-ctors.ll
    llvm/test/ExecutionEngine/MCJIT/test-global-init-nonzero-sm-pic.ll
    llvm/test/ExecutionEngine/MCJIT/test-global-init-nonzero.ll
    llvm/test/ExecutionEngine/MCJIT/test-global.ll
    llvm/test/ExecutionEngine/MCJIT/test-loadstore.ll
    llvm/test/ExecutionEngine/MCJIT/test-local.ll
    llvm/test/ExecutionEngine/MCJIT/test-phi.ll
    llvm/test/ExecutionEngine/MCJIT/test-ptr-reloc-sm-pic.ll
    llvm/test/ExecutionEngine/MCJIT/test-ptr-reloc.ll
    llvm/test/ExecutionEngine/MCJIT/test-return.ll
    llvm/test/ExecutionEngine/MCJIT/weak-function.ll
    llvm/test/ExecutionEngine/Orc/global-ctor-with-cast.ll
    llvm/test/ExecutionEngine/OrcLazy/Inputs/noop-main.ll
    llvm/test/ExecutionEngine/OrcLazy/Inputs/weak-function-2.ll
    llvm/test/ExecutionEngine/OrcLazy/anonymous_globals.ll
    llvm/test/ExecutionEngine/OrcLazy/bad-object-file.ll
    llvm/test/ExecutionEngine/OrcLazy/basic-object-file-loading.ll
    llvm/test/ExecutionEngine/OrcLazy/basic-whole-module-partitions.ll
    llvm/test/ExecutionEngine/OrcLazy/common-symbols.ll
    llvm/test/ExecutionEngine/OrcLazy/debug-descriptor-elf-minimal.ll
    llvm/test/ExecutionEngine/OrcLazy/debug-objects-elf-minimal.ll
    llvm/test/ExecutionEngine/OrcLazy/emulated-tls.ll
    llvm/test/ExecutionEngine/OrcLazy/global-ctors-and-dtors.ll
    llvm/test/ExecutionEngine/OrcLazy/global_aliases.ll
    llvm/test/ExecutionEngine/OrcLazy/hidden-visibility.ll
    llvm/test/ExecutionEngine/OrcLazy/macho-universal-static-library-support.ll
    llvm/test/ExecutionEngine/OrcLazy/minimal-throw-catch.ll
    llvm/test/ExecutionEngine/OrcLazy/minimal.ll
    llvm/test/ExecutionEngine/OrcLazy/multiple-compile-threads-basic.ll
    llvm/test/ExecutionEngine/OrcLazy/printargv.ll
    llvm/test/ExecutionEngine/OrcLazy/private_linkage.ll
    llvm/test/ExecutionEngine/OrcLazy/single-function-call.ll
    llvm/test/ExecutionEngine/OrcLazy/static-initializers-in-objectfiles.ll
    llvm/test/ExecutionEngine/OrcLazy/weak-function.ll
    llvm/test/ExecutionEngine/OrcLazy/weak-non-materialization.ll
    llvm/test/ExecutionEngine/RuntimeDyld/X86/Inputs/ExternalGlobal.ll
    llvm/test/ExecutionEngine/RuntimeDyld/X86/coff-alignment.ll
    llvm/test/ExecutionEngine/fma3-jit.ll
    llvm/test/ExecutionEngine/frem.ll
    llvm/test/ExecutionEngine/test-interp-vec-loadstore.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/ExecutionEngine/Interpreter/alias.ll b/llvm/test/ExecutionEngine/Interpreter/alias.ll
index 36e74f0a46a1..cf674171e1c2 100644
--- a/llvm/test/ExecutionEngine/Interpreter/alias.ll
+++ b/llvm/test/ExecutionEngine/Interpreter/alias.ll
@@ -5,7 +5,7 @@ entry:
   ret i32 0
 }
 
- at alias = alias i32 (), i32 ()* @func
+ at alias = alias i32 (), ptr @func
 
 define i32 @main() {
 entry:

diff  --git a/llvm/test/ExecutionEngine/MCJIT/2002-12-16-ArgTest.ll b/llvm/test/ExecutionEngine/MCJIT/2002-12-16-ArgTest.ll
index 895026195520..eb8d813e54d1 100644
--- a/llvm/test/ExecutionEngine/MCJIT/2002-12-16-ArgTest.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/2002-12-16-ArgTest.ll
@@ -1,38 +1,35 @@
 ; RUN: %lli -jit-kind=mcjit %s > /dev/null
 ; RUN: %lli %s > /dev/null
 
- at .LC0 = internal global [10 x i8] c"argc: %d\0A\00"		; <[10 x i8]*> [#uses=1]
+ at .LC0 = internal global [10 x i8] c"argc: %d\0A\00"		; <ptr> [#uses=1]
 
-declare i32 @puts(i8*)
+declare i32 @puts(ptr)
 
-define void @getoptions(i32* %argc) {
+define void @getoptions(ptr %argc) {
 bb0:
 	ret void
 }
 
-declare i32 @printf(i8*, ...)
+declare i32 @printf(ptr, ...)
 
-define i32 @main(i32 %argc, i8** %argv) {
+define i32 @main(i32 %argc, ptr %argv) {
 bb0:
-	call i32 (i8*, ...) @printf( i8* getelementptr ([10 x i8], [10 x i8]* @.LC0, i64 0, i64 0), i32 %argc )		; <i32>:0 [#uses=0]
-	%cast224 = bitcast i8** %argv to i8*		; <i8*> [#uses=1]
-	%local = alloca i8*		; <i8**> [#uses=3]
-	store i8* %cast224, i8** %local
+	call i32 (ptr, ...) @printf( ptr @.LC0, i32 %argc )		; <i32>:0 [#uses=0]
+	%local = alloca ptr		; <ptr> [#uses=3]
+	store ptr %argv, ptr %local
 	%cond226 = icmp sle i32 %argc, 0		; <i1> [#uses=1]
 	br i1 %cond226, label %bb3, label %bb2
 bb2:		; preds = %bb2, %bb0
 	%cann-indvar = phi i32 [ 0, %bb0 ], [ %add1-indvar, %bb2 ]		; <i32> [#uses=2]
 	%add1-indvar = add i32 %cann-indvar, 1		; <i32> [#uses=2]
 	%cann-indvar-idxcast = sext i32 %cann-indvar to i64		; <i64> [#uses=1]
-	%CT = bitcast i8** %local to i8***		; <i8***> [#uses=1]
-	%reg115 = load i8**, i8*** %CT		; <i8**> [#uses=1]
-	%cast235 = getelementptr i8*, i8** %reg115, i64 %cann-indvar-idxcast		; <i8**> [#uses=1]
-	%reg117 = load i8*, i8** %cast235		; <i8*> [#uses=1]
-	%reg236 = call i32 @puts( i8* %reg117 )		; <i32> [#uses=0]
+	%reg115 = load ptr, ptr %local		; <ptr> [#uses=1]
+	%cast235 = getelementptr ptr, ptr %reg115, i64 %cann-indvar-idxcast		; <ptr> [#uses=1]
+	%reg117 = load ptr, ptr %cast235		; <ptr> [#uses=1]
+	%reg236 = call i32 @puts( ptr %reg117 )		; <i32> [#uses=0]
 	%cond239 = icmp slt i32 %add1-indvar, %argc		; <i1> [#uses=1]
 	br i1 %cond239, label %bb2, label %bb3
 bb3:		; preds = %bb2, %bb0
-	%cast243 = bitcast i8** %local to i32*		; <i32*> [#uses=1]
-	call void @getoptions( i32* %cast243 )
+	call void @getoptions( ptr %local )
 	ret i32 0
 }

diff  --git a/llvm/test/ExecutionEngine/MCJIT/2003-01-15-AlignmentTest.ll b/llvm/test/ExecutionEngine/MCJIT/2003-01-15-AlignmentTest.ll
index 8af17843c413..c10df029afb6 100644
--- a/llvm/test/ExecutionEngine/MCJIT/2003-01-15-AlignmentTest.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/2003-01-15-AlignmentTest.ll
@@ -1,18 +1,18 @@
 ; RUN: %lli -jit-kind=mcjit %s > /dev/null
 ; RUN: %lli %s > /dev/null
 
-define i32 @bar(i8* %X) {
+define i32 @bar(ptr %X) {
         ; pointer should be 4 byte aligned!
-	%P = alloca double		; <double*> [#uses=1]
-	%R = ptrtoint double* %P to i32		; <i32> [#uses=1]
+	%P = alloca double		; <ptr> [#uses=1]
+	%R = ptrtoint ptr %P to i32		; <i32> [#uses=1]
 	%A = and i32 %R, 3		; <i32> [#uses=1]
 	ret i32 %A
 }
 
 define i32 @main() {
-	%SP = alloca i8		; <i8*> [#uses=1]
+	%SP = alloca i8		; <ptr> [#uses=1]
 	%X = add i32 0, 0		; <i32> [#uses=1]
-	alloca i8, i32 %X		; <i8*>:1 [#uses=0]
-	call i32 @bar( i8* %SP )		; <i32>:2 [#uses=1]
+	alloca i8, i32 %X		; <ptr>:1 [#uses=0]
+	call i32 @bar( ptr %SP )		; <i32>:2 [#uses=1]
 	ret i32 %2
 }

diff  --git a/llvm/test/ExecutionEngine/MCJIT/2003-05-06-LivenessClobber.ll b/llvm/test/ExecutionEngine/MCJIT/2003-05-06-LivenessClobber.ll
index 8d43f3c1fa09..8b6d2899ce8a 100644
--- a/llvm/test/ExecutionEngine/MCJIT/2003-05-06-LivenessClobber.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/2003-05-06-LivenessClobber.ll
@@ -3,10 +3,10 @@
 ; RUN: not %lli -jit-kind=mcjit %s
 ; RUN: not %lli %s
 
- at test = global i64 0		; <i64*> [#uses=1]
+ at test = global i64 0		; <ptr> [#uses=1]
 
 define internal i64 @test.upgrd.1() {
-	%tmp.0 = load i64, i64* @test		; <i64> [#uses=1]
+	%tmp.0 = load i64, ptr @test		; <i64> [#uses=1]
 	%tmp.1 = add i64 %tmp.0, 1		; <i64> [#uses=1]
 	ret i64 %tmp.1
 }

diff  --git a/llvm/test/ExecutionEngine/MCJIT/2003-05-07-ArgumentTest.ll b/llvm/test/ExecutionEngine/MCJIT/2003-05-07-ArgumentTest.ll
index 652a6d4b5b37..0df5c85e58de 100644
--- a/llvm/test/ExecutionEngine/MCJIT/2003-05-07-ArgumentTest.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/2003-05-07-ArgumentTest.ll
@@ -1,12 +1,12 @@
 ; RUN: %lli -jit-kind=mcjit %s test
 ; RUN: %lli %s test
 
-declare i32 @puts(i8*)
+declare i32 @puts(ptr)
 
-define i32 @main(i32 %argc.1, i8** %argv.1) {
-	%tmp.5 = getelementptr i8*, i8** %argv.1, i64 1		; <i8**> [#uses=1]
-	%tmp.6 = load i8*, i8** %tmp.5		; <i8*> [#uses=1]
-	%tmp.0 = call i32 @puts( i8* %tmp.6 )		; <i32> [#uses=0]
+define i32 @main(i32 %argc.1, ptr %argv.1) {
+	%tmp.5 = getelementptr ptr, ptr %argv.1, i64 1		; <ptr> [#uses=1]
+	%tmp.6 = load ptr, ptr %tmp.5		; <ptr> [#uses=1]
+	%tmp.0 = call i32 @puts( ptr %tmp.6 )		; <i32> [#uses=0]
 	ret i32 0
 }
 

diff  --git a/llvm/test/ExecutionEngine/MCJIT/2003-08-15-AllocaAssertion.ll b/llvm/test/ExecutionEngine/MCJIT/2003-08-15-AllocaAssertion.ll
index 5aaf22c61823..4688089fd9e4 100644
--- a/llvm/test/ExecutionEngine/MCJIT/2003-08-15-AllocaAssertion.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/2003-08-15-AllocaAssertion.ll
@@ -5,8 +5,8 @@
 ; local register allocator.
 
 define i32 @main(i32 %X) {
-	%A = alloca i32, i32 %X		; <i32*> [#uses=0]
-	%B = alloca float, i32 %X		; <float*> [#uses=0]
+	%A = alloca i32, i32 %X		; <ptr> [#uses=0]
+	%B = alloca float, i32 %X		; <ptr> [#uses=0]
 	ret i32 0
 }
 

diff  --git a/llvm/test/ExecutionEngine/MCJIT/2003-08-21-EnvironmentTest.ll b/llvm/test/ExecutionEngine/MCJIT/2003-08-21-EnvironmentTest.ll
index 13f751929fbe..910fbaf9a5b4 100644
--- a/llvm/test/ExecutionEngine/MCJIT/2003-08-21-EnvironmentTest.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/2003-08-21-EnvironmentTest.ll
@@ -9,11 +9,11 @@
 ;
 
 
-declare i32 @strlen(i8*)
+declare i32 @strlen(ptr)
 
-define i32 @main(i32 %argc.1, i8** %argv.1, i8** %envp.1) {
-	%tmp.2 = load i8*, i8** %envp.1		; <i8*> [#uses=1]
-	%tmp.3 = call i32 @strlen( i8* %tmp.2 )		; <i32> [#uses=1]
+define i32 @main(i32 %argc.1, ptr %argv.1, ptr %envp.1) {
+	%tmp.2 = load ptr, ptr %envp.1		; <ptr> [#uses=1]
+	%tmp.3 = call i32 @strlen( ptr %tmp.2 )		; <i32> [#uses=1]
 	%T = icmp eq i32 %tmp.3, 0		; <i1> [#uses=1]
 	%R = zext i1 %T to i32		; <i32> [#uses=1]
 	ret i32 %R

diff  --git a/llvm/test/ExecutionEngine/MCJIT/2003-08-23-RegisterAllocatePhysReg.ll b/llvm/test/ExecutionEngine/MCJIT/2003-08-23-RegisterAllocatePhysReg.ll
index ce5290d1a090..3648c8496847 100644
--- a/llvm/test/ExecutionEngine/MCJIT/2003-08-23-RegisterAllocatePhysReg.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/2003-08-23-RegisterAllocatePhysReg.ll
@@ -7,7 +7,7 @@
 
 define i32 @main(i32 %A) {
         ; ESP gets used again...
-	%Ap2 = alloca i32, i32 %A		; <i32*> [#uses=11]
+	%Ap2 = alloca i32, i32 %A		; <ptr> [#uses=11]
 	; Produce lots of overlapping live ranges
         %B = add i32 %A, 1		; <i32> [#uses=1]
 	%C = add i32 %A, 2		; <i32> [#uses=1]
@@ -20,16 +20,16 @@ define i32 @main(i32 %A) {
 	%J = add i32 %A, 9		; <i32> [#uses=1]
 	%K = add i32 %A, 10		; <i32> [#uses=1]
         ; Uses of all of the values
-	store i32 %A, i32* %Ap2
-	store i32 %B, i32* %Ap2
-	store i32 %C, i32* %Ap2
-	store i32 %D, i32* %Ap2
-	store i32 %E, i32* %Ap2
-	store i32 %F, i32* %Ap2
-	store i32 %G, i32* %Ap2
-	store i32 %H, i32* %Ap2
-	store i32 %I, i32* %Ap2
-	store i32 %J, i32* %Ap2
-	store i32 %K, i32* %Ap2
+	store i32 %A, ptr %Ap2
+	store i32 %B, ptr %Ap2
+	store i32 %C, ptr %Ap2
+	store i32 %D, ptr %Ap2
+	store i32 %E, ptr %Ap2
+	store i32 %F, ptr %Ap2
+	store i32 %G, ptr %Ap2
+	store i32 %H, ptr %Ap2
+	store i32 %I, ptr %Ap2
+	store i32 %J, ptr %Ap2
+	store i32 %K, ptr %Ap2
 	ret i32 0
 }

diff  --git a/llvm/test/ExecutionEngine/MCJIT/2003-10-18-PHINode-ConstantExpr-CondCode-Failure.ll b/llvm/test/ExecutionEngine/MCJIT/2003-10-18-PHINode-ConstantExpr-CondCode-Failure.ll
index 6ba24ecdf40e..cc04f5308f96 100644
--- a/llvm/test/ExecutionEngine/MCJIT/2003-10-18-PHINode-ConstantExpr-CondCode-Failure.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/2003-10-18-PHINode-ConstantExpr-CondCode-Failure.ll
@@ -1,7 +1,7 @@
 ; RUN: %lli -jit-kind=mcjit %s > /dev/null
 ; RUN: %lli %s > /dev/null
 
- at A = global i32 0		; <i32*> [#uses=1]
+ at A = global i32 0		; <ptr> [#uses=1]
 
 define i32 @main() {
 	%Ret = call i32 @test( i1 true, i32 0 )		; <i32> [#uses=1]
@@ -11,7 +11,7 @@ define i32 @main() {
 define i32 @test(i1 %c, i32 %A) {
 	br i1 %c, label %Taken1, label %NotTaken
 Cont:		; preds = %Taken1, %NotTaken
-	%V = phi i32 [ 0, %NotTaken ], [ sub (i32 ptrtoint (i32* @A to i32), i32 1234), %Taken1 ]		; <i32> [#uses=0]
+	%V = phi i32 [ 0, %NotTaken ], [ sub (i32 ptrtoint (ptr @A to i32), i32 1234), %Taken1 ]		; <i32> [#uses=0]
 	ret i32 0
 NotTaken:		; preds = %0
 	br label %Cont

diff  --git a/llvm/test/ExecutionEngine/MCJIT/2005-12-02-TailCallBug.ll b/llvm/test/ExecutionEngine/MCJIT/2005-12-02-TailCallBug.ll
index 28415f926ef9..7082e9a0f128 100644
--- a/llvm/test/ExecutionEngine/MCJIT/2005-12-02-TailCallBug.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/2005-12-02-TailCallBug.ll
@@ -4,18 +4,16 @@
 ; XFAIL: i686 && windows
 
 define i32 @main() {
-	%f = bitcast i32 (i32, i32*, i32)* @check_tail to i32*		; <i32*> [#uses=1]
-	%res = tail call fastcc i32 @check_tail( i32 10, i32* %f, i32 10 )		; <i32> [#uses=1]
+	%res = tail call fastcc i32 @check_tail( i32 10, ptr @check_tail, i32 10 )		; <i32> [#uses=1]
 	ret i32 %res
 }
 
-define fastcc i32 @check_tail(i32 %x, i32* %f, i32 %g) {
+define fastcc i32 @check_tail(i32 %x, ptr %f, i32 %g) {
 	%tmp1 = icmp sgt i32 %x, 0		; <i1> [#uses=1]
 	br i1 %tmp1, label %if-then, label %if-else
 if-then:		; preds = %0
-	%fun_ptr = bitcast i32* %f to i32 (i32, i32*, i32)*		; <i32 (i32, i32*, i32)*> [#uses=1]
 	%arg1 = add i32 %x, -1		; <i32> [#uses=1]
-	%res = tail call fastcc i32 %fun_ptr( i32 %arg1, i32* %f, i32 %g )		; <i32> [#uses=1]
+	%res = tail call fastcc i32 %f( i32 %arg1, ptr %f, i32 %g )		; <i32> [#uses=1]
 	ret i32 %res
 if-else:		; preds = %0
 	ret i32 %x

diff  --git a/llvm/test/ExecutionEngine/MCJIT/2007-12-10-APIntLoadStore.ll b/llvm/test/ExecutionEngine/MCJIT/2007-12-10-APIntLoadStore.ll
index 21261c8e2f94..eb0ddf7138b0 100644
--- a/llvm/test/ExecutionEngine/MCJIT/2007-12-10-APIntLoadStore.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/2007-12-10-APIntLoadStore.ll
@@ -3,17 +3,17 @@
 
 define i32 @main() {
 entry:
-    %retval = alloca i32        ; <i32*> [#uses=2]
-    %tmp = alloca i32       ; <i32*> [#uses=2]
-    %x = alloca i75, align 16       ; <i75*> [#uses=1]
+    %retval = alloca i32        ; <ptr> [#uses=2]
+    %tmp = alloca i32       ; <ptr> [#uses=2]
+    %x = alloca i75, align 16       ; <ptr> [#uses=1]
     %"alloca point" = bitcast i32 0 to i32      ; <i32> [#uses=0]
-    store i75 999, i75* %x, align 16
-    store i32 0, i32* %tmp, align 4
-    %tmp1 = load i32, i32* %tmp, align 4     ; <i32> [#uses=1]
-    store i32 %tmp1, i32* %retval, align 4
+    store i75 999, ptr %x, align 16
+    store i32 0, ptr %tmp, align 4
+    %tmp1 = load i32, ptr %tmp, align 4     ; <i32> [#uses=1]
+    store i32 %tmp1, ptr %retval, align 4
     br label %return
 
 return:     ; preds = %entry
-    %retval2 = load i32, i32* %retval        ; <i32> [#uses=1]
+    %retval2 = load i32, ptr %retval        ; <i32> [#uses=1]
     ret i32 %retval2
 }

diff  --git a/llvm/test/ExecutionEngine/MCJIT/2008-06-05-APInt-OverAShr.ll b/llvm/test/ExecutionEngine/MCJIT/2008-06-05-APInt-OverAShr.ll
index 46143b5696c9..3cd6017d1067 100644
--- a/llvm/test/ExecutionEngine/MCJIT/2008-06-05-APInt-OverAShr.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/2008-06-05-APInt-OverAShr.ll
@@ -3,31 +3,31 @@
 
 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32"
 target triple = "i686-pc-linux-gnu"
- at .str = internal constant [10 x i8] c"MSB = %d\0A\00"		; <[10 x i8]*> [#uses=1]
+ at .str = internal constant [10 x i8] c"MSB = %d\0A\00"		; <ptr> [#uses=1]
 
 define i65 @foo(i65 %x) {
 entry:
-	%x_addr = alloca i65		; <i65*> [#uses=2]
-	%retval = alloca i65		; <i65*> [#uses=2]
-	%tmp = alloca i65		; <i65*> [#uses=2]
+	%x_addr = alloca i65		; <ptr> [#uses=2]
+	%retval = alloca i65		; <ptr> [#uses=2]
+	%tmp = alloca i65		; <ptr> [#uses=2]
 	%"alloca point" = bitcast i65 0 to i65		; <i65> [#uses=0]
-	store i65 %x, i65* %x_addr
-	%tmp1 = load i65, i65* %x_addr, align 4		; <i65> [#uses=1]
+	store i65 %x, ptr %x_addr
+	%tmp1 = load i65, ptr %x_addr, align 4		; <i65> [#uses=1]
 	%tmp2 = ashr i65 %tmp1, 65		; <i65> [#uses=1]
-	store i65 %tmp2, i65* %tmp, align 4
-	%tmp3 = load i65, i65* %tmp, align 4		; <i65> [#uses=1]
-	store i65 %tmp3, i65* %retval, align 4
+	store i65 %tmp2, ptr %tmp, align 4
+	%tmp3 = load i65, ptr %tmp, align 4		; <i65> [#uses=1]
+	store i65 %tmp3, ptr %retval, align 4
 	br label %return
 
 return:		; preds = %entry
-	%retval4 = load i65, i65* %retval		; <i65> [#uses=1]
+	%retval4 = load i65, ptr %retval		; <i65> [#uses=1]
 	ret i65 %retval4
 }
 
 define i32 @main() {
 entry:
-	%retval = alloca i32		; <i32*> [#uses=1]
-	%iftmp.0 = alloca i32		; <i32*> [#uses=3]
+	%retval = alloca i32		; <ptr> [#uses=1]
+	%iftmp.0 = alloca i32		; <ptr> [#uses=3]
 	%"alloca point" = bitcast i32 0 to i32		; <i32> [#uses=0]
 	%tmp = call i65 @foo( i65 -9 )		; <i65> [#uses=1]
 	%tmp1 = lshr i65 %tmp, 64		; <i65> [#uses=1]
@@ -38,23 +38,23 @@ entry:
 	br i1 %toBool, label %cond_true, label %cond_false
 
 cond_true:		; preds = %entry
-	store i32 0, i32* %iftmp.0, align 4
+	store i32 0, ptr %iftmp.0, align 4
 	br label %cond_next
 
 cond_false:		; preds = %entry
-	store i32 1, i32* %iftmp.0, align 4
+	store i32 1, ptr %iftmp.0, align 4
 	br label %cond_next
 
 cond_next:		; preds = %cond_false, %cond_true
-	%tmp5 = getelementptr [10 x i8], [10 x i8]* @.str, i32 0, i32 0		; <i8*> [#uses=1]
-	%tmp6 = load i32, i32* %iftmp.0, align 4		; <i32> [#uses=1]
-	%tmp7 = call i32 (i8*, ...) @printf( i8* noalias  %tmp5, i32 %tmp6 ) nounwind 		; <i32> [#uses=0]
+	%tmp5 = getelementptr [10 x i8], ptr @.str, i32 0, i32 0		; <ptr> [#uses=1]
+	%tmp6 = load i32, ptr %iftmp.0, align 4		; <i32> [#uses=1]
+	%tmp7 = call i32 (ptr, ...) @printf( ptr noalias  %tmp5, i32 %tmp6 ) nounwind 		; <i32> [#uses=0]
 	br label %return
 
 return:		; preds = %cond_next
-    store i32 0, i32* %retval, align 4
-	%retval8 = load i32, i32* %retval		; <i32> [#uses=1]
+    store i32 0, ptr %retval, align 4
+	%retval8 = load i32, ptr %retval		; <i32> [#uses=1]
 	ret i32 %retval8
 }
 
-declare i32 @printf(i8* noalias , ...) nounwind 
+declare i32 @printf(ptr noalias , ...) nounwind 

diff  --git a/llvm/test/ExecutionEngine/MCJIT/2013-04-04-RelocAddend.ll b/llvm/test/ExecutionEngine/MCJIT/2013-04-04-RelocAddend.ll
index 9026a460c36a..919d2adbe7a3 100644
--- a/llvm/test/ExecutionEngine/MCJIT/2013-04-04-RelocAddend.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/2013-04-04-RelocAddend.ll
@@ -15,12 +15,12 @@
 ; 
 
 @test = global [2 x i32] [i32 -1, i32 0], align 4
- at p = global i32* getelementptr inbounds ([2 x i32], [2 x i32]* @test, i64 0, i64 1), align 8
+ at p = global ptr getelementptr inbounds ([2 x i32], ptr @test, i64 0, i64 1), align 8
 
 define i32 @main() {
 entry:
-  %0 = load i32*, i32** @p, align 8
-  %1 = load i32, i32* %0, align 4
+  %0 = load ptr, ptr @p, align 8
+  %1 = load i32, ptr %0, align 4
   ret i32 %1
 }
 

diff  --git a/llvm/test/ExecutionEngine/MCJIT/Inputs/multi-module-eh-b.ll b/llvm/test/ExecutionEngine/MCJIT/Inputs/multi-module-eh-b.ll
index d7beeb61cb4c..625ae43ef637 100644
--- a/llvm/test/ExecutionEngine/MCJIT/Inputs/multi-module-eh-b.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/Inputs/multi-module-eh-b.ll
@@ -1,27 +1,27 @@
-declare i8* @__cxa_allocate_exception(i64)
-declare void @__cxa_throw(i8*, i8*, i8*)
+declare ptr @__cxa_allocate_exception(i64)
+declare void @__cxa_throw(ptr, ptr, ptr)
 declare i32 @__gxx_personality_v0(...)
 declare void @__cxa_end_catch()
-declare i8* @__cxa_begin_catch(i8*)
+declare ptr @__cxa_begin_catch(ptr)
 
- at _ZTIi = external constant i8*
+ at _ZTIi = external constant ptr
 
 define void @throwException_B() {
-  %exception = tail call i8* @__cxa_allocate_exception(i64 4)
-  call void @__cxa_throw(i8* %exception, i8* bitcast (i8** @_ZTIi to i8*), i8* null)
+  %exception = tail call ptr @__cxa_allocate_exception(i64 4)
+  call void @__cxa_throw(ptr %exception, ptr @_ZTIi, ptr null)
   unreachable
 }
 
-define i32 @FB() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
+define i32 @FB() personality ptr @__gxx_personality_v0 {
 entry:
   invoke void @throwException_B()
           to label %try.cont unwind label %lpad
 
 lpad:
-  %p = landingpad { i8*, i32 }
-          catch i8* bitcast (i8** @_ZTIi to i8*)
-  %e = extractvalue { i8*, i32 } %p, 0
-  call i8* @__cxa_begin_catch(i8* %e)
+  %p = landingpad { ptr, i32 }
+          catch ptr @_ZTIi
+  %e = extractvalue { ptr, i32 } %p, 0
+  call ptr @__cxa_begin_catch(ptr %e)
   call void @__cxa_end_catch()
   br label %try.cont
 

diff  --git a/llvm/test/ExecutionEngine/MCJIT/Inputs/weak-function-2.ll b/llvm/test/ExecutionEngine/MCJIT/Inputs/weak-function-2.ll
index 73544a7f709a..b8f6b0e35449 100644
--- a/llvm/test/ExecutionEngine/MCJIT/Inputs/weak-function-2.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/Inputs/weak-function-2.ll
@@ -3,7 +3,7 @@ entry:
   ret i32 0
 }
 
-define i8* @bar() {
+define ptr @bar() {
 entry:
-  ret i8* bitcast (i32 ()* @baz to i8*)
+  ret ptr @baz
 }

diff  --git a/llvm/test/ExecutionEngine/MCJIT/eh-lg-pic.ll b/llvm/test/ExecutionEngine/MCJIT/eh-lg-pic.ll
index f2d6a54a59d6..a824b4a39458 100644
--- a/llvm/test/ExecutionEngine/MCJIT/eh-lg-pic.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/eh-lg-pic.ll
@@ -1,17 +1,17 @@
 ; REQUIRES: cxx-shared-library
 ; RUN: %lli -jit-kind=mcjit -relocation-model=pic -code-model=large %s
 ; XFAIL: cygwin, windows-msvc, windows-gnu, mips-, mipsel-, i686, i386, aarch64, arm
-declare i8* @__cxa_allocate_exception(i64)
-declare void @__cxa_throw(i8*, i8*, i8*)
+declare ptr @__cxa_allocate_exception(i64)
+declare void @__cxa_throw(ptr, ptr, ptr)
 declare i32 @__gxx_personality_v0(...)
 declare void @__cxa_end_catch()
-declare i8* @__cxa_begin_catch(i8*)
+declare ptr @__cxa_begin_catch(ptr)
 
- at _ZTIi = external constant i8*
+ at _ZTIi = external constant ptr
 
 define void @throwException() {
-  %exception = tail call i8* @__cxa_allocate_exception(i64 4)
-  call void @__cxa_throw(i8* %exception, i8* bitcast (i8** @_ZTIi to i8*), i8* null)
+  %exception = tail call ptr @__cxa_allocate_exception(i64 4)
+  call void @__cxa_throw(ptr %exception, ptr @_ZTIi, ptr null)
   unreachable
 }
 
@@ -20,17 +20,17 @@ define internal dso_local void @use_gotoff() {
   ret void
 }
 
-define i32 @main() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
+define i32 @main() personality ptr @__gxx_personality_v0 {
 entry:
   call void @use_gotoff()
   invoke void @throwException()
           to label %try.cont unwind label %lpad
 
 lpad:
-  %p = landingpad { i8*, i32 }
-          catch i8* bitcast (i8** @_ZTIi to i8*)
-  %e = extractvalue { i8*, i32 } %p, 0
-  call i8* @__cxa_begin_catch(i8* %e)
+  %p = landingpad { ptr, i32 }
+          catch ptr @_ZTIi
+  %e = extractvalue { ptr, i32 } %p, 0
+  call ptr @__cxa_begin_catch(ptr %e)
   call void @__cxa_end_catch()
   br label %try.cont
 

diff  --git a/llvm/test/ExecutionEngine/MCJIT/eh.ll b/llvm/test/ExecutionEngine/MCJIT/eh.ll
index ed5ff644d226..571f92d4a947 100644
--- a/llvm/test/ExecutionEngine/MCJIT/eh.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/eh.ll
@@ -2,30 +2,30 @@
 ; RUN: %lli -jit-kind=mcjit %s
 
 ; XFAIL: arm, cygwin, windows-msvc, windows-gnu
-declare i8* @__cxa_allocate_exception(i64)
-declare void @__cxa_throw(i8*, i8*, i8*)
+declare ptr @__cxa_allocate_exception(i64)
+declare void @__cxa_throw(ptr, ptr, ptr)
 declare i32 @__gxx_personality_v0(...)
 declare void @__cxa_end_catch()
-declare i8* @__cxa_begin_catch(i8*)
+declare ptr @__cxa_begin_catch(ptr)
 
- at _ZTIi = external constant i8*
+ at _ZTIi = external constant ptr
 
 define void @throwException() {
-  %exception = tail call i8* @__cxa_allocate_exception(i64 4)
-  call void @__cxa_throw(i8* %exception, i8* bitcast (i8** @_ZTIi to i8*), i8* null)
+  %exception = tail call ptr @__cxa_allocate_exception(i64 4)
+  call void @__cxa_throw(ptr %exception, ptr @_ZTIi, ptr null)
   unreachable
 }
 
-define i32 @main() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
+define i32 @main() personality ptr @__gxx_personality_v0 {
 entry:
   invoke void @throwException()
           to label %try.cont unwind label %lpad
 
 lpad:
-  %p = landingpad { i8*, i32 }
-          catch i8* bitcast (i8** @_ZTIi to i8*)
-  %e = extractvalue { i8*, i32 } %p, 0
-  call i8* @__cxa_begin_catch(i8* %e)
+  %p = landingpad { ptr, i32 }
+          catch ptr @_ZTIi
+  %e = extractvalue { ptr, i32 } %p, 0
+  call ptr @__cxa_begin_catch(ptr %e)
   call void @__cxa_end_catch()
   br label %try.cont
 

diff  --git a/llvm/test/ExecutionEngine/MCJIT/fpbitcast.ll b/llvm/test/ExecutionEngine/MCJIT/fpbitcast.ll
index 209c39f01edb..c87ea9d24267 100644
--- a/llvm/test/ExecutionEngine/MCJIT/fpbitcast.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/fpbitcast.ll
@@ -12,10 +12,9 @@ entry:
 define i32 @main()
 {
        %res = call i32 @test(double 3.14)
-       %ptr = getelementptr [4 x i8], [4 x i8]* @format, i32 0, i32 0
-       call i32 (i8*,...) @printf(i8* %ptr, i32 %res)
+       call i32 (ptr,...) @printf(ptr @format, i32 %res)
        ret i32 0
 }
 
-declare i32 @printf(i8*, ...)
+declare i32 @printf(ptr, ...)
 @format = internal constant [4 x i8] c"%x\0A\00"

diff  --git a/llvm/test/ExecutionEngine/MCJIT/hello.ll b/llvm/test/ExecutionEngine/MCJIT/hello.ll
index 4272321c6cee..33b34fb6a7af 100644
--- a/llvm/test/ExecutionEngine/MCJIT/hello.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/hello.ll
@@ -1,12 +1,12 @@
 ; RUN: %lli -jit-kind=mcjit %s > /dev/null
 ; RUN: %lli %s > /dev/null
 
- at .LC0 = internal global [12 x i8] c"Hello World\00"		; <[12 x i8]*> [#uses=1]
+ at .LC0 = internal global [12 x i8] c"Hello World\00"		; <ptr> [#uses=1]
 
-declare i32 @puts(i8*)
+declare i32 @puts(ptr)
 
 define i32 @main() {
-	%reg210 = call i32 @puts( i8* getelementptr ([12 x i8], [12 x i8]* @.LC0, i64 0, i64 0) )		; <i32> [#uses=0]
+	%reg210 = call i32 @puts( ptr @.LC0 )		; <i32> [#uses=0]
 	ret i32 0
 }
 

diff  --git a/llvm/test/ExecutionEngine/MCJIT/hello2.ll b/llvm/test/ExecutionEngine/MCJIT/hello2.ll
index 452e907c196c..48806682a38a 100644
--- a/llvm/test/ExecutionEngine/MCJIT/hello2.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/hello2.ll
@@ -1,13 +1,13 @@
 ; RUN: %lli -jit-kind=mcjit %s > /dev/null
 ; RUN: %lli %s > /dev/null
 
- at X = global i32 7		; <i32*> [#uses=0]
- at msg = internal global [13 x i8] c"Hello World\0A\00"		; <[13 x i8]*> [#uses=1]
+ at X = global i32 7		; <ptr> [#uses=0]
+ at msg = internal global [13 x i8] c"Hello World\0A\00"		; <ptr> [#uses=1]
 
-declare void @printf([13 x i8]*, ...)
+declare void @printf(ptr, ...)
 
 define void @bar() {
-	call void ([13 x i8]*, ...) @printf( [13 x i8]* @msg )
+	call void (ptr, ...) @printf( ptr @msg )
 	ret void
 }
 

diff  --git a/llvm/test/ExecutionEngine/MCJIT/multi-module-eh-a.ll b/llvm/test/ExecutionEngine/MCJIT/multi-module-eh-a.ll
index 3709aa441a64..f3e837b80e14 100644
--- a/llvm/test/ExecutionEngine/MCJIT/multi-module-eh-a.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/multi-module-eh-a.ll
@@ -2,32 +2,32 @@
 ; RUN: %lli -jit-kind=mcjit -extra-module=%p/Inputs/multi-module-eh-b.ll %s
 
 ; XFAIL: arm, cygwin, windows-msvc, windows-gnu
-declare i8* @__cxa_allocate_exception(i64)
-declare void @__cxa_throw(i8*, i8*, i8*)
+declare ptr @__cxa_allocate_exception(i64)
+declare void @__cxa_throw(ptr, ptr, ptr)
 declare i32 @__gxx_personality_v0(...)
 declare void @__cxa_end_catch()
-declare i8* @__cxa_begin_catch(i8*)
+declare ptr @__cxa_begin_catch(ptr)
 
- at _ZTIi = external constant i8*
+ at _ZTIi = external constant ptr
 
 declare i32 @FB()
 
 define void @throwException() {
-  %exception = tail call i8* @__cxa_allocate_exception(i64 4)
-  call void @__cxa_throw(i8* %exception, i8* bitcast (i8** @_ZTIi to i8*), i8* null)
+  %exception = tail call ptr @__cxa_allocate_exception(i64 4)
+  call void @__cxa_throw(ptr %exception, ptr @_ZTIi, ptr null)
   unreachable
 }
 
-define i32 @main() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
+define i32 @main() personality ptr @__gxx_personality_v0 {
 entry:
   invoke void @throwException()
           to label %try.cont unwind label %lpad
 
 lpad:
-  %p = landingpad { i8*, i32 }
-          catch i8* bitcast (i8** @_ZTIi to i8*)
-  %e = extractvalue { i8*, i32 } %p, 0
-  call i8* @__cxa_begin_catch(i8* %e)
+  %p = landingpad { ptr, i32 }
+          catch ptr @_ZTIi
+  %e = extractvalue { ptr, i32 } %p, 0
+  call ptr @__cxa_begin_catch(ptr %e)
   call void @__cxa_end_catch()
   br label %try.cont
 

diff  --git a/llvm/test/ExecutionEngine/MCJIT/pr13727.ll b/llvm/test/ExecutionEngine/MCJIT/pr13727.ll
index 786829f8ed3c..22819b0ba21a 100644
--- a/llvm/test/ExecutionEngine/MCJIT/pr13727.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/pr13727.ll
@@ -30,58 +30,58 @@ define i32 @main() nounwind {
 entry:
   %retval = alloca i32, align 4
   %i = alloca i32, align 4
-  store i32 0, i32* %retval
-  %0 = load i32, i32* @zero_int, align 4
+  store i32 0, ptr %retval
+  %0 = load i32, ptr @zero_int, align 4
   %add = add nsw i32 %0, 5
   %idxprom = sext i32 %add to i64
-  %arrayidx = getelementptr inbounds [10 x i32], [10 x i32]* @zero_arr, i32 0, i64 %idxprom
-  store i32 40, i32* %arrayidx, align 4
-  %1 = load double, double* @zero_double, align 8
+  %arrayidx = getelementptr inbounds [10 x i32], ptr @zero_arr, i32 0, i64 %idxprom
+  store i32 40, ptr %arrayidx, align 4
+  %1 = load double, ptr @zero_double, align 8
   %cmp = fcmp olt double %1, 1.100000e+00
   br i1 %cmp, label %if.then, label %if.end
 
 if.then:                                          ; preds = %entry
-  %2 = load i32, i32* @zero_int, align 4
+  %2 = load i32, ptr @zero_int, align 4
   %add1 = add nsw i32 %2, 2
   %idxprom2 = sext i32 %add1 to i64
-  %arrayidx3 = getelementptr inbounds [10 x i32], [10 x i32]* @zero_arr, i32 0, i64 %idxprom2
-  store i32 70, i32* %arrayidx3, align 4
+  %arrayidx3 = getelementptr inbounds [10 x i32], ptr @zero_arr, i32 0, i64 %idxprom2
+  store i32 70, ptr %arrayidx3, align 4
   br label %if.end
 
 if.end:                                           ; preds = %if.then, %entry
-  store i32 1, i32* %i, align 4
+  store i32 1, ptr %i, align 4
   br label %for.cond
 
 for.cond:                                         ; preds = %for.inc, %if.end
-  %3 = load i32, i32* %i, align 4
+  %3 = load i32, ptr %i, align 4
   %cmp4 = icmp slt i32 %3, 10
   br i1 %cmp4, label %for.body, label %for.end
 
 for.body:                                         ; preds = %for.cond
-  %4 = load i32, i32* %i, align 4
+  %4 = load i32, ptr %i, align 4
   %sub = sub nsw i32 %4, 1
   %idxprom5 = sext i32 %sub to i64
-  %arrayidx6 = getelementptr inbounds [10 x i32], [10 x i32]* @zero_arr, i32 0, i64 %idxprom5
-  %5 = load i32, i32* %arrayidx6, align 4
-  %6 = load i32, i32* %i, align 4
+  %arrayidx6 = getelementptr inbounds [10 x i32], ptr @zero_arr, i32 0, i64 %idxprom5
+  %5 = load i32, ptr %arrayidx6, align 4
+  %6 = load i32, ptr %i, align 4
   %idxprom7 = sext i32 %6 to i64
-  %arrayidx8 = getelementptr inbounds [10 x i32], [10 x i32]* @zero_arr, i32 0, i64 %idxprom7
-  %7 = load i32, i32* %arrayidx8, align 4
+  %arrayidx8 = getelementptr inbounds [10 x i32], ptr @zero_arr, i32 0, i64 %idxprom7
+  %7 = load i32, ptr %arrayidx8, align 4
   %add9 = add nsw i32 %5, %7
-  %8 = load i32, i32* %i, align 4
+  %8 = load i32, ptr %i, align 4
   %idxprom10 = sext i32 %8 to i64
-  %arrayidx11 = getelementptr inbounds [10 x i32], [10 x i32]* @zero_arr, i32 0, i64 %idxprom10
-  store i32 %add9, i32* %arrayidx11, align 4
+  %arrayidx11 = getelementptr inbounds [10 x i32], ptr @zero_arr, i32 0, i64 %idxprom10
+  store i32 %add9, ptr %arrayidx11, align 4
   br label %for.inc
 
 for.inc:                                          ; preds = %for.body
-  %9 = load i32, i32* %i, align 4
+  %9 = load i32, ptr %i, align 4
   %inc = add nsw i32 %9, 1
-  store i32 %inc, i32* %i, align 4
+  store i32 %inc, ptr %i, align 4
   br label %for.cond
 
 for.end:                                          ; preds = %for.cond
-  %10 = load i32, i32* getelementptr inbounds ([10 x i32], [10 x i32]* @zero_arr, i32 0, i64 9), align 4
+  %10 = load i32, ptr getelementptr inbounds ([10 x i32], ptr @zero_arr, i32 0, i64 9), align 4
   %cmp12 = icmp eq i32 %10, 110
   %cond = select i1 %cmp12, i32 0, i32 -1
   ret i32 %cond

diff  --git a/llvm/test/ExecutionEngine/MCJIT/remote/eh.ll b/llvm/test/ExecutionEngine/MCJIT/remote/eh.ll
index e25fd710b5c3..c7e4b128e30d 100644
--- a/llvm/test/ExecutionEngine/MCJIT/remote/eh.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/remote/eh.ll
@@ -5,30 +5,30 @@
 ; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed
 ; FIXME: Something hangs here.
 ; UNSUPPORTED: use_msan_with_origins
-declare i8* @__cxa_allocate_exception(i64)
-declare void @__cxa_throw(i8*, i8*, i8*)
+declare ptr @__cxa_allocate_exception(i64)
+declare void @__cxa_throw(ptr, ptr, ptr)
 declare i32 @__gxx_personality_v0(...)
 declare void @__cxa_end_catch()
-declare i8* @__cxa_begin_catch(i8*)
+declare ptr @__cxa_begin_catch(ptr)
 
- at _ZTIi = external constant i8*
+ at _ZTIi = external constant ptr
 
 define void @throwException() {
-  %exception = tail call i8* @__cxa_allocate_exception(i64 4)
-  call void @__cxa_throw(i8* %exception, i8* bitcast (i8** @_ZTIi to i8*), i8* null)
+  %exception = tail call ptr @__cxa_allocate_exception(i64 4)
+  call void @__cxa_throw(ptr %exception, ptr @_ZTIi, ptr null)
   unreachable
 }
 
-define i32 @main() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
+define i32 @main() personality ptr @__gxx_personality_v0 {
 entry:
   invoke void @throwException()
           to label %try.cont unwind label %lpad
 
 lpad:
-  %p = landingpad { i8*, i32 }
-          catch i8* bitcast (i8** @_ZTIi to i8*)
-  %e = extractvalue { i8*, i32 } %p, 0
-  call i8* @__cxa_begin_catch(i8* %e)
+  %p = landingpad { ptr, i32 }
+          catch ptr @_ZTIi
+  %e = extractvalue { ptr, i32 } %p, 0
+  call ptr @__cxa_begin_catch(ptr %e)
   call void @__cxa_end_catch()
   br label %try.cont
 

diff  --git a/llvm/test/ExecutionEngine/MCJIT/remote/stubs-remote.ll b/llvm/test/ExecutionEngine/MCJIT/remote/stubs-remote.ll
index ba58e1dc9278..703d8908e9d1 100644
--- a/llvm/test/ExecutionEngine/MCJIT/remote/stubs-remote.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/remote/stubs-remote.ll
@@ -11,28 +11,28 @@ entry:
 
 ; Test PR3043: @test should have the same address before and after
 ; it's JIT-compiled.
- at funcPtr = common global i1 ()* null, align 4
+ at funcPtr = common global ptr null, align 4
 @lcaic_failure = internal constant [46 x i8] c"@lazily_compiled_address_is_consistent failed\00"
 
 define void @lazily_compiled_address_is_consistent() nounwind {
 entry:
-	store i1 ()* @test, i1 ()** @funcPtr
+	store ptr @test, ptr @funcPtr
 	%pass = tail call i1 @test()		; <i32> [#uses=1]
 	br i1 %pass, label %pass_block, label %fail_block
 pass_block:
 	ret void
 fail_block:
-	call i32 @puts(i8* getelementptr([46 x i8], [46 x i8]* @lcaic_failure, i32 0, i32 0))
+	call i32 @puts(ptr @lcaic_failure)
 	call void @exit(i32 1)
 	unreachable
 }
 
 define i1 @test() nounwind {
 entry:
-	%tmp = load i1 ()*, i1 ()** @funcPtr
-	%eq = icmp eq i1 ()* %tmp, @test
+	%tmp = load ptr, ptr @funcPtr
+	%eq = icmp eq ptr %tmp, @test
 	ret i1 %eq
 }
 
-declare i32 @puts(i8*) noreturn
+declare i32 @puts(ptr) noreturn
 declare void @exit(i32) noreturn

diff  --git a/llvm/test/ExecutionEngine/MCJIT/remote/stubs-sm-pic.ll b/llvm/test/ExecutionEngine/MCJIT/remote/stubs-sm-pic.ll
index e9673c84144c..e6fc25cc6065 100644
--- a/llvm/test/ExecutionEngine/MCJIT/remote/stubs-sm-pic.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/remote/stubs-sm-pic.ll
@@ -10,28 +10,28 @@ entry:
 
 ; Test PR3043: @test should have the same address before and after
 ; it's JIT-compiled.
- at funcPtr = common global i1 ()* null, align 4
+ at funcPtr = common global ptr null, align 4
 @lcaic_failure = internal constant [46 x i8] c"@lazily_compiled_address_is_consistent failed\00"
 
 define void @lazily_compiled_address_is_consistent() nounwind {
 entry:
-	store i1 ()* @test, i1 ()** @funcPtr
+	store ptr @test, ptr @funcPtr
 	%pass = tail call i1 @test()		; <i32> [#uses=1]
 	br i1 %pass, label %pass_block, label %fail_block
 pass_block:
 	ret void
 fail_block:
-	call i32 @puts(i8* getelementptr([46 x i8], [46 x i8]* @lcaic_failure, i32 0, i32 0))
+	call i32 @puts(ptr @lcaic_failure)
 	call void @exit(i32 1)
 	unreachable
 }
 
 define i1 @test() nounwind {
 entry:
-	%tmp = load i1 ()*, i1 ()** @funcPtr
-	%eq = icmp eq i1 ()* %tmp, @test
+	%tmp = load ptr, ptr @funcPtr
+	%eq = icmp eq ptr %tmp, @test
 	ret i1 %eq
 }
 
-declare i32 @puts(i8*) noreturn
+declare i32 @puts(ptr) noreturn
 declare void @exit(i32) noreturn

diff  --git a/llvm/test/ExecutionEngine/MCJIT/remote/test-common-symbols-remote.ll b/llvm/test/ExecutionEngine/MCJIT/remote/test-common-symbols-remote.ll
index 5b1c491339b8..6a5cc374ffb8 100644
--- a/llvm/test/ExecutionEngine/MCJIT/remote/test-common-symbols-remote.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/remote/test-common-symbols-remote.ll
@@ -33,58 +33,58 @@ define i32 @main() nounwind {
 entry:
   %retval = alloca i32, align 4
   %i = alloca i32, align 4
-  store i32 0, i32* %retval
-  %0 = load i32, i32* @zero_int, align 4
+  store i32 0, ptr %retval
+  %0 = load i32, ptr @zero_int, align 4
   %add = add nsw i32 %0, 5
   %idxprom = sext i32 %add to i64
-  %arrayidx = getelementptr inbounds [10 x i32], [10 x i32]* @zero_arr, i32 0, i64 %idxprom
-  store i32 40, i32* %arrayidx, align 4
-  %1 = load double, double* @zero_double, align 8
+  %arrayidx = getelementptr inbounds [10 x i32], ptr @zero_arr, i32 0, i64 %idxprom
+  store i32 40, ptr %arrayidx, align 4
+  %1 = load double, ptr @zero_double, align 8
   %cmp = fcmp olt double %1, 1.000000e+00
   br i1 %cmp, label %if.then, label %if.end
 
 if.then:                                          ; preds = %entry
-  %2 = load i32, i32* @zero_int, align 4
+  %2 = load i32, ptr @zero_int, align 4
   %add1 = add nsw i32 %2, 2
   %idxprom2 = sext i32 %add1 to i64
-  %arrayidx3 = getelementptr inbounds [10 x i32], [10 x i32]* @zero_arr, i32 0, i64 %idxprom2
-  store i32 70, i32* %arrayidx3, align 4
+  %arrayidx3 = getelementptr inbounds [10 x i32], ptr @zero_arr, i32 0, i64 %idxprom2
+  store i32 70, ptr %arrayidx3, align 4
   br label %if.end
 
 if.end:                                           ; preds = %if.then, %entry
-  store i32 1, i32* %i, align 4
+  store i32 1, ptr %i, align 4
   br label %for.cond
 
 for.cond:                                         ; preds = %for.inc, %if.end
-  %3 = load i32, i32* %i, align 4
+  %3 = load i32, ptr %i, align 4
   %cmp4 = icmp slt i32 %3, 10
   br i1 %cmp4, label %for.body, label %for.end
 
 for.body:                                         ; preds = %for.cond
-  %4 = load i32, i32* %i, align 4
+  %4 = load i32, ptr %i, align 4
   %sub = sub nsw i32 %4, 1
   %idxprom5 = sext i32 %sub to i64
-  %arrayidx6 = getelementptr inbounds [10 x i32], [10 x i32]* @zero_arr, i32 0, i64 %idxprom5
-  %5 = load i32, i32* %arrayidx6, align 4
-  %6 = load i32, i32* %i, align 4
+  %arrayidx6 = getelementptr inbounds [10 x i32], ptr @zero_arr, i32 0, i64 %idxprom5
+  %5 = load i32, ptr %arrayidx6, align 4
+  %6 = load i32, ptr %i, align 4
   %idxprom7 = sext i32 %6 to i64
-  %arrayidx8 = getelementptr inbounds [10 x i32], [10 x i32]* @zero_arr, i32 0, i64 %idxprom7
-  %7 = load i32, i32* %arrayidx8, align 4
+  %arrayidx8 = getelementptr inbounds [10 x i32], ptr @zero_arr, i32 0, i64 %idxprom7
+  %7 = load i32, ptr %arrayidx8, align 4
   %add9 = add nsw i32 %5, %7
-  %8 = load i32, i32* %i, align 4
+  %8 = load i32, ptr %i, align 4
   %idxprom10 = sext i32 %8 to i64
-  %arrayidx11 = getelementptr inbounds [10 x i32], [10 x i32]* @zero_arr, i32 0, i64 %idxprom10
-  store i32 %add9, i32* %arrayidx11, align 4
+  %arrayidx11 = getelementptr inbounds [10 x i32], ptr @zero_arr, i32 0, i64 %idxprom10
+  store i32 %add9, ptr %arrayidx11, align 4
   br label %for.inc
 
 for.inc:                                          ; preds = %for.body
-  %9 = load i32, i32* %i, align 4
+  %9 = load i32, ptr %i, align 4
   %inc = add nsw i32 %9, 1
-  store i32 %inc, i32* %i, align 4
+  store i32 %inc, ptr %i, align 4
   br label %for.cond
 
 for.end:                                          ; preds = %for.cond
-  %10 = load i32, i32* getelementptr inbounds ([10 x i32], [10 x i32]* @zero_arr, i32 0, i64 9), align 4
+  %10 = load i32, ptr getelementptr inbounds ([10 x i32], ptr @zero_arr, i32 0, i64 9), align 4
   %cmp12 = icmp eq i32 %10, 110
   %cond = select i1 %cmp12, i32 0, i32 -1
   ret i32 %cond

diff  --git a/llvm/test/ExecutionEngine/MCJIT/remote/test-data-align-remote.ll b/llvm/test/ExecutionEngine/MCJIT/remote/test-data-align-remote.ll
index c79de71f5801..53952f562b1e 100644
--- a/llvm/test/ExecutionEngine/MCJIT/remote/test-data-align-remote.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/remote/test-data-align-remote.ll
@@ -7,7 +7,7 @@
 
 @var = global i32 0, align 32
 define i32 @main() nounwind {
-  %addr = ptrtoint i32* @var to i64
+  %addr = ptrtoint ptr @var to i64
   %mask = and i64 %addr, 31
   %tst = icmp eq i64 %mask, 0
   br i1 %tst, label %good, label %bad

diff  --git a/llvm/test/ExecutionEngine/MCJIT/remote/test-fp-no-external-funcs-remote.ll b/llvm/test/ExecutionEngine/MCJIT/remote/test-fp-no-external-funcs-remote.ll
index 580e550b2214..b34392bc9615 100644
--- a/llvm/test/ExecutionEngine/MCJIT/remote/test-fp-no-external-funcs-remote.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/remote/test-fp-no-external-funcs-remote.ll
@@ -3,21 +3,21 @@
 ; UNSUPPORTED: powerpc64-unknown-linux-gnu
 ; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed
 
-define double @test(double* %DP, double %Arg) nounwind {
-	%D = load double, double* %DP		; <double> [#uses=1]
+define double @test(ptr %DP, double %Arg) nounwind {
+	%D = load double, ptr %DP		; <double> [#uses=1]
 	%V = fadd double %D, 1.000000e+00		; <double> [#uses=2]
 	%W = fsub double %V, %V		; <double> [#uses=3]
 	%X = fmul double %W, %W		; <double> [#uses=2]
 	%Y = fdiv double %X, %X		; <double> [#uses=2]
 	%Q = fadd double %Y, %Arg		; <double> [#uses=1]
 	%R = bitcast double %Q to double		; <double> [#uses=1]
-	store double %Q, double* %DP
+	store double %Q, ptr %DP
 	ret double %Y
 }
 
 define i32 @main() nounwind {
-	%X = alloca double		; <double*> [#uses=2]
-	store double 0.000000e+00, double* %X
-	call double @test( double* %X, double 2.000000e+00 )		; <double>:1 [#uses=0]
+	%X = alloca double		; <ptr> [#uses=2]
+	store double 0.000000e+00, ptr %X
+	call double @test( ptr %X, double 2.000000e+00 )		; <double>:1 [#uses=0]
 	ret i32 0
 }

diff  --git a/llvm/test/ExecutionEngine/MCJIT/remote/test-global-init-nonzero-remote.ll b/llvm/test/ExecutionEngine/MCJIT/remote/test-global-init-nonzero-remote.ll
index 9c6498553e12..0898fd39ffc3 100644
--- a/llvm/test/ExecutionEngine/MCJIT/remote/test-global-init-nonzero-remote.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/remote/test-global-init-nonzero-remote.ll
@@ -9,29 +9,29 @@ define i32 @main() nounwind {
 entry:
   %retval = alloca i32, align 4
   %i = alloca i32, align 4
-  store i32 0, i32* %retval
-  store i32 0, i32* %i, align 4
+  store i32 0, ptr %retval
+  store i32 0, ptr %i, align 4
   br label %for.cond
 
 for.cond:                                         ; preds = %for.inc, %entry
-  %0 = load i32, i32* %i, align 4
+  %0 = load i32, ptr %i, align 4
   %cmp = icmp slt i32 %0, 49
   br i1 %cmp, label %for.body, label %for.end
 
 for.body:                                         ; preds = %for.cond
-  %1 = load i32, i32* @count, align 4
+  %1 = load i32, ptr @count, align 4
   %inc = add nsw i32 %1, 1
-  store i32 %inc, i32* @count, align 4
+  store i32 %inc, ptr @count, align 4
   br label %for.inc
 
 for.inc:                                          ; preds = %for.body
-  %2 = load i32, i32* %i, align 4
+  %2 = load i32, ptr %i, align 4
   %inc1 = add nsw i32 %2, 1
-  store i32 %inc1, i32* %i, align 4
+  store i32 %inc1, ptr %i, align 4
   br label %for.cond
 
 for.end:                                          ; preds = %for.cond
-  %3 = load i32, i32* @count, align 4
+  %3 = load i32, ptr @count, align 4
   %sub = sub nsw i32 %3, 50
   ret i32 %sub
 }

diff  --git a/llvm/test/ExecutionEngine/MCJIT/remote/test-global-init-nonzero-sm-pic.ll b/llvm/test/ExecutionEngine/MCJIT/remote/test-global-init-nonzero-sm-pic.ll
index 34f72bc9365a..115aa74d6f9f 100644
--- a/llvm/test/ExecutionEngine/MCJIT/remote/test-global-init-nonzero-sm-pic.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/remote/test-global-init-nonzero-sm-pic.ll
@@ -10,29 +10,29 @@ define i32 @main() nounwind {
 entry:
   %retval = alloca i32, align 4
   %i = alloca i32, align 4
-  store i32 0, i32* %retval
-  store i32 0, i32* %i, align 4
+  store i32 0, ptr %retval
+  store i32 0, ptr %i, align 4
   br label %for.cond
 
 for.cond:                                         ; preds = %for.inc, %entry
-  %0 = load i32, i32* %i, align 4
+  %0 = load i32, ptr %i, align 4
   %cmp = icmp slt i32 %0, 49
   br i1 %cmp, label %for.body, label %for.end
 
 for.body:                                         ; preds = %for.cond
-  %1 = load i32, i32* @count, align 4
+  %1 = load i32, ptr @count, align 4
   %inc = add nsw i32 %1, 1
-  store i32 %inc, i32* @count, align 4
+  store i32 %inc, ptr @count, align 4
   br label %for.inc
 
 for.inc:                                          ; preds = %for.body
-  %2 = load i32, i32* %i, align 4
+  %2 = load i32, ptr %i, align 4
   %inc1 = add nsw i32 %2, 1
-  store i32 %inc1, i32* %i, align 4
+  store i32 %inc1, ptr %i, align 4
   br label %for.cond
 
 for.end:                                          ; preds = %for.cond
-  %3 = load i32, i32* @count, align 4
+  %3 = load i32, ptr @count, align 4
   %sub = sub nsw i32 %3, 50
   ret i32 %sub
 }

diff  --git a/llvm/test/ExecutionEngine/MCJIT/remote/test-ptr-reloc-remote.ll b/llvm/test/ExecutionEngine/MCJIT/remote/test-ptr-reloc-remote.ll
index dbcd76921fef..3cc81aada2da 100644
--- a/llvm/test/ExecutionEngine/MCJIT/remote/test-ptr-reloc-remote.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/remote/test-ptr-reloc-remote.ll
@@ -4,15 +4,15 @@
 ; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed
 
 @.str = private unnamed_addr constant [6 x i8] c"data1\00", align 1
- at ptr = global i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i32 0, i32 0), align 4
+ at ptr = global ptr @.str, align 4
 @.str1 = private unnamed_addr constant [6 x i8] c"data2\00", align 1
- at ptr2 = global i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str1, i32 0, i32 0), align 4
+ at ptr2 = global ptr @.str1, align 4
 
-define i32 @main(i32 %argc, i8** nocapture %argv) nounwind readonly {
+define i32 @main(i32 %argc, ptr nocapture %argv) nounwind readonly {
 entry:
-  %0 = load i8*, i8** @ptr, align 4
-  %1 = load i8*, i8** @ptr2, align 4
-  %cmp = icmp eq i8* %0, %1
+  %0 = load ptr, ptr @ptr, align 4
+  %1 = load ptr, ptr @ptr2, align 4
+  %cmp = icmp eq ptr %0, %1
   %. = zext i1 %cmp to i32
   ret i32 %.
 }

diff  --git a/llvm/test/ExecutionEngine/MCJIT/remote/test-ptr-reloc-sm-pic.ll b/llvm/test/ExecutionEngine/MCJIT/remote/test-ptr-reloc-sm-pic.ll
index 20f232add47d..703e1cb354e8 100644
--- a/llvm/test/ExecutionEngine/MCJIT/remote/test-ptr-reloc-sm-pic.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/remote/test-ptr-reloc-sm-pic.ll
@@ -5,15 +5,15 @@
 ; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed
 
 @.str = private unnamed_addr constant [6 x i8] c"data1\00", align 1
- at ptr = global i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i32 0, i32 0), align 4
+ at ptr = global ptr @.str, align 4
 @.str1 = private unnamed_addr constant [6 x i8] c"data2\00", align 1
- at ptr2 = global i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str1, i32 0, i32 0), align 4
+ at ptr2 = global ptr @.str1, align 4
 
-define i32 @main(i32 %argc, i8** nocapture %argv) nounwind readonly {
+define i32 @main(i32 %argc, ptr nocapture %argv) nounwind readonly {
 entry:
-  %0 = load i8*, i8** @ptr, align 4
-  %1 = load i8*, i8** @ptr2, align 4
-  %cmp = icmp eq i8* %0, %1
+  %0 = load ptr, ptr @ptr, align 4
+  %1 = load ptr, ptr @ptr2, align 4
+  %cmp = icmp eq ptr %0, %1
   %. = zext i1 %cmp to i32
   ret i32 %.
 }

diff  --git a/llvm/test/ExecutionEngine/MCJIT/stubs-sm-pic.ll b/llvm/test/ExecutionEngine/MCJIT/stubs-sm-pic.ll
index 76eaefae2433..cfdebf793be2 100644
--- a/llvm/test/ExecutionEngine/MCJIT/stubs-sm-pic.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/stubs-sm-pic.ll
@@ -9,28 +9,28 @@ entry:
 
 ; Test PR3043: @test should have the same address before and after
 ; it's JIT-compiled.
- at funcPtr = common global i1 ()* null, align 4
+ at funcPtr = common global ptr null, align 4
 @lcaic_failure = internal constant [46 x i8] c"@lazily_compiled_address_is_consistent failed\00"
 
 define void @lazily_compiled_address_is_consistent() nounwind {
 entry:
-	store i1 ()* @test, i1 ()** @funcPtr
+	store ptr @test, ptr @funcPtr
 	%pass = tail call i1 @test()		; <i32> [#uses=1]
 	br i1 %pass, label %pass_block, label %fail_block
 pass_block:
 	ret void
 fail_block:
-	call i32 @puts(i8* getelementptr([46 x i8], [46 x i8]* @lcaic_failure, i32 0, i32 0))
+	call i32 @puts(ptr @lcaic_failure)
 	call void @exit(i32 1)
 	unreachable
 }
 
 define i1 @test() nounwind {
 entry:
-	%tmp = load i1 ()*, i1 ()** @funcPtr
-	%eq = icmp eq i1 ()* %tmp, @test
+	%tmp = load ptr, ptr @funcPtr
+	%eq = icmp eq ptr %tmp, @test
 	ret i1 %eq
 }
 
-declare i32 @puts(i8*) noreturn
+declare i32 @puts(ptr) noreturn
 declare void @exit(i32) noreturn

diff  --git a/llvm/test/ExecutionEngine/MCJIT/stubs.ll b/llvm/test/ExecutionEngine/MCJIT/stubs.ll
index 44255e992d51..4173038c9978 100644
--- a/llvm/test/ExecutionEngine/MCJIT/stubs.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/stubs.ll
@@ -8,28 +8,28 @@ entry:
 
 ; Test PR3043: @test should have the same address before and after
 ; it's JIT-compiled.
- at funcPtr = common global i1 ()* null, align 4
+ at funcPtr = common global ptr null, align 4
 @lcaic_failure = internal constant [46 x i8] c"@lazily_compiled_address_is_consistent failed\00"
 
 define void @lazily_compiled_address_is_consistent() nounwind {
 entry:
-	store i1 ()* @test, i1 ()** @funcPtr
+	store ptr @test, ptr @funcPtr
 	%pass = tail call i1 @test()		; <i32> [#uses=1]
 	br i1 %pass, label %pass_block, label %fail_block
 pass_block:
 	ret void
 fail_block:
-	call i32 @puts(i8* getelementptr([46 x i8], [46 x i8]* @lcaic_failure, i32 0, i32 0))
+	call i32 @puts(ptr @lcaic_failure)
 	call void @exit(i32 1)
 	unreachable
 }
 
 define i1 @test() nounwind {
 entry:
-	%tmp = load i1 ()*, i1 ()** @funcPtr
-	%eq = icmp eq i1 ()* %tmp, @test
+	%tmp = load ptr, ptr @funcPtr
+	%eq = icmp eq ptr %tmp, @test
 	ret i1 %eq
 }
 
-declare i32 @puts(i8*) noreturn
+declare i32 @puts(ptr) noreturn
 declare void @exit(i32) noreturn

diff  --git a/llvm/test/ExecutionEngine/MCJIT/test-call-no-external-funcs.ll b/llvm/test/ExecutionEngine/MCJIT/test-call-no-external-funcs.ll
index a94410579368..7da140c3974c 100644
--- a/llvm/test/ExecutionEngine/MCJIT/test-call-no-external-funcs.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/test-call-no-external-funcs.ll
@@ -9,7 +9,7 @@ entry:
 define i32 @main() nounwind uwtable {
 entry:
   %retval = alloca i32, align 4
-  store i32 0, i32* %retval
+  store i32 0, ptr %retval
   %call = call i32 @_Z14func_exit_codev()
   ret i32 %call
 }

diff  --git a/llvm/test/ExecutionEngine/MCJIT/test-call.ll b/llvm/test/ExecutionEngine/MCJIT/test-call.ll
index e20e652316f8..6f96362efe6c 100644
--- a/llvm/test/ExecutionEngine/MCJIT/test-call.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/test-call.ll
@@ -9,14 +9,14 @@ define i32 @test(i8 %C, i16 %S) {
 	ret i32 %Y
 }
 
-define void @FP(void (i32)* %F) {
+define void @FP(ptr %F) {
 	%X = call i32 @test( i8 123, i16 1024 )		; <i32> [#uses=1]
 	call void %F( i32 %X )
 	ret void
 }
 
 define i32 @main() {
-	call void @FP( void (i32)* @exit )
+	call void @FP( ptr @exit )
 	ret i32 1
 }
 

diff  --git a/llvm/test/ExecutionEngine/MCJIT/test-common-symbols-alignment.ll b/llvm/test/ExecutionEngine/MCJIT/test-common-symbols-alignment.ll
index 648922ec49cb..d1f4d7767158 100644
--- a/llvm/test/ExecutionEngine/MCJIT/test-common-symbols-alignment.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/test-common-symbols-alignment.ll
@@ -12,22 +12,22 @@ define i32 @main() nounwind {
 entry:
     %retval = alloca i32, align 4
     %ptr = alloca i32, align 4
-    store i32 0, i32* %retval
-    store i32 ptrtoint (i32* @CS3 to i32), i32* %ptr, align 4
-    %0 = load i32, i32* %ptr, align 4
+    store i32 0, ptr %retval
+    store i32 ptrtoint (ptr @CS3 to i32), ptr %ptr, align 4
+    %0 = load i32, ptr %ptr, align 4
     %and = and i32 %0, 15
     %tobool = icmp ne i32 %and, 0
     br i1 %tobool, label %if.then, label %if.else
 
 if.then:                                          ; preds = %entry
-    store i32 1, i32* %retval
+    store i32 1, ptr %retval
     br label %return
 
 if.else:                                          ; preds = %entry
-    store i32 0, i32* %retval
+    store i32 0, ptr %retval
     br label %return
 
 return:                                           ; preds = %if.else, %if.then
-    %1 = load i32, i32* %retval
+    %1 = load i32, ptr %retval
     ret i32 %1
 }

diff  --git a/llvm/test/ExecutionEngine/MCJIT/test-common-symbols.ll b/llvm/test/ExecutionEngine/MCJIT/test-common-symbols.ll
index 2745279a2d75..a90c5f27c356 100644
--- a/llvm/test/ExecutionEngine/MCJIT/test-common-symbols.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/test-common-symbols.ll
@@ -30,58 +30,58 @@ define i32 @main() nounwind {
 entry:
   %retval = alloca i32, align 4
   %i = alloca i32, align 4
-  store i32 0, i32* %retval
-  %0 = load i32, i32* @zero_int, align 4
+  store i32 0, ptr %retval
+  %0 = load i32, ptr @zero_int, align 4
   %add = add nsw i32 %0, 5
   %idxprom = sext i32 %add to i64
-  %arrayidx = getelementptr inbounds [10 x i32], [10 x i32]* @zero_arr, i32 0, i64 %idxprom
-  store i32 40, i32* %arrayidx, align 4
-  %1 = load double, double* @zero_double, align 8
+  %arrayidx = getelementptr inbounds [10 x i32], ptr @zero_arr, i32 0, i64 %idxprom
+  store i32 40, ptr %arrayidx, align 4
+  %1 = load double, ptr @zero_double, align 8
   %cmp = fcmp olt double %1, 1.000000e+00
   br i1 %cmp, label %if.then, label %if.end
 
 if.then:                                          ; preds = %entry
-  %2 = load i32, i32* @zero_int, align 4
+  %2 = load i32, ptr @zero_int, align 4
   %add1 = add nsw i32 %2, 2
   %idxprom2 = sext i32 %add1 to i64
-  %arrayidx3 = getelementptr inbounds [10 x i32], [10 x i32]* @zero_arr, i32 0, i64 %idxprom2
-  store i32 70, i32* %arrayidx3, align 4
+  %arrayidx3 = getelementptr inbounds [10 x i32], ptr @zero_arr, i32 0, i64 %idxprom2
+  store i32 70, ptr %arrayidx3, align 4
   br label %if.end
 
 if.end:                                           ; preds = %if.then, %entry
-  store i32 1, i32* %i, align 4
+  store i32 1, ptr %i, align 4
   br label %for.cond
 
 for.cond:                                         ; preds = %for.inc, %if.end
-  %3 = load i32, i32* %i, align 4
+  %3 = load i32, ptr %i, align 4
   %cmp4 = icmp slt i32 %3, 10
   br i1 %cmp4, label %for.body, label %for.end
 
 for.body:                                         ; preds = %for.cond
-  %4 = load i32, i32* %i, align 4
+  %4 = load i32, ptr %i, align 4
   %sub = sub nsw i32 %4, 1
   %idxprom5 = sext i32 %sub to i64
-  %arrayidx6 = getelementptr inbounds [10 x i32], [10 x i32]* @zero_arr, i32 0, i64 %idxprom5
-  %5 = load i32, i32* %arrayidx6, align 4
-  %6 = load i32, i32* %i, align 4
+  %arrayidx6 = getelementptr inbounds [10 x i32], ptr @zero_arr, i32 0, i64 %idxprom5
+  %5 = load i32, ptr %arrayidx6, align 4
+  %6 = load i32, ptr %i, align 4
   %idxprom7 = sext i32 %6 to i64
-  %arrayidx8 = getelementptr inbounds [10 x i32], [10 x i32]* @zero_arr, i32 0, i64 %idxprom7
-  %7 = load i32, i32* %arrayidx8, align 4
+  %arrayidx8 = getelementptr inbounds [10 x i32], ptr @zero_arr, i32 0, i64 %idxprom7
+  %7 = load i32, ptr %arrayidx8, align 4
   %add9 = add nsw i32 %5, %7
-  %8 = load i32, i32* %i, align 4
+  %8 = load i32, ptr %i, align 4
   %idxprom10 = sext i32 %8 to i64
-  %arrayidx11 = getelementptr inbounds [10 x i32], [10 x i32]* @zero_arr, i32 0, i64 %idxprom10
-  store i32 %add9, i32* %arrayidx11, align 4
+  %arrayidx11 = getelementptr inbounds [10 x i32], ptr @zero_arr, i32 0, i64 %idxprom10
+  store i32 %add9, ptr %arrayidx11, align 4
   br label %for.inc
 
 for.inc:                                          ; preds = %for.body
-  %9 = load i32, i32* %i, align 4
+  %9 = load i32, ptr %i, align 4
   %inc = add nsw i32 %9, 1
-  store i32 %inc, i32* %i, align 4
+  store i32 %inc, ptr %i, align 4
   br label %for.cond
 
 for.end:                                          ; preds = %for.cond
-  %10 = load i32, i32* getelementptr inbounds ([10 x i32], [10 x i32]* @zero_arr, i32 0, i64 9), align 4
+  %10 = load i32, ptr getelementptr inbounds ([10 x i32], ptr @zero_arr, i32 0, i64 9), align 4
   %cmp12 = icmp eq i32 %10, 110
   %cond = select i1 %cmp12, i32 0, i32 -1
   ret i32 %cond

diff  --git a/llvm/test/ExecutionEngine/MCJIT/test-constantexpr.ll b/llvm/test/ExecutionEngine/MCJIT/test-constantexpr.ll
index e4dcdaeac937..c498fcf867ed 100644
--- a/llvm/test/ExecutionEngine/MCJIT/test-constantexpr.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/test-constantexpr.ll
@@ -3,11 +3,11 @@
 
 ; This tests to make sure that we can evaluate weird constant expressions
 
- at A = global i32 5		; <i32*> [#uses=1]
- at B = global i32 6		; <i32*> [#uses=1]
+ at A = global i32 5		; <ptr> [#uses=1]
+ at B = global i32 6		; <ptr> [#uses=1]
 
 define i32 @main() {
-	%A = or i1 false, icmp slt (i32* @A, i32* @B)		; <i1> [#uses=0]
+	%A = or i1 false, icmp slt (ptr @A, ptr @B)		; <i1> [#uses=0]
 	ret i32 0
 }
 

diff  --git a/llvm/test/ExecutionEngine/MCJIT/test-data-align.ll b/llvm/test/ExecutionEngine/MCJIT/test-data-align.ll
index bb0f73a97b6c..57401022bd21 100644
--- a/llvm/test/ExecutionEngine/MCJIT/test-data-align.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/test-data-align.ll
@@ -5,7 +5,7 @@
 
 @var = global i32 0, align 32
 define i32 @main() {
-  %addr = ptrtoint i32* @var to i64
+  %addr = ptrtoint ptr @var to i64
   %mask = and i64 %addr, 31
   %tst = icmp eq i64 %mask, 0
   br i1 %tst, label %good, label %bad

diff  --git a/llvm/test/ExecutionEngine/MCJIT/test-fp-no-external-funcs.ll b/llvm/test/ExecutionEngine/MCJIT/test-fp-no-external-funcs.ll
index a8c5a8b83e20..ccccb87a4de0 100644
--- a/llvm/test/ExecutionEngine/MCJIT/test-fp-no-external-funcs.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/test-fp-no-external-funcs.ll
@@ -1,22 +1,22 @@
 ; RUN: %lli -jit-kind=mcjit %s > /dev/null
 ; RUN: %lli %s > /dev/null
 
-define double @test(double* %DP, double %Arg) {
-	%D = load double, double* %DP		; <double> [#uses=1]
+define double @test(ptr %DP, double %Arg) {
+	%D = load double, ptr %DP		; <double> [#uses=1]
 	%V = fadd double %D, 1.000000e+00		; <double> [#uses=2]
 	%W = fsub double %V, %V		; <double> [#uses=3]
 	%X = fmul double %W, %W		; <double> [#uses=2]
 	%Y = fdiv double %X, %X		; <double> [#uses=2]
 	%Q = fadd double %Y, %Arg		; <double> [#uses=1]
 	%R = bitcast double %Q to double		; <double> [#uses=1]
-	store double %Q, double* %DP
+	store double %Q, ptr %DP
 	ret double %Y
 }
 
 define i32 @main() {
-	%X = alloca double		; <double*> [#uses=2]
-	store double 0.000000e+00, double* %X
-	call double @test( double* %X, double 2.000000e+00 )		; <double>:1 [#uses=0]
+	%X = alloca double		; <ptr> [#uses=2]
+	store double 0.000000e+00, ptr %X
+	call double @test( ptr %X, double 2.000000e+00 )		; <double>:1 [#uses=0]
 	ret i32 0
 }
 

diff  --git a/llvm/test/ExecutionEngine/MCJIT/test-fp.ll b/llvm/test/ExecutionEngine/MCJIT/test-fp.ll
index 6936cac45ced..c79d842dc6e1 100644
--- a/llvm/test/ExecutionEngine/MCJIT/test-fp.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/test-fp.ll
@@ -1,8 +1,8 @@
 ; RUN: %lli -jit-kind=mcjit %s > /dev/null
 ; RUN: %lli %s > /dev/null
 
-define double @test(double* %DP, double %Arg) {
-	%D = load double, double* %DP		; <double> [#uses=1]
+define double @test(ptr %DP, double %Arg) {
+	%D = load double, ptr %DP		; <double> [#uses=1]
 	%V = fadd double %D, 1.000000e+00		; <double> [#uses=2]
 	%W = fsub double %V, %V		; <double> [#uses=3]
 	%X = fmul double %W, %W		; <double> [#uses=2]
@@ -11,14 +11,14 @@ define double @test(double* %DP, double %Arg) {
 	%Z1 = fdiv double %Z, %W		; <double> [#uses=0]
 	%Q = fadd double %Z, %Arg		; <double> [#uses=1]
 	%R = bitcast double %Q to double		; <double> [#uses=1]
-	store double %R, double* %DP
+	store double %R, ptr %DP
 	ret double %Z
 }
 
 define i32 @main() {
-	%X = alloca double		; <double*> [#uses=2]
-	store double 0.000000e+00, double* %X
-	call double @test( double* %X, double 2.000000e+00 )		; <double>:1 [#uses=0]
+	%X = alloca double		; <ptr> [#uses=2]
+	store double 0.000000e+00, ptr %X
+	call double @test( ptr %X, double 2.000000e+00 )		; <double>:1 [#uses=0]
 	ret i32 0
 }
 

diff  --git a/llvm/test/ExecutionEngine/MCJIT/test-global-ctors.ll b/llvm/test/ExecutionEngine/MCJIT/test-global-ctors.ll
index f0f77b2690a0..1dbe9398065d 100644
--- a/llvm/test/ExecutionEngine/MCJIT/test-global-ctors.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/test-global-ctors.ll
@@ -2,18 +2,18 @@
 ; RUN: %lli %s > /dev/null
 ; UNSUPPORTED: darwin
 @var = global i32 1, align 4
- at llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @ctor_func, i8* null }]
- at llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @dtor_func, i8* null }]
+ at llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 65535, ptr @ctor_func, ptr null }]
+ at llvm.global_dtors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 65535, ptr @dtor_func, ptr null }]
 
 define i32 @main() nounwind {
 entry:
-  %0 = load i32, i32* @var, align 4
+  %0 = load i32, ptr @var, align 4
   ret i32 %0
 }
 
 define internal void @ctor_func() section ".text.startup" {
 entry:
-  store i32 0, i32* @var, align 4
+  store i32 0, ptr @var, align 4
   ret void
 }
 

diff  --git a/llvm/test/ExecutionEngine/MCJIT/test-global-init-nonzero-sm-pic.ll b/llvm/test/ExecutionEngine/MCJIT/test-global-init-nonzero-sm-pic.ll
index ae02faa361d7..4a348e224bbb 100644
--- a/llvm/test/ExecutionEngine/MCJIT/test-global-init-nonzero-sm-pic.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/test-global-init-nonzero-sm-pic.ll
@@ -8,29 +8,29 @@ define i32 @main() nounwind uwtable {
 entry:
   %retval = alloca i32, align 4
   %i = alloca i32, align 4
-  store i32 0, i32* %retval
-  store i32 0, i32* %i, align 4
+  store i32 0, ptr %retval
+  store i32 0, ptr %i, align 4
   br label %for.cond
 
 for.cond:                                         ; preds = %for.inc, %entry
-  %0 = load i32, i32* %i, align 4
+  %0 = load i32, ptr %i, align 4
   %cmp = icmp slt i32 %0, 49
   br i1 %cmp, label %for.body, label %for.end
 
 for.body:                                         ; preds = %for.cond
-  %1 = load i32, i32* @count, align 4
+  %1 = load i32, ptr @count, align 4
   %inc = add nsw i32 %1, 1
-  store i32 %inc, i32* @count, align 4
+  store i32 %inc, ptr @count, align 4
   br label %for.inc
 
 for.inc:                                          ; preds = %for.body
-  %2 = load i32, i32* %i, align 4
+  %2 = load i32, ptr %i, align 4
   %inc1 = add nsw i32 %2, 1
-  store i32 %inc1, i32* %i, align 4
+  store i32 %inc1, ptr %i, align 4
   br label %for.cond
 
 for.end:                                          ; preds = %for.cond
-  %3 = load i32, i32* @count, align 4
+  %3 = load i32, ptr @count, align 4
   %sub = sub nsw i32 %3, 50
   ret i32 %sub
 }

diff  --git a/llvm/test/ExecutionEngine/MCJIT/test-global-init-nonzero.ll b/llvm/test/ExecutionEngine/MCJIT/test-global-init-nonzero.ll
index fdbd3d293db2..b69f03c72215 100644
--- a/llvm/test/ExecutionEngine/MCJIT/test-global-init-nonzero.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/test-global-init-nonzero.ll
@@ -7,29 +7,29 @@ define i32 @main() nounwind uwtable {
 entry:
   %retval = alloca i32, align 4
   %i = alloca i32, align 4
-  store i32 0, i32* %retval
-  store i32 0, i32* %i, align 4
+  store i32 0, ptr %retval
+  store i32 0, ptr %i, align 4
   br label %for.cond
 
 for.cond:                                         ; preds = %for.inc, %entry
-  %0 = load i32, i32* %i, align 4
+  %0 = load i32, ptr %i, align 4
   %cmp = icmp slt i32 %0, 49
   br i1 %cmp, label %for.body, label %for.end
 
 for.body:                                         ; preds = %for.cond
-  %1 = load i32, i32* @count, align 4
+  %1 = load i32, ptr @count, align 4
   %inc = add nsw i32 %1, 1
-  store i32 %inc, i32* @count, align 4
+  store i32 %inc, ptr @count, align 4
   br label %for.inc
 
 for.inc:                                          ; preds = %for.body
-  %2 = load i32, i32* %i, align 4
+  %2 = load i32, ptr %i, align 4
   %inc1 = add nsw i32 %2, 1
-  store i32 %inc1, i32* %i, align 4
+  store i32 %inc1, ptr %i, align 4
   br label %for.cond
 
 for.end:                                          ; preds = %for.cond
-  %3 = load i32, i32* @count, align 4
+  %3 = load i32, ptr @count, align 4
   %sub = sub nsw i32 %3, 50
   ret i32 %sub
 }

diff  --git a/llvm/test/ExecutionEngine/MCJIT/test-global.ll b/llvm/test/ExecutionEngine/MCJIT/test-global.ll
index d6f2105414ca..c4460d228e16 100644
--- a/llvm/test/ExecutionEngine/MCJIT/test-global.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/test-global.ll
@@ -7,29 +7,29 @@ define i32 @main() nounwind uwtable {
 entry:
   %retval = alloca i32, align 4
   %i = alloca i32, align 4
-  store i32 0, i32* %retval
-  store i32 0, i32* %i, align 4
+  store i32 0, ptr %retval
+  store i32 0, ptr %i, align 4
   br label %for.cond
 
 for.cond:                                         ; preds = %for.inc, %entry
-  %0 = load i32, i32* %i, align 4
+  %0 = load i32, ptr %i, align 4
   %cmp = icmp slt i32 %0, 50
   br i1 %cmp, label %for.body, label %for.end
 
 for.body:                                         ; preds = %for.cond
-  %1 = load i32, i32* @count, align 4
+  %1 = load i32, ptr @count, align 4
   %inc = add nsw i32 %1, 1
-  store i32 %inc, i32* @count, align 4
+  store i32 %inc, ptr @count, align 4
   br label %for.inc
 
 for.inc:                                          ; preds = %for.body
-  %2 = load i32, i32* %i, align 4
+  %2 = load i32, ptr %i, align 4
   %inc1 = add nsw i32 %2, 1
-  store i32 %inc1, i32* %i, align 4
+  store i32 %inc1, ptr %i, align 4
   br label %for.cond
 
 for.end:                                          ; preds = %for.cond
-  %3 = load i32, i32* @count, align 4
+  %3 = load i32, ptr @count, align 4
   %sub = sub nsw i32 %3, 50
   ret i32 %sub
 }

diff  --git a/llvm/test/ExecutionEngine/MCJIT/test-loadstore.ll b/llvm/test/ExecutionEngine/MCJIT/test-loadstore.ll
index 660e33e3c9eb..41b949406845 100644
--- a/llvm/test/ExecutionEngine/MCJIT/test-loadstore.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/test-loadstore.ll
@@ -1,32 +1,32 @@
 ; RUN: %lli -jit-kind=mcjit %s > /dev/null
 ; RUN: %lli %s > /dev/null
 
-define void @test(i8* %P, i16* %P.upgrd.1, i32* %P.upgrd.2, i64* %P.upgrd.3) {
-	%V = load i8, i8* %P		; <i8> [#uses=1]
-	store i8 %V, i8* %P
-	%V.upgrd.4 = load i16, i16* %P.upgrd.1		; <i16> [#uses=1]
-	store i16 %V.upgrd.4, i16* %P.upgrd.1
-	%V.upgrd.5 = load i32, i32* %P.upgrd.2		; <i32> [#uses=1]
-	store i32 %V.upgrd.5, i32* %P.upgrd.2
-	%V.upgrd.6 = load i64, i64* %P.upgrd.3		; <i64> [#uses=1]
-	store i64 %V.upgrd.6, i64* %P.upgrd.3
+define void @test(ptr %P, ptr %P.upgrd.1, ptr %P.upgrd.2, ptr %P.upgrd.3) {
+	%V = load i8, ptr %P		; <i8> [#uses=1]
+	store i8 %V, ptr %P
+	%V.upgrd.4 = load i16, ptr %P.upgrd.1		; <i16> [#uses=1]
+	store i16 %V.upgrd.4, ptr %P.upgrd.1
+	%V.upgrd.5 = load i32, ptr %P.upgrd.2		; <i32> [#uses=1]
+	store i32 %V.upgrd.5, ptr %P.upgrd.2
+	%V.upgrd.6 = load i64, ptr %P.upgrd.3		; <i64> [#uses=1]
+	store i64 %V.upgrd.6, ptr %P.upgrd.3
 	ret void
 }
 
 define i32 @varalloca(i32 %Size) {
         ;; Variable sized alloca
-	%X = alloca i32, i32 %Size		; <i32*> [#uses=2]
-	store i32 %Size, i32* %X
-	%Y = load i32, i32* %X		; <i32> [#uses=1]
+	%X = alloca i32, i32 %Size		; <ptr> [#uses=2]
+	store i32 %Size, ptr %X
+	%Y = load i32, ptr %X		; <i32> [#uses=1]
 	ret i32 %Y
 }
 
 define i32 @main() {
-	%A = alloca i8		; <i8*> [#uses=1]
-	%B = alloca i16		; <i16*> [#uses=1]
-	%C = alloca i32		; <i32*> [#uses=1]
-	%D = alloca i64		; <i64*> [#uses=1]
-	call void @test( i8* %A, i16* %B, i32* %C, i64* %D )
+	%A = alloca i8		; <ptr> [#uses=1]
+	%B = alloca i16		; <ptr> [#uses=1]
+	%C = alloca i32		; <ptr> [#uses=1]
+	%D = alloca i64		; <ptr> [#uses=1]
+	call void @test( ptr %A, ptr %B, ptr %C, ptr %D )
 	call i32 @varalloca( i32 7 )		; <i32>:1 [#uses=0]
 	ret i32 0
 }

diff  --git a/llvm/test/ExecutionEngine/MCJIT/test-local.ll b/llvm/test/ExecutionEngine/MCJIT/test-local.ll
index f00489bfc01a..bdb91aca29e4 100644
--- a/llvm/test/ExecutionEngine/MCJIT/test-local.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/test-local.ll
@@ -6,30 +6,30 @@ entry:
   %retval = alloca i32, align 4
   %count = alloca i32, align 4
   %i = alloca i32, align 4
-  store i32 0, i32* %retval
-  store i32 0, i32* %count, align 4
-  store i32 0, i32* %i, align 4
+  store i32 0, ptr %retval
+  store i32 0, ptr %count, align 4
+  store i32 0, ptr %i, align 4
   br label %for.cond
 
 for.cond:                                         ; preds = %for.inc, %entry
-  %0 = load i32, i32* %i, align 4
+  %0 = load i32, ptr %i, align 4
   %cmp = icmp slt i32 %0, 50
   br i1 %cmp, label %for.body, label %for.end
 
 for.body:                                         ; preds = %for.cond
-  %1 = load i32, i32* %count, align 4
+  %1 = load i32, ptr %count, align 4
   %inc = add nsw i32 %1, 1
-  store i32 %inc, i32* %count, align 4
+  store i32 %inc, ptr %count, align 4
   br label %for.inc
 
 for.inc:                                          ; preds = %for.body
-  %2 = load i32, i32* %i, align 4
+  %2 = load i32, ptr %i, align 4
   %inc1 = add nsw i32 %2, 1
-  store i32 %inc1, i32* %i, align 4
+  store i32 %inc1, ptr %i, align 4
   br label %for.cond
 
 for.end:                                          ; preds = %for.cond
-  %3 = load i32, i32* %count, align 4
+  %3 = load i32, ptr %count, align 4
   %sub = sub nsw i32 %3, 50
   ret i32 %sub
 }

diff  --git a/llvm/test/ExecutionEngine/MCJIT/test-phi.ll b/llvm/test/ExecutionEngine/MCJIT/test-phi.ll
index 8cee709c756b..24e421a7ae6e 100644
--- a/llvm/test/ExecutionEngine/MCJIT/test-phi.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/test-phi.ll
@@ -2,13 +2,13 @@
 ; RUN: %lli %s > /dev/null
 
 ; test phi node
- at Y = global i32 6		; <i32*> [#uses=1]
+ at Y = global i32 6		; <ptr> [#uses=1]
 
-define void @blah(i32* %X) {
+define void @blah(ptr %X) {
 ; <label>:0
 	br label %T
 T:		; preds = %Dead, %0
-	phi i32* [ %X, %0 ], [ @Y, %Dead ]		; <i32*>:1 [#uses=0]
+	phi ptr [ %X, %0 ], [ @Y, %Dead ]		; <ptr>:1 [#uses=0]
 	ret void
 Dead:		; No predecessors!
 	br label %T

diff  --git a/llvm/test/ExecutionEngine/MCJIT/test-ptr-reloc-sm-pic.ll b/llvm/test/ExecutionEngine/MCJIT/test-ptr-reloc-sm-pic.ll
index eb312774c5b3..214a9d90189b 100644
--- a/llvm/test/ExecutionEngine/MCJIT/test-ptr-reloc-sm-pic.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/test-ptr-reloc-sm-pic.ll
@@ -3,15 +3,15 @@
 ; XFAIL: mips-, mipsel-, aarch64, arm, i686, i386
 
 @.str = private unnamed_addr constant [6 x i8] c"data1\00", align 1
- at ptr = global i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i32 0, i32 0), align 4
+ at ptr = global ptr @.str, align 4
 @.str1 = private unnamed_addr constant [6 x i8] c"data2\00", align 1
- at ptr2 = global i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str1, i32 0, i32 0), align 4
+ at ptr2 = global ptr @.str1, align 4
 
-define i32 @main(i32 %argc, i8** nocapture %argv) nounwind readonly {
+define i32 @main(i32 %argc, ptr nocapture %argv) nounwind readonly {
 entry:
-  %0 = load i8*, i8** @ptr, align 4
-  %1 = load i8*, i8** @ptr2, align 4
-  %cmp = icmp eq i8* %0, %1
+  %0 = load ptr, ptr @ptr, align 4
+  %1 = load ptr, ptr @ptr2, align 4
+  %cmp = icmp eq ptr %0, %1
   %. = zext i1 %cmp to i32
   ret i32 %.
 }

diff  --git a/llvm/test/ExecutionEngine/MCJIT/test-ptr-reloc.ll b/llvm/test/ExecutionEngine/MCJIT/test-ptr-reloc.ll
index 854ba40032a5..a4f7ac498275 100644
--- a/llvm/test/ExecutionEngine/MCJIT/test-ptr-reloc.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/test-ptr-reloc.ll
@@ -2,15 +2,15 @@
 ; RUN: %lli -O0 %s
 
 @.str = private unnamed_addr constant [6 x i8] c"data1\00", align 1
- at ptr = global i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i32 0, i32 0), align 4
+ at ptr = global ptr @.str, align 4
 @.str1 = private unnamed_addr constant [6 x i8] c"data2\00", align 1
- at ptr2 = global i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str1, i32 0, i32 0), align 4
+ at ptr2 = global ptr @.str1, align 4
 
-define i32 @main(i32 %argc, i8** nocapture %argv) nounwind readonly {
+define i32 @main(i32 %argc, ptr nocapture %argv) nounwind readonly {
 entry:
-  %0 = load i8*, i8** @ptr, align 4
-  %1 = load i8*, i8** @ptr2, align 4
-  %cmp = icmp eq i8* %0, %1
+  %0 = load ptr, ptr @ptr, align 4
+  %1 = load ptr, ptr @ptr2, align 4
+  %cmp = icmp eq ptr %0, %1
   %. = zext i1 %cmp to i32
   ret i32 %.
 }

diff  --git a/llvm/test/ExecutionEngine/MCJIT/test-return.ll b/llvm/test/ExecutionEngine/MCJIT/test-return.ll
index 305439833f33..f6d4c9b49e60 100644
--- a/llvm/test/ExecutionEngine/MCJIT/test-return.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/test-return.ll
@@ -4,6 +4,6 @@
 define i32 @main() nounwind uwtable {
 entry:
   %retval = alloca i32, align 4
-  store i32 0, i32* %retval
+  store i32 0, ptr %retval
   ret i32 0
 }

diff  --git a/llvm/test/ExecutionEngine/MCJIT/weak-function.ll b/llvm/test/ExecutionEngine/MCJIT/weak-function.ll
index 5dcb1f892a32..80cb9e78dd33 100644
--- a/llvm/test/ExecutionEngine/MCJIT/weak-function.ll
+++ b/llvm/test/ExecutionEngine/MCJIT/weak-function.ll
@@ -12,18 +12,18 @@ entry:
   ret i32 0
 }
 
-define i8* @foo() {
+define ptr @foo() {
 entry:
-  ret i8* bitcast (i32 ()* @baz to i8*)
+  ret ptr @baz
 }
 
-declare i8* @bar()
+declare ptr @bar()
 
-define i32 @main(i32 %argc, i8** %argv) {
+define i32 @main(i32 %argc, ptr %argv) {
 entry:
-  %call = tail call i8* @foo()
-  %call1 = tail call i8* @bar()
-  %cmp = icmp ne i8* %call, %call1
+  %call = tail call ptr @foo()
+  %call1 = tail call ptr @bar()
+  %cmp = icmp ne ptr %call, %call1
   %conv = zext i1 %cmp to i32
   ret i32 %conv
 }

diff  --git a/llvm/test/ExecutionEngine/Orc/global-ctor-with-cast.ll b/llvm/test/ExecutionEngine/Orc/global-ctor-with-cast.ll
index d8ef219c025f..950de8f251d9 100644
--- a/llvm/test/ExecutionEngine/Orc/global-ctor-with-cast.ll
+++ b/llvm/test/ExecutionEngine/Orc/global-ctor-with-cast.ll
@@ -4,13 +4,13 @@
 ;
 ; CHECK: constructor
 
-declare i32 @puts(i8*)
+declare i32 @puts(ptr)
 
 @.str = private constant [12 x i8] c"constructor\00"
- at llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 1, void ()* bitcast (i32 ()* @constructor to void ()*), i8* null }]
+ at llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 1, ptr @constructor, ptr null }]
 
 define internal i32 @constructor() #0 {
-  %call = tail call i32 @puts(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
+  %call = tail call i32 @puts(ptr @.str)
   ret i32 0
 }
 

diff  --git a/llvm/test/ExecutionEngine/OrcLazy/Inputs/noop-main.ll b/llvm/test/ExecutionEngine/OrcLazy/Inputs/noop-main.ll
index 8438173f48b0..b7297993a0f1 100644
--- a/llvm/test/ExecutionEngine/OrcLazy/Inputs/noop-main.ll
+++ b/llvm/test/ExecutionEngine/OrcLazy/Inputs/noop-main.ll
@@ -1,7 +1,7 @@
 ; Can be used as an entry point for tests that rely purely on static
 ; initializer side-effects.
 
-define i32 @main(i32 %argc, i8** %argv) {
+define i32 @main(i32 %argc, ptr %argv) {
 entry:
   ret i32 0
 }

diff  --git a/llvm/test/ExecutionEngine/OrcLazy/Inputs/weak-function-2.ll b/llvm/test/ExecutionEngine/OrcLazy/Inputs/weak-function-2.ll
index a7ff83df0398..13911bd4eb53 100644
--- a/llvm/test/ExecutionEngine/OrcLazy/Inputs/weak-function-2.ll
+++ b/llvm/test/ExecutionEngine/OrcLazy/Inputs/weak-function-2.ll
@@ -3,7 +3,7 @@ entry:
   ret i32 0
 }
 
-define i8* @bar() {
+define ptr @bar() {
 entry:
-  ret i8* bitcast (i32 ()* @baz to i8*)
+  ret ptr @baz
 }

diff  --git a/llvm/test/ExecutionEngine/OrcLazy/anonymous_globals.ll b/llvm/test/ExecutionEngine/OrcLazy/anonymous_globals.ll
index c4c09a0d5a25..3800ad715000 100644
--- a/llvm/test/ExecutionEngine/OrcLazy/anonymous_globals.ll
+++ b/llvm/test/ExecutionEngine/OrcLazy/anonymous_globals.ll
@@ -10,7 +10,7 @@ entry:
   ret void
 }
 
-define i32 @main(i32 %argc, i8** nocapture readnone %argv) {
+define i32 @main(i32 %argc, ptr nocapture readnone %argv) {
 entry:
   call void @0()
   tail call void @"\01L_foo"()

diff  --git a/llvm/test/ExecutionEngine/OrcLazy/bad-object-file.ll b/llvm/test/ExecutionEngine/OrcLazy/bad-object-file.ll
index 63ab8ad0d937..9ade3d9ac1fd 100644
--- a/llvm/test/ExecutionEngine/OrcLazy/bad-object-file.ll
+++ b/llvm/test/ExecutionEngine/OrcLazy/bad-object-file.ll
@@ -3,7 +3,7 @@
 ; Test that bad object files yield an error.
 
 ; CHECK: The file was not recognized as a valid object file
-define i32 @main(i32 %argc, i8** %argv) {
+define i32 @main(i32 %argc, ptr %argv) {
 entry:
   ret i32 0
 }

diff  --git a/llvm/test/ExecutionEngine/OrcLazy/basic-object-file-loading.ll b/llvm/test/ExecutionEngine/OrcLazy/basic-object-file-loading.ll
index 9dc74d5241bb..421ff537afeb 100644
--- a/llvm/test/ExecutionEngine/OrcLazy/basic-object-file-loading.ll
+++ b/llvm/test/ExecutionEngine/OrcLazy/basic-object-file-loading.ll
@@ -5,7 +5,7 @@
 
 declare i32 @foo()
 
-define i32 @main(i32 %argc, i8** %argv) {
+define i32 @main(i32 %argc, ptr %argv) {
 entry:
   %0 = call i32 @foo()
   ret i32 %0

diff  --git a/llvm/test/ExecutionEngine/OrcLazy/basic-whole-module-partitions.ll b/llvm/test/ExecutionEngine/OrcLazy/basic-whole-module-partitions.ll
index 3470666de0c4..20cb786b1635 100644
--- a/llvm/test/ExecutionEngine/OrcLazy/basic-whole-module-partitions.ll
+++ b/llvm/test/ExecutionEngine/OrcLazy/basic-whole-module-partitions.ll
@@ -15,7 +15,7 @@ entry:
   ret void
 }
 
-define i32 @main(i32 %argc, i8** nocapture readnone %argv) {
+define i32 @main(i32 %argc, ptr nocapture readnone %argv) {
 entry:
   ret i32 0
 }

diff  --git a/llvm/test/ExecutionEngine/OrcLazy/common-symbols.ll b/llvm/test/ExecutionEngine/OrcLazy/common-symbols.ll
index ece490ae8c88..0f9c3c648670 100644
--- a/llvm/test/ExecutionEngine/OrcLazy/common-symbols.ll
+++ b/llvm/test/ExecutionEngine/OrcLazy/common-symbols.ll
@@ -8,11 +8,11 @@
 define i32 @main() {
 entry:
   %retval = alloca i32, align 4
-  store i32 0, i32* %retval, align 4
-  store i32 7, i32* @x, align 4
-  %0 = load i32, i32* @x, align 4
-  %call = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i32 %0)
+  store i32 0, ptr %retval, align 4
+  store i32 7, ptr @x, align 4
+  %0 = load i32, ptr @x, align 4
+  %call = call i32 (ptr, ...) @printf(ptr @.str, i32 %0)
   ret i32 0
 }
 
-declare i32 @printf(i8*, ...)
+declare i32 @printf(ptr, ...)

diff  --git a/llvm/test/ExecutionEngine/OrcLazy/debug-descriptor-elf-minimal.ll b/llvm/test/ExecutionEngine/OrcLazy/debug-descriptor-elf-minimal.ll
index d480c6502556..079a9c25bfd7 100644
--- a/llvm/test/ExecutionEngine/OrcLazy/debug-descriptor-elf-minimal.ll
+++ b/llvm/test/ExecutionEngine/OrcLazy/debug-descriptor-elf-minimal.ll
@@ -15,15 +15,15 @@
 target triple = "x86_64-unknown-unknown-elf"
 
 ; Built-in symbol provided by the JIT
-declare void @__dump_jit_debug_descriptor(i8*)
+declare void @__dump_jit_debug_descriptor(ptr)
 
 ; Host-process symbol from the GDB JIT interface
 @__jit_debug_descriptor = external global i8, align 1
 
 define i32 @main() !dbg !9 {
   %1 = alloca i32, align 4
-  store i32 0, i32* %1, align 4
-  call void @__dump_jit_debug_descriptor(i8* @__jit_debug_descriptor), !dbg !13
+  store i32 0, ptr %1, align 4
+  call void @__dump_jit_debug_descriptor(ptr @__jit_debug_descriptor), !dbg !13
   ret i32 0, !dbg !14
 }
 

diff  --git a/llvm/test/ExecutionEngine/OrcLazy/debug-objects-elf-minimal.ll b/llvm/test/ExecutionEngine/OrcLazy/debug-objects-elf-minimal.ll
index 405efae44059..0d5aba376080 100644
--- a/llvm/test/ExecutionEngine/OrcLazy/debug-objects-elf-minimal.ll
+++ b/llvm/test/ExecutionEngine/OrcLazy/debug-objects-elf-minimal.ll
@@ -49,15 +49,15 @@
 target triple = "x86_64-unknown-unknown-elf"
 
 ; Built-in symbol provided by the JIT
-declare void @__dump_jit_debug_objects(i8*)
+declare void @__dump_jit_debug_objects(ptr)
 
 ; Host-process symbol from the GDB JIT interface
 @__jit_debug_descriptor = external global i8, align 1
 
 define i32 @main() !dbg !9 {
   %1 = alloca i32, align 4
-  store i32 0, i32* %1, align 4
-  call void @__dump_jit_debug_objects(i8* @__jit_debug_descriptor), !dbg !13
+  store i32 0, ptr %1, align 4
+  call void @__dump_jit_debug_objects(ptr @__jit_debug_descriptor), !dbg !13
   ret i32 0, !dbg !14
 }
 

diff  --git a/llvm/test/ExecutionEngine/OrcLazy/emulated-tls.ll b/llvm/test/ExecutionEngine/OrcLazy/emulated-tls.ll
index 067052c0714a..4b603cd29988 100644
--- a/llvm/test/ExecutionEngine/OrcLazy/emulated-tls.ll
+++ b/llvm/test/ExecutionEngine/OrcLazy/emulated-tls.ll
@@ -16,8 +16,8 @@
 
 @x = thread_local global i32 42, align 4
 
-define i32 @main(i32 %argc, i8** %argv) {
+define i32 @main(i32 %argc, ptr %argv) {
 entry:
-  %0 = load i32, i32* @x, align 4
+  %0 = load i32, ptr @x, align 4
   ret i32 %0
 }

diff  --git a/llvm/test/ExecutionEngine/OrcLazy/global-ctors-and-dtors.ll b/llvm/test/ExecutionEngine/OrcLazy/global-ctors-and-dtors.ll
index 286e136eca49..978650d58d34 100644
--- a/llvm/test/ExecutionEngine/OrcLazy/global-ctors-and-dtors.ll
+++ b/llvm/test/ExecutionEngine/OrcLazy/global-ctors-and-dtors.ll
@@ -19,8 +19,8 @@
 
 @f = global %class.Foo zeroinitializer, align 1
 @__dso_handle = external global i8
- at llvm.global_ctors = appending global [2 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @_GLOBAL__sub_I_hello.cpp, i8* null }, { i32, void ()*, i8* } { i32 1024, void ()* @constructor, i8* null }]
- at llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 0, void ()* @printf_wrapper, i8* null }]
+ at llvm.global_ctors = appending global [2 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 65535, ptr @_GLOBAL__sub_I_hello.cpp, ptr null }, { i32, ptr, ptr } { i32 1024, ptr @constructor, ptr null }]
+ at llvm.global_dtors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 0, ptr @printf_wrapper, ptr null }]
 @str = private unnamed_addr constant [6 x i8] c"Hello\00"
 @str2 = private unnamed_addr constant [23 x i8] c"Hello from constructor\00"
 @str3 = private unnamed_addr constant [24 x i8] c"Goodbye from destructor\00"
@@ -28,40 +28,40 @@
 @str5 = global [20 x i8] c"Goodbye from atexit\00"
 
 
-define linkonce_odr void @_ZN3FooD1Ev(%class.Foo* nocapture readnone %this) unnamed_addr align 2 {
+define linkonce_odr void @_ZN3FooD1Ev(ptr nocapture readnone %this) unnamed_addr align 2 {
 entry:
-  %puts.i = tail call i32 @puts(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @str4, i64 0, i64 0))
+  %puts.i = tail call i32 @puts(ptr @str4)
   ret void
 }
 
 define void @atexit_handler() {
 entry:
-  %puts.i = tail call i32 @puts(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @str5, i64 0, i64 0))
+  %puts.i = tail call i32 @puts(ptr @str5)
   ret void
 }
 
-declare i32 @__cxa_atexit(void (i8*)*, i8*, i8*)
+declare i32 @__cxa_atexit(ptr, ptr, ptr)
 
-declare i32 @atexit(void ()*)
+declare i32 @atexit(ptr)
 
 define internal void @_GLOBAL__sub_I_hello.cpp() {
 entry:
-  %puts.i.i.i = tail call i32 @puts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
-  %0 = tail call i32 @__cxa_atexit(void (i8*)* bitcast (void (%class.Foo*)* @_ZN3FooD1Ev to void (i8*)*), i8* getelementptr inbounds (%class.Foo, %class.Foo* @f, i64 0, i32 0), i8* @__dso_handle)
-  %1 = tail call i32 @atexit(void ()* @atexit_handler)
+  %puts.i.i.i = tail call i32 @puts(ptr @str)
+  %0 = tail call i32 @__cxa_atexit(ptr @_ZN3FooD1Ev, ptr @f, ptr @__dso_handle)
+  %1 = tail call i32 @atexit(ptr @atexit_handler)
   ret void
 }
 
 define void @printf_wrapper() {
 entry:
-  %0 = tail call i32 @puts(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @str3, i64 0, i64 0))
+  %0 = tail call i32 @puts(ptr @str3)
   ret void
 }
 
-declare i32 @puts(i8* nocapture readonly)
+declare i32 @puts(ptr nocapture readonly)
 
 define void @constructor() {
 entry:
-  %0 = tail call i32 @puts(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @str2, i64 0, i64 0))
+  %0 = tail call i32 @puts(ptr @str2)
   ret void
 }

diff  --git a/llvm/test/ExecutionEngine/OrcLazy/global_aliases.ll b/llvm/test/ExecutionEngine/OrcLazy/global_aliases.ll
index 61fde4bebf8b..0dbe24007628 100644
--- a/llvm/test/ExecutionEngine/OrcLazy/global_aliases.ll
+++ b/llvm/test/ExecutionEngine/OrcLazy/global_aliases.ll
@@ -3,17 +3,17 @@
 ; Test handling of global aliases for function and variables.
 
 @x = global i32 42, align 4
- at y = alias i32, i32* @x
+ at y = alias i32, ptr @x
 
 define i32 @foo() {
 entry:
-  %0 = load i32, i32* @y, align 4
+  %0 = load i32, ptr @y, align 4
   ret i32 %0
 }
 
- at bar = alias i32(), i32()* @foo
+ at bar = alias i32(), ptr @foo
 
-define i32 @main(i32 %argc, i8** %argv) {
+define i32 @main(i32 %argc, ptr %argv) {
 entry:
   %0 = call i32() @bar()
   %1 = sub i32 %0, 42

diff  --git a/llvm/test/ExecutionEngine/OrcLazy/hidden-visibility.ll b/llvm/test/ExecutionEngine/OrcLazy/hidden-visibility.ll
index 199fd644bffc..f92db13b3200 100644
--- a/llvm/test/ExecutionEngine/OrcLazy/hidden-visibility.ll
+++ b/llvm/test/ExecutionEngine/OrcLazy/hidden-visibility.ll
@@ -8,10 +8,10 @@
 @bar = external global i32
 declare i32 @foo()
 
-define i32 @main(i32 %argc, i8** nocapture readnone %argv) {
+define i32 @main(i32 %argc, ptr nocapture readnone %argv) {
 entry:
   %0 = call i32() @foo()
-  %1 = load i32, i32* @bar
+  %1 = load i32, ptr @bar
   %2 = add i32 %0, %1
   ret i32 %2
 }

diff  --git a/llvm/test/ExecutionEngine/OrcLazy/macho-universal-static-library-support.ll b/llvm/test/ExecutionEngine/OrcLazy/macho-universal-static-library-support.ll
index 4e6a42682cdc..a9e0abb44aa2 100644
--- a/llvm/test/ExecutionEngine/OrcLazy/macho-universal-static-library-support.ll
+++ b/llvm/test/ExecutionEngine/OrcLazy/macho-universal-static-library-support.ll
@@ -19,7 +19,7 @@
 
 declare i32 @foo()
 
-define i32 @main(i32 %argc, i8** nocapture readnone %argv) {
+define i32 @main(i32 %argc, ptr nocapture readnone %argv) {
 entry:
   %0 = call i32 @foo()
   ret i32 %0

diff  --git a/llvm/test/ExecutionEngine/OrcLazy/minimal-throw-catch.ll b/llvm/test/ExecutionEngine/OrcLazy/minimal-throw-catch.ll
index 9f6923e622aa..b1e0aea05a5f 100644
--- a/llvm/test/ExecutionEngine/OrcLazy/minimal-throw-catch.ll
+++ b/llvm/test/ExecutionEngine/OrcLazy/minimal-throw-catch.ll
@@ -7,44 +7,42 @@ source_filename = "minimal-throw-catch.cpp"
 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-apple-macosx10.14.0"
 
- at _ZTIi = external constant i8*
+ at _ZTIi = external constant ptr
 
-declare i8* @__cxa_allocate_exception(i64)
-declare void @__cxa_throw(i8*, i8*, i8*)
+declare ptr @__cxa_allocate_exception(i64)
+declare void @__cxa_throw(ptr, ptr, ptr)
 
 declare i32 @__gxx_personality_v0(...)
-declare i32 @llvm.eh.typeid.for(i8*)
-declare i8* @__cxa_begin_catch(i8*)
+declare i32 @llvm.eh.typeid.for(ptr)
+declare ptr @__cxa_begin_catch(ptr)
 declare void @__cxa_end_catch()
 
 define void @explode() {
 entry:
-  %exception = tail call i8* @__cxa_allocate_exception(i64 4)
-  %0 = bitcast i8* %exception to i32*
-  store i32 42, i32* %0, align 16
-  tail call void @__cxa_throw(i8* %exception, i8* bitcast (i8** @_ZTIi to i8*), i8* null)
+  %exception = tail call ptr @__cxa_allocate_exception(i64 4)
+  store i32 42, ptr %exception, align 16
+  tail call void @__cxa_throw(ptr %exception, ptr @_ZTIi, ptr null)
   unreachable
 }
 
-define i32 @main(i32 %argc, i8** %argv) personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
+define i32 @main(i32 %argc, ptr %argv) personality ptr @__gxx_personality_v0 {
 entry:
   invoke void @explode()
           to label %return unwind label %lpad
 
 lpad:
-  %0 = landingpad { i8*, i32 }
-          catch i8* bitcast (i8** @_ZTIi to i8*)
-  %1 = extractvalue { i8*, i32 } %0, 1
-  %2 = tail call i32 @llvm.eh.typeid.for(i8* bitcast (i8** @_ZTIi to i8*))
+  %0 = landingpad { ptr, i32 }
+          catch ptr @_ZTIi
+  %1 = extractvalue { ptr, i32 } %0, 1
+  %2 = tail call i32 @llvm.eh.typeid.for(ptr @_ZTIi)
   %matches = icmp eq i32 %1, %2
   br i1 %matches, label %catch, label %eh.resume
 
 catch:
-  %3 = extractvalue { i8*, i32 } %0, 0
-  %4 = tail call i8* @__cxa_begin_catch(i8* %3)
-  %5 = bitcast i8* %4 to i32*
-  %6 = load i32, i32* %5, align 4
-  %cmp = icmp ne i32 %6, 42
+  %3 = extractvalue { ptr, i32 } %0, 0
+  %4 = tail call ptr @__cxa_begin_catch(ptr %3)
+  %5 = load i32, ptr %4, align 4
+  %cmp = icmp ne i32 %5, 42
   %cond = zext i1 %cmp to i32
   tail call void @__cxa_end_catch()
   br label %return
@@ -54,5 +52,5 @@ return:
   ret i32 %retval.0
 
 eh.resume:
-  resume { i8*, i32 } %0
+  resume { ptr, i32 } %0
 }

diff  --git a/llvm/test/ExecutionEngine/OrcLazy/minimal.ll b/llvm/test/ExecutionEngine/OrcLazy/minimal.ll
index dc48ffece9ba..4f70e00d9c68 100644
--- a/llvm/test/ExecutionEngine/OrcLazy/minimal.ll
+++ b/llvm/test/ExecutionEngine/OrcLazy/minimal.ll
@@ -2,7 +2,7 @@
 ;
 ; Basic correctness check: A module with a single no-op main function runs.
 
-define i32 @main(i32 %argc, i8** nocapture readnone %argv) {
+define i32 @main(i32 %argc, ptr nocapture readnone %argv) {
 entry:
   ret i32 0
 }

diff  --git a/llvm/test/ExecutionEngine/OrcLazy/multiple-compile-threads-basic.ll b/llvm/test/ExecutionEngine/OrcLazy/multiple-compile-threads-basic.ll
index de516650a7fe..074c5f490b42 100644
--- a/llvm/test/ExecutionEngine/OrcLazy/multiple-compile-threads-basic.ll
+++ b/llvm/test/ExecutionEngine/OrcLazy/multiple-compile-threads-basic.ll
@@ -10,13 +10,13 @@
 
 define void @hello() {
 entry:
-  %call = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i32 0, i32 0))
+  %call = call i32 (ptr, ...) @printf(ptr @.str)
   ret void
 }
 
-declare i32 @printf(i8*, ...)
+declare i32 @printf(ptr, ...)
 
-define i32 @main(i32 %argc, i8** %argv) {
+define i32 @main(i32 %argc, ptr %argv) {
 entry:
   ret i32 0
 }

diff  --git a/llvm/test/ExecutionEngine/OrcLazy/printargv.ll b/llvm/test/ExecutionEngine/OrcLazy/printargv.ll
index 6d90dc3df046..e9e18b462be7 100644
--- a/llvm/test/ExecutionEngine/OrcLazy/printargv.ll
+++ b/llvm/test/ExecutionEngine/OrcLazy/printargv.ll
@@ -13,28 +13,28 @@
 @.str.7 = private unnamed_addr constant [5 x i8] c"junk\00", align 1
 @str.8 = private unnamed_addr constant [2 x i8] c"]\00", align 1
 
-define i32 @main(i32 %argc, i8** nocapture readonly %argv)  {
+define i32 @main(i32 %argc, ptr nocapture readonly %argv)  {
 entry:
-  %call = tail call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %argc)
-  %call1 = tail call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
+  %call = tail call i32 (ptr, ...) @printf(ptr @.str, i32 %argc)
+  %call1 = tail call i32 (ptr, ...) @printf(ptr @.str.1)
   %cmp = icmp eq i32 %argc, 0
   br i1 %cmp, label %if.then, label %if.end
 
 if.then:
-  %puts36 = tail call i32 @puts(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str.8, i64 0, i64 0))
+  %puts36 = tail call i32 @puts(ptr @str.8)
   br label %if.end
 
 if.end:
-  %0 = load i8*, i8** %argv, align 8
-  %tobool = icmp eq i8* %0, null
+  %0 = load ptr, ptr %argv, align 8
+  %tobool = icmp eq ptr %0, null
   br i1 %tobool, label %if.else, label %if.then3
 
 if.then3:
-  %call5 = tail call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* %0)
+  %call5 = tail call i32 (ptr, ...) @printf(ptr @.str.3, ptr %0)
   br label %if.end7
 
 if.else:
-  %call6 = tail call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
+  %call6 = tail call i32 (ptr, ...) @printf(ptr @.str.4)
   br label %if.end7
 
 if.end7:
@@ -46,28 +46,28 @@ for.body.preheader:
   br label %for.body
 
 for.cond.cleanup:
-  %puts = tail call i32 @puts(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str.8, i64 0, i64 0))
+  %puts = tail call i32 @puts(ptr @str.8)
   %idxprom19 = sext i32 %argc to i64
-  %arrayidx20 = getelementptr inbounds i8*, i8** %argv, i64 %idxprom19
-  %2 = load i8*, i8** %arrayidx20, align 8
-  %tobool21 = icmp eq i8* %2, null
-  %cond = select i1 %tobool21, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0)
-  %call22 = tail call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i32 %argc, i8* %cond)
+  %arrayidx20 = getelementptr inbounds ptr, ptr %argv, i64 %idxprom19
+  %2 = load ptr, ptr %arrayidx20, align 8
+  %tobool21 = icmp eq ptr %2, null
+  %cond = select i1 %tobool21, ptr @.str.4, ptr @.str.7
+  %call22 = tail call i32 (ptr, ...) @printf(ptr @.str.6, i32 %argc, ptr %cond)
   ret i32 0
 
 for.body:
   %indvars.iv = phi i64 [ 1, %for.body.preheader ], [ %indvars.iv.next, %for.inc ]
-  %arrayidx9 = getelementptr inbounds i8*, i8** %argv, i64 %indvars.iv
-  %3 = load i8*, i8** %arrayidx9, align 8
-  %tobool10 = icmp eq i8* %3, null
+  %arrayidx9 = getelementptr inbounds ptr, ptr %argv, i64 %indvars.iv
+  %3 = load ptr, ptr %arrayidx9, align 8
+  %tobool10 = icmp eq ptr %3, null
   br i1 %tobool10, label %if.else15, label %if.then11
 
 if.then11:
-  %call14 = tail call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* %3)
+  %call14 = tail call i32 (ptr, ...) @printf(ptr @.str.5, ptr %3)
   br label %for.inc
 
 if.else15:
-  %call16 = tail call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
+  %call16 = tail call i32 (ptr, ...) @printf(ptr @.str.4)
   br label %for.inc
 
 for.inc:
@@ -76,6 +76,6 @@ for.inc:
   br i1 %cmp8, label %for.cond.cleanup, label %for.body
 }
 
-declare i32 @printf(i8* nocapture readonly, ...)
+declare i32 @printf(ptr nocapture readonly, ...)
 
-declare i32 @puts(i8* nocapture readonly)
+declare i32 @puts(ptr nocapture readonly)

diff  --git a/llvm/test/ExecutionEngine/OrcLazy/private_linkage.ll b/llvm/test/ExecutionEngine/OrcLazy/private_linkage.ll
index c8f1531f3139..19750768c575 100644
--- a/llvm/test/ExecutionEngine/OrcLazy/private_linkage.ll
+++ b/llvm/test/ExecutionEngine/OrcLazy/private_linkage.ll
@@ -10,7 +10,7 @@ entry:
   ret void
 }
 
-define i32 @main(i32 %argc, i8** nocapture readnone %argv) {
+define i32 @main(i32 %argc, ptr nocapture readnone %argv) {
 entry:
   call void @foo()
   call void @"\01l_bar"()

diff  --git a/llvm/test/ExecutionEngine/OrcLazy/single-function-call.ll b/llvm/test/ExecutionEngine/OrcLazy/single-function-call.ll
index ab2327d2d37e..3f039f668424 100644
--- a/llvm/test/ExecutionEngine/OrcLazy/single-function-call.ll
+++ b/llvm/test/ExecutionEngine/OrcLazy/single-function-call.ll
@@ -8,7 +8,7 @@ entry:
   ret i32 0
 }
 
-define i32 @main(i32 %argc, i8** nocapture readnone %argv) {
+define i32 @main(i32 %argc, ptr nocapture readnone %argv) {
 entry:
   %0 = call i32() @foo()
   ret i32 %0

diff  --git a/llvm/test/ExecutionEngine/OrcLazy/static-initializers-in-objectfiles.ll b/llvm/test/ExecutionEngine/OrcLazy/static-initializers-in-objectfiles.ll
index 13f18e6a0884..42b3077a2ca4 100644
--- a/llvm/test/ExecutionEngine/OrcLazy/static-initializers-in-objectfiles.ll
+++ b/llvm/test/ExecutionEngine/OrcLazy/static-initializers-in-objectfiles.ll
@@ -10,17 +10,17 @@
 ; for the test to pass.
 
 @HasError = global i8 1, align 1
- at llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @resetHasError, i8* null }]
+ at llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 65535, ptr @resetHasError, ptr null }]
 
 define void @resetHasError() {
 entry:
-  store i8 0, i8* @HasError, align 1
+  store i8 0, ptr @HasError, align 1
   ret void
 }
 
-define i32 @main(i32 %argc, i8** %argv) #2 {
+define i32 @main(i32 %argc, ptr %argv) #2 {
 entry:
-  %0 = load i8, i8* @HasError, align 1
+  %0 = load i8, ptr @HasError, align 1
   %tobool = trunc i8 %0 to i1
   %conv = zext i1 %tobool to i32
   ret i32 %conv

diff  --git a/llvm/test/ExecutionEngine/OrcLazy/weak-function.ll b/llvm/test/ExecutionEngine/OrcLazy/weak-function.ll
index f2586c7df5d5..a96feedb4d8e 100644
--- a/llvm/test/ExecutionEngine/OrcLazy/weak-function.ll
+++ b/llvm/test/ExecutionEngine/OrcLazy/weak-function.ll
@@ -8,18 +8,18 @@ entry:
   ret i32 0
 }
 
-define i8* @foo() {
+define ptr @foo() {
 entry:
-  ret i8* bitcast (i32 ()* @baz to i8*)
+  ret ptr @baz
 }
 
-declare i8* @bar()
+declare ptr @bar()
 
-define i32 @main(i32 %argc, i8** %argv) {
+define i32 @main(i32 %argc, ptr %argv) {
 entry:
-  %call = tail call i8* @foo()
-  %call1 = tail call i8* @bar()
-  %cmp = icmp ne i8* %call, %call1
+  %call = tail call ptr @foo()
+  %call1 = tail call ptr @bar()
+  %cmp = icmp ne ptr %call, %call1
   %conv = zext i1 %cmp to i32
   ret i32 %conv
 }

diff  --git a/llvm/test/ExecutionEngine/OrcLazy/weak-non-materialization.ll b/llvm/test/ExecutionEngine/OrcLazy/weak-non-materialization.ll
index c20de8131235..29b7e5fcf85f 100644
--- a/llvm/test/ExecutionEngine/OrcLazy/weak-non-materialization.ll
+++ b/llvm/test/ExecutionEngine/OrcLazy/weak-non-materialization.ll
@@ -9,9 +9,9 @@
 
 declare void @foo()
 
-define i32 @main(i32 %argc, i8** %argv) {
+define i32 @main(i32 %argc, ptr %argv) {
 entry:
   call void @foo()
-  %0 = load i32, i32* @X
+  %0 = load i32, ptr @X
   ret i32 %0
 }

diff  --git a/llvm/test/ExecutionEngine/RuntimeDyld/X86/Inputs/ExternalGlobal.ll b/llvm/test/ExecutionEngine/RuntimeDyld/X86/Inputs/ExternalGlobal.ll
index 51002aa37bb0..4ebad213a0b8 100644
--- a/llvm/test/ExecutionEngine/RuntimeDyld/X86/Inputs/ExternalGlobal.ll
+++ b/llvm/test/ExecutionEngine/RuntimeDyld/X86/Inputs/ExternalGlobal.ll
@@ -1,2 +1,2 @@
 @F = global i8 0
- at G = global i8* @F
+ at G = global ptr @F

diff  --git a/llvm/test/ExecutionEngine/RuntimeDyld/X86/coff-alignment.ll b/llvm/test/ExecutionEngine/RuntimeDyld/X86/coff-alignment.ll
index 9e9d60f62286..e52a2bbb096c 100644
--- a/llvm/test/ExecutionEngine/RuntimeDyld/X86/coff-alignment.ll
+++ b/llvm/test/ExecutionEngine/RuntimeDyld/X86/coff-alignment.ll
@@ -4,6 +4,6 @@
 @o = common global i32 0, align 4
 
 define i32 @main() {
-  %patatino = load i32, i32* @o, align 4
+  %patatino = load i32, ptr @o, align 4
   ret i32 %patatino
 }

diff  --git a/llvm/test/ExecutionEngine/fma3-jit.ll b/llvm/test/ExecutionEngine/fma3-jit.ll
index be1653a0fd19..9bd44dd4e81d 100644
--- a/llvm/test/ExecutionEngine/fma3-jit.ll
+++ b/llvm/test/ExecutionEngine/fma3-jit.ll
@@ -5,13 +5,12 @@
 
 @msg_double = internal global [4 x i8] c"%f\0A\00"
 
-declare i32 @printf(i8*, ...)
+declare i32 @printf(ptr, ...)
 
 define i32 @main() {
   %fma = tail call double @llvm.fma.f64(double 3.0, double 3.0, double 3.0) nounwind readnone
 
-  %ptr1 = getelementptr [4 x i8], [4 x i8]* @msg_double, i32 0, i32 0
-  call i32 (i8*,...) @printf(i8* %ptr1, double %fma)
+  call i32 (ptr,...) @printf(ptr @msg_double, double %fma)
 
   ret i32 0
 }

diff  --git a/llvm/test/ExecutionEngine/frem.ll b/llvm/test/ExecutionEngine/frem.ll
index 390e0f9563b8..b8739c249cf5 100644
--- a/llvm/test/ExecutionEngine/frem.ll
+++ b/llvm/test/ExecutionEngine/frem.ll
@@ -8,15 +8,15 @@
 @flt = internal global float 12.0e+0
 @str = internal constant [18 x i8] c"Double value: %f\0A\00"
 
-declare i32 @printf(i8* nocapture, ...) nounwind
-declare i32 @fflush(i8*) nounwind
+declare i32 @printf(ptr nocapture, ...) nounwind
+declare i32 @fflush(ptr) nounwind
 
 define i32 @main() {
-  %flt = load float, float* @flt
+  %flt = load float, ptr @flt
   %float2 = frem float %flt, 5.0
   %double1 = fpext float %float2 to double
-  call i32 (i8*, ...) @printf(i8* getelementptr ([18 x i8], [18 x i8]* @str, i32 0, i64 0), double %double1)
-  call i32 @fflush(i8* null)
+  call i32 (ptr, ...) @printf(ptr @str, double %double1)
+  call i32 @fflush(ptr null)
   ret i32 0
 }
 

diff  --git a/llvm/test/ExecutionEngine/test-interp-vec-loadstore.ll b/llvm/test/ExecutionEngine/test-interp-vec-loadstore.ll
index f6dc67700f94..31a83cda5397 100644
--- a/llvm/test/ExecutionEngine/test-interp-vec-loadstore.ll
+++ b/llvm/test/ExecutionEngine/test-interp-vec-loadstore.ll
@@ -7,7 +7,7 @@
 @msg_double = internal global [20 x i8] c"double test passed\0A\00"
 @msg_float = internal global [19 x i8] c"float test passed\0A\00"
 
-declare i32 @printf(i8*, ...)
+declare i32 @printf(ptr, ...)
 
 define i32 @main() {
   %a = alloca <4 x i32>, align 16
@@ -27,21 +27,21 @@ define i32 @main() {
   %pfloat_3 = alloca float
 
   ; store constants 1,2,3,4 as vector
-  store <4 x i32> <i32 1, i32 2, i32 3, i32 4>, <4 x i32>* %a, align 16
+  store <4 x i32> <i32 1, i32 2, i32 3, i32 4>, ptr %a, align 16
   ; store constants 1,2,3,4 as scalars
-  store i32 1, i32* %pint_0
-  store i32 2, i32* %pint_1
-  store i32 3, i32* %pint_2
-  store i32 4, i32* %pint_3
+  store i32 1, ptr %pint_0
+  store i32 2, ptr %pint_1
+  store i32 3, ptr %pint_2
+  store i32 4, ptr %pint_3
   
   ; load stored scalars
-  %val_int0 = load i32, i32* %pint_0
-  %val_int1 = load i32, i32* %pint_1
-  %val_int2 = load i32, i32* %pint_2
-  %val_int3 = load i32, i32* %pint_3
+  %val_int0 = load i32, ptr %pint_0
+  %val_int1 = load i32, ptr %pint_1
+  %val_int2 = load i32, ptr %pint_2
+  %val_int3 = load i32, ptr %pint_3
 
   ; load stored vector
-  %val0 = load <4 x i32> , <4 x i32> *%a, align 16
+  %val0 = load <4 x i32> , ptr %a, align 16
 
   ; extract integers from the loaded vector
   %res_i32_0 = extractelement <4 x i32> %val0, i32 0
@@ -72,24 +72,23 @@ define i32 @main() {
   ; if TRUE print message
   br i1 %res_i, label %Print_int, label %Double
 Print_int:
-  %ptr0 = getelementptr [17 x i8], [17 x i8]* @msg_int, i32 0, i32 0
-  call i32 (i8*,...) @printf(i8* %ptr0)
+  call i32 (ptr,...) @printf(ptr @msg_int)
   br label %Double
 Double:
-  store <4 x double> <double 5.0, double 6.0, double 7.0, double 8.0>, <4 x double>* %b, align 16
+  store <4 x double> <double 5.0, double 6.0, double 7.0, double 8.0>, ptr %b, align 16
   ; store constants as scalars
-  store double 5.0, double* %pdouble_0
-  store double 6.0, double* %pdouble_1
-  store double 7.0, double* %pdouble_2
-  store double 8.0, double* %pdouble_3
+  store double 5.0, ptr %pdouble_0
+  store double 6.0, ptr %pdouble_1
+  store double 7.0, ptr %pdouble_2
+  store double 8.0, ptr %pdouble_3
 
   ; load stored vector
-  %val1 = load <4 x double> , <4 x double> *%b, align 16
+  %val1 = load <4 x double> , ptr %b, align 16
   ; load stored scalars
-  %val_double0 = load double, double* %pdouble_0
-  %val_double1 = load double, double* %pdouble_1
-  %val_double2 = load double, double* %pdouble_2
-  %val_double3 = load double, double* %pdouble_3
+  %val_double0 = load double, ptr %pdouble_0
+  %val_double1 = load double, ptr %pdouble_1
+  %val_double2 = load double, ptr %pdouble_2
+  %val_double3 = load double, ptr %pdouble_3
 
   %res_double_0 = extractelement <4 x double> %val1, i32 0
   %res_double_1 = extractelement <4 x double> %val1, i32 1
@@ -116,24 +115,23 @@ Double:
 
   br i1 %res_double, label %Print_double, label %Float
 Print_double:
-  %ptr1 = getelementptr [20 x i8], [20 x i8]* @msg_double, i32 0, i32 0
-  call i32 (i8*,...) @printf(i8* %ptr1)
+  call i32 (ptr,...) @printf(ptr @msg_double)
   br label %Float
 Float:
-  store <4 x float> <float 9.0, float 10.0, float 11.0, float 12.0>, <4 x float>* %c, align 16
+  store <4 x float> <float 9.0, float 10.0, float 11.0, float 12.0>, ptr %c, align 16
 
-  store float 9.0, float* %pfloat_0
-  store float 10.0, float* %pfloat_1
-  store float 11.0, float* %pfloat_2
-  store float 12.0, float* %pfloat_3
+  store float 9.0, ptr %pfloat_0
+  store float 10.0, ptr %pfloat_1
+  store float 11.0, ptr %pfloat_2
+  store float 12.0, ptr %pfloat_3
 
   ; load stored vector
-  %val2 = load <4 x float> , <4 x float> *%c, align 16
+  %val2 = load <4 x float> , ptr %c, align 16
   ; load stored scalars
-  %val_float0 = load float, float* %pfloat_0
-  %val_float1 = load float, float* %pfloat_1
-  %val_float2 = load float, float* %pfloat_2
-  %val_float3 = load float, float* %pfloat_3
+  %val_float0 = load float, ptr %pfloat_0
+  %val_float1 = load float, ptr %pfloat_1
+  %val_float2 = load float, ptr %pfloat_2
+  %val_float3 = load float, ptr %pfloat_3
 
   %res_float_0 = extractelement <4 x float> %val2, i32 0
   %res_float_1 = extractelement <4 x float> %val2, i32 1
@@ -160,8 +158,7 @@ Float:
 
   br i1 %res_float, label %Print_float, label %Exit
 Print_float:
-  %ptr2 = getelementptr [19 x i8], [19 x i8]* @msg_float, i32 0, i32 0
-  call i32 (i8*,...) @printf(i8* %ptr2)
+  call i32 (ptr,...) @printf(ptr @msg_float)
   br label %Exit
 Exit:
 


        


More information about the llvm-commits mailing list