[llvm] 1842a29 - [Tests] Convert Feature tests to opaque pointers (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 13 06:49:37 PST 2022
Author: Nikita Popov
Date: 2022-12-13T15:49:18+01:00
New Revision: 1842a2909e80da9432c5d79a95ec2c331bd99744
URL: https://github.com/llvm/llvm-project/commit/1842a2909e80da9432c5d79a95ec2c331bd99744
DIFF: https://github.com/llvm/llvm-project/commit/1842a2909e80da9432c5d79a95ec2c331bd99744.diff
LOG: [Tests] Convert Feature tests to opaque pointers (NFC)
Added:
Modified:
llvm/test/Feature/OperandBundles/basic-aa-argmemonly.ll
llvm/test/Feature/OperandBundles/dse.ll
llvm/test/Feature/OperandBundles/early-cse.ll
llvm/test/Feature/OperandBundles/function-attrs.ll
llvm/test/Feature/OperandBundles/pr26510.ll
llvm/test/Feature/alias2.ll
llvm/test/Feature/alignment.ll
llvm/test/Feature/attributes.ll
llvm/test/Feature/callingconventions.ll
llvm/test/Feature/calltest.ll
llvm/test/Feature/comdat.ll
llvm/test/Feature/const_pv.ll
llvm/test/Feature/constpointer.ll
llvm/test/Feature/exception.ll
llvm/test/Feature/forwardreftest.ll
llvm/test/Feature/global_pv.ll
llvm/test/Feature/global_section.ll
llvm/test/Feature/globalvars.ll
llvm/test/Feature/indirectcall.ll
llvm/test/Feature/load_extension.ll
llvm/test/Feature/md_on_instruction.ll
llvm/test/Feature/memorymarkers.ll
llvm/test/Feature/metadata.ll
llvm/test/Feature/newcasts.ll
llvm/test/Feature/optnone-llc.ll
llvm/test/Feature/optnone-opt.ll
llvm/test/Feature/packed.ll
llvm/test/Feature/packed_struct.ll
llvm/test/Feature/paramattrs.ll
llvm/test/Feature/ppcld.ll
llvm/test/Feature/prefixdata.ll
llvm/test/Feature/prologuedata.ll
llvm/test/Feature/recursivetype.ll
llvm/test/Feature/seh-nounwind.ll
llvm/test/Feature/simplecalltest.ll
llvm/test/Feature/sparcld.ll
llvm/test/Feature/strip_names.ll
llvm/test/Feature/terminators.ll
llvm/test/Feature/testconstants.ll
llvm/test/Feature/testtype.ll
llvm/test/Feature/testvarargs.ll
llvm/test/Feature/undefined.ll
llvm/test/Feature/varargs.ll
llvm/test/Feature/varargs_new.ll
llvm/test/Feature/weak_constant.ll
llvm/test/Feature/x86ld.ll
Removed:
################################################################################
diff --git a/llvm/test/Feature/OperandBundles/basic-aa-argmemonly.ll b/llvm/test/Feature/OperandBundles/basic-aa-argmemonly.ll
index 1c58838ade33e..61436ec13e84b 100644
--- a/llvm/test/Feature/OperandBundles/basic-aa-argmemonly.ll
+++ b/llvm/test/Feature/OperandBundles/basic-aa-argmemonly.ll
@@ -1,33 +1,33 @@
; RUN: opt -S -aa-pipeline=basic-aa -passes=gvn < %s | FileCheck %s
-declare void @argmemonly_function(i32 *) argmemonly
+declare void @argmemonly_function(ptr) argmemonly
-define i32 @test0(i32* %P, i32* noalias %P2) {
+define i32 @test0(ptr %P, ptr noalias %P2) {
; CHECK-LABEL: @test0(
- %v1 = load i32, i32* %P
-; CHECK: %v1 = load i32, i32* %P
- call void @argmemonly_function(i32* %P2) [ "tag"() ]
+ %v1 = load i32, ptr %P
+; CHECK: %v1 = load i32, ptr %P
+ call void @argmemonly_function(ptr %P2) [ "tag"() ]
; CHECK: call void @argmemonly_function(
- %v2 = load i32, i32* %P
-; CHECK: %v2 = load i32, i32* %P
+ %v2 = load i32, ptr %P
+; CHECK: %v2 = load i32, ptr %P
%
diff = sub i32 %v1, %v2
; CHECK: %
diff = sub i32 %v1, %v2
ret i32 %
diff
; CHECK: ret i32 %
diff
}
-define i32 @test1(i32* %P, i32* noalias %P2) {
+define i32 @test1(ptr %P, ptr noalias %P2) {
; CHECK-LABEL: @test1(
- %v1 = load i32, i32* %P
- call void @argmemonly_function(i32* %P2) argmemonly [ "tag"() ]
+ %v1 = load i32, ptr %P
+ call void @argmemonly_function(ptr %P2) argmemonly [ "tag"() ]
; CHECK: call void @argmemonly_function(
- %v2 = load i32, i32* %P
+ %v2 = load i32, ptr %P
%
diff = sub i32 %v1, %v2
ret i32 %
diff
; CHECK: ret i32 0
}
-define i32 @test2(i32* %P, i32* noalias %P2) {
+define i32 @test2(ptr %P, ptr noalias %P2) {
; Note: in this test we //can// GVN %v1 and %v2 into one value in theory. Calls
; with deopt operand bundles are not argmemonly because they *read* the entire
; heap, but they don't write to any location in the heap if the callee does not
@@ -36,10 +36,10 @@ define i32 @test2(i32* %P, i32* noalias %P2) {
; that %P is not written to at the callsite.
; CHECK-LABEL: @test2(
- %v1 = load i32, i32* %P
- call void @argmemonly_function(i32* %P2) [ "deopt"() ]
+ %v1 = load i32, ptr %P
+ call void @argmemonly_function(ptr %P2) [ "deopt"() ]
; CHECK: call void @argmemonly_function(
- %v2 = load i32, i32* %P
+ %v2 = load i32, ptr %P
%
diff = sub i32 %v1, %v2
ret i32 %
diff
; CHECK: ret i32 0
diff --git a/llvm/test/Feature/OperandBundles/dse.ll b/llvm/test/Feature/OperandBundles/dse.ll
index 6fd51620da625..440b710a2089e 100644
--- a/llvm/test/Feature/OperandBundles/dse.ll
+++ b/llvm/test/Feature/OperandBundles/dse.ll
@@ -1,31 +1,31 @@
; RUN: opt -S -passes=dse < %s | FileCheck %s
declare void @f()
-declare noalias i8* @malloc(i32) nounwind
+declare noalias ptr @malloc(i32) nounwind
define void @test_0() {
; CHECK-LABEL: @test_0(
- %m = call i8* @malloc(i32 24)
- tail call void @f() [ "unknown"(i8* %m) ]
-; CHECK: store i8 -19, i8* %m
- store i8 -19, i8* %m
+ %m = call ptr @malloc(i32 24)
+ tail call void @f() [ "unknown"(ptr %m) ]
+; CHECK: store i8 -19, ptr %m
+ store i8 -19, ptr %m
ret void
}
-define i8* @test_1() {
+define ptr @test_1() {
; CHECK-LABEL: @test_1(
- %m = call i8* @malloc(i32 24)
- tail call void @f() [ "unknown"(i8* %m) ]
- store i8 -19, i8* %m
+ %m = call ptr @malloc(i32 24)
+ tail call void @f() [ "unknown"(ptr %m) ]
+ store i8 -19, ptr %m
tail call void @f()
- store i8 101, i8* %m
+ store i8 101, ptr %m
-; CHECK: tail call void @f() [ "unknown"(i8* %m) ]
-; CHECK: store i8 -19, i8* %m
+; CHECK: tail call void @f() [ "unknown"(ptr %m) ]
+; CHECK: store i8 -19, ptr %m
; CHECK: tail call void @f()
-; CHECK: store i8 101, i8* %m
+; CHECK: store i8 101, ptr %m
- ret i8* %m
+ ret ptr %m
}
define void @test_2() {
@@ -33,26 +33,26 @@ define void @test_2() {
; legal to elide the final store that location.
; CHECK-LABEL: @test_2(
- %m = call i8* @malloc(i32 24)
- tail call void @f() [ "deopt"(i8* %m) ]
- store i8 -19, i8* %m
+ %m = call ptr @malloc(i32 24)
+ tail call void @f() [ "deopt"(ptr %m) ]
+ store i8 -19, ptr %m
ret void
-; CHECK: tail call void @f() [ "deopt"(i8* %m) ]
+; CHECK: tail call void @f() [ "deopt"(ptr %m) ]
; CHECK-NEXT: ret void
}
-define i8* @test_3() {
+define ptr @test_3() {
; Since the deopt operand bundle does not escape %m (see caveat below), @f
; cannot observe the stores to %m
; CHECK-LABEL: @test_3(
- %m = call i8* @malloc(i32 24)
- tail call void @f() [ "deopt"(i8* %m) ]
- store i8 -19, i8* %m
+ %m = call ptr @malloc(i32 24)
+ tail call void @f() [ "deopt"(ptr %m) ]
+ store i8 -19, ptr %m
tail call void @f()
- store i8 101, i8* %m
- ret i8* %m
+ store i8 101, ptr %m
+ ret ptr %m
}
diff --git a/llvm/test/Feature/OperandBundles/early-cse.ll b/llvm/test/Feature/OperandBundles/early-cse.ll
index b811a5a5122fd..78715b651ec7c 100644
--- a/llvm/test/Feature/OperandBundles/early-cse.ll
+++ b/llvm/test/Feature/OperandBundles/early-cse.ll
@@ -9,90 +9,90 @@
declare void @readonly_function() readonly nounwind willreturn
declare void @readnone_function() readnone nounwind willreturn
-define i32 @test0(i32* %x) {
+define i32 @test0(ptr %x) {
; CHECK-LABEL: @test0(
; CHECK-NEXT: entry:
-; CHECK-NEXT: store i32 100, i32* [[X:%.*]], align 4
+; CHECK-NEXT: store i32 100, ptr [[X:%.*]], align 4
; CHECK-NEXT: call void @readonly_function() [ "tag"() ]
-; CHECK-NEXT: [[V:%.*]] = load i32, i32* [[X]], align 4
+; CHECK-NEXT: [[V:%.*]] = load i32, ptr [[X]], align 4
; CHECK-NEXT: ret i32 [[V]]
;
entry:
- store i32 100, i32* %x
+ store i32 100, ptr %x
call void @readonly_function() [ "tag"() ]
- %v = load i32, i32* %x
+ %v = load i32, ptr %x
ret i32 %v
}
-define i32 @test1(i32* %x) {
+define i32 @test1(ptr %x) {
; CHECK-LABEL: @test1(
; CHECK-NEXT: entry:
-; CHECK-NEXT: store i32 100, i32* [[X:%.*]], align 4
+; CHECK-NEXT: store i32 100, ptr [[X:%.*]], align 4
; CHECK-NEXT: ret i32 100
;
entry:
- store i32 100, i32* %x
+ store i32 100, ptr %x
call void @readonly_function() readonly [ "tag"() ]
- %v = load i32, i32* %x
+ %v = load i32, ptr %x
ret i32 %v
}
-define i32 @test3(i32* %x) {
+define i32 @test3(ptr %x) {
; CHECK-LABEL: @test3(
; CHECK-NEXT: entry:
-; CHECK-NEXT: store i32 100, i32* [[X:%.*]], align 4
+; CHECK-NEXT: store i32 100, ptr [[X:%.*]], align 4
; CHECK-NEXT: ret i32 100
;
entry:
- store i32 100, i32* %x
+ store i32 100, ptr %x
call void @readonly_function()
- %v = load i32, i32* %x
+ %v = load i32, ptr %x
ret i32 %v
}
-define void @test4(i32* %x) {
+define void @test4(ptr %x) {
; CHECK-LABEL: @test4(
; CHECK-NEXT: entry:
-; CHECK-NEXT: store i32 100, i32* [[X:%.*]], align 4
+; CHECK-NEXT: store i32 100, ptr [[X:%.*]], align 4
; CHECK-NEXT: call void @readnone_function() [ "tag"() ]
-; CHECK-NEXT: store i32 200, i32* [[X]], align 4
+; CHECK-NEXT: store i32 200, ptr [[X]], align 4
; CHECK-NEXT: ret void
;
entry:
- store i32 100, i32* %x
+ store i32 100, ptr %x
call void @readnone_function() [ "tag"() ]
- store i32 200, i32* %x
+ store i32 200, ptr %x
ret void
}
-define void @test5(i32* %x) {
+define void @test5(ptr %x) {
; CHECK-LABEL: @test5(
; CHECK-NEXT: entry:
-; CHECK-NEXT: store i32 200, i32* [[X:%.*]], align 4
+; CHECK-NEXT: store i32 200, ptr [[X:%.*]], align 4
; CHECK-NEXT: ret void
;
entry:
- store i32 100, i32* %x
+ store i32 100, ptr %x
call void @readnone_function() readnone [ "tag"() ]
- store i32 200, i32* %x
+ store i32 200, ptr %x
ret void
}
-define void @test6(i32* %x) {
+define void @test6(ptr %x) {
; The "deopt" operand bundle does not make the call to
; @readonly_function read-write; and so the nounwind readonly call can
; be deleted.
; CHECK-LABEL: @test6(
; CHECK-NEXT: entry:
-; CHECK-NEXT: store i32 200, i32* [[X:%.*]], align 4
+; CHECK-NEXT: store i32 200, ptr [[X:%.*]], align 4
; CHECK-NEXT: ret void
;
entry:
- store i32 100, i32* %x
+ store i32 100, ptr %x
call void @readonly_function() [ "deopt"() ]
- store i32 200, i32* %x
+ store i32 200, ptr %x
ret void
}
diff --git a/llvm/test/Feature/OperandBundles/function-attrs.ll b/llvm/test/Feature/OperandBundles/function-attrs.ll
index 1db14cc7b5383..d3001fa7da42c 100644
--- a/llvm/test/Feature/OperandBundles/function-attrs.ll
+++ b/llvm/test/Feature/OperandBundles/function-attrs.ll
@@ -4,42 +4,42 @@ declare void @f_readonly() readonly
declare void @f_readnone() readnone
declare void @f_writeonly() writeonly
-define void @test_0(i32* %x) {
+define void @test_0(ptr %x) {
; FunctionAttrs must not infer readonly / readnone for %x
-; CHECK-LABEL: define void @test_0(i32* %x) #3 {
+; CHECK-LABEL: define void @test_0(ptr %x) #3 {
entry:
- ; CHECK: call void @f_readonly() [ "foo"(i32* %x) ]
- call void @f_readonly() [ "foo"(i32* %x) ]
+ ; CHECK: call void @f_readonly() [ "foo"(ptr %x) ]
+ call void @f_readonly() [ "foo"(ptr %x) ]
ret void
}
-define void @test_1(i32* %x) {
+define void @test_1(ptr %x) {
; FunctionAttrs must not infer readonly / readnone for %x
-; CHECK-LABEL: define void @test_1(i32* %x) #4 {
+; CHECK-LABEL: define void @test_1(ptr %x) #4 {
entry:
- ; CHECK: call void @f_readnone() [ "foo"(i32* %x) ]
- call void @f_readnone() [ "foo"(i32* %x) ]
+ ; CHECK: call void @f_readnone() [ "foo"(ptr %x) ]
+ call void @f_readnone() [ "foo"(ptr %x) ]
ret void
}
-define void @test_2(i32* %x) {
+define void @test_2(ptr %x) {
; FunctionAttrs must not infer writeonly
-; CHECK-LABEL: define void @test_2(i32* %x) {
+; CHECK-LABEL: define void @test_2(ptr %x) {
entry:
- ; CHECK: call void @f_writeonly() [ "foo"(i32* %x) ]
- call void @f_writeonly() [ "foo"(i32* %x) ]
+ ; CHECK: call void @f_writeonly() [ "foo"(ptr %x) ]
+ call void @f_writeonly() [ "foo"(ptr %x) ]
ret void
}
-define void @test_3(i32* %x) {
+define void @test_3(ptr %x) {
; The "deopt" operand bundle does not capture or write to %x.
-; CHECK-LABEL: define void @test_3(i32* nocapture readonly %x)
+; CHECK-LABEL: define void @test_3(ptr nocapture readonly %x)
entry:
- call void @f_readonly() [ "deopt"(i32* %x) ]
+ call void @f_readonly() [ "deopt"(ptr %x) ]
ret void
}
diff --git a/llvm/test/Feature/OperandBundles/pr26510.ll b/llvm/test/Feature/OperandBundles/pr26510.ll
index 3aac76f1cce46..9b9fd71b1f233 100644
--- a/llvm/test/Feature/OperandBundles/pr26510.ll
+++ b/llvm/test/Feature/OperandBundles/pr26510.ll
@@ -10,18 +10,18 @@
declare void @foo() readnone
-; CHECK-LABEL: define i8* @test(i8* %p)
-; CHECK: %a = alloca i8*, align 8
-; CHECK: store i8* %p, i8** %a, align 8
-; CHECK: call void @foo() [ "abc"(i8** %a) ]
-; CHECK: %reload = load i8*, i8** %a, align 8
-; CHECK: ret i8* %reload
+; CHECK-LABEL: define ptr @test(ptr %p)
+; CHECK: %a = alloca ptr, align 8
+; CHECK: store ptr %p, ptr %a, align 8
+; CHECK: call void @foo() [ "abc"(ptr %a) ]
+; CHECK: %reload = load ptr, ptr %a, align 8
+; CHECK: ret ptr %reload
; CHECK: }
-define i8* @test(i8* %p) {
- %a = alloca i8*, align 8
- store i8* %p, i8** %a, align 8
- call void @foo() ["abc" (i8** %a)]
- %reload = load i8*, i8** %a, align 8
- ret i8* %reload
+define ptr @test(ptr %p) {
+ %a = alloca ptr, align 8
+ store ptr %p, ptr %a, align 8
+ call void @foo() ["abc" (ptr %a)]
+ %reload = load ptr, ptr %a, align 8
+ ret ptr %reload
}
diff --git a/llvm/test/Feature/alias2.ll b/llvm/test/Feature/alias2.ll
index ae5bc11d71a94..7d3bca583123d 100644
--- a/llvm/test/Feature/alias2.ll
+++ b/llvm/test/Feature/alias2.ll
@@ -9,20 +9,20 @@
@v3 = global [2 x i16] zeroinitializer
; CHECK: @v3 = global [2 x i16] zeroinitializer
- at a1 = alias i16, bitcast (i32* @v1 to i16*)
-; CHECK: @a1 = alias i16, bitcast (i32* @v1 to i16*)
+ at a1 = alias i16, ptr @v1
+; CHECK: @a1 = alias i16, ptr @v1
- at a2 = alias i32, bitcast([1 x i32]* @v2 to i32*)
-; CHECK: @a2 = alias i32, getelementptr inbounds ([1 x i32], [1 x i32]* @v2, i32 0, i32 0)
+ at a2 = alias i32, ptr @v2
+; CHECK: @a2 = alias i32, ptr @v2
- at a3 = alias i32, addrspacecast (i32* @v1 to i32 addrspace(2)*)
-; CHECK: @a3 = alias i32, addrspacecast (i32* @v1 to i32 addrspace(2)*)
+ at a3 = alias i32, addrspacecast (ptr @v1 to ptr addrspace(2))
+; CHECK: @a3 = alias i32, addrspacecast (ptr @v1 to ptr addrspace(2))
- at a4 = alias i16, bitcast (i32* @v1 to i16*)
-; CHECK: @a4 = alias i16, bitcast (i32* @v1 to i16*)
+ at a4 = alias i16, ptr @v1
+; CHECK: @a4 = alias i16, ptr @v1
- at a5 = thread_local(localdynamic) alias i32, i32* @v1
-; CHECK: @a5 = thread_local(localdynamic) alias i32, i32* @v1
+ at a5 = thread_local(localdynamic) alias i32, ptr @v1
+; CHECK: @a5 = thread_local(localdynamic) alias i32, ptr @v1
- at a6 = alias i16, getelementptr ([2 x i16], [2 x i16]* @v3, i32 1, i32 1)
-; CHECK: @a6 = alias i16, getelementptr ([2 x i16], [2 x i16]* @v3, i32 1, i32 1)
+ at a6 = alias i16, getelementptr ([2 x i16], ptr @v3, i32 1, i32 1)
+; CHECK: @a6 = alias i16, getelementptr ([2 x i16], ptr @v3, i32 1, i32 1)
diff --git a/llvm/test/Feature/alignment.ll b/llvm/test/Feature/alignment.ll
index f6dbe33b24ba0..76fb5a225d091 100644
--- a/llvm/test/Feature/alignment.ll
+++ b/llvm/test/Feature/alignment.ll
@@ -2,13 +2,13 @@
; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
; RUN:
diff %t1.ll %t2.ll
- at X = global i32 4, align 16 ; <i32*> [#uses=0]
+ at X = global i32 4, align 16 ; <ptr> [#uses=0]
-define i32* @test() align 32 {
- %X = alloca i32, align 4 ; <i32*> [#uses=1]
- %Y = alloca i32, i32 42, align 16 ; <i32*> [#uses=0]
- %Z = alloca i32 ; <i32*> [#uses=0]
- ret i32* %X
+define ptr @test() align 32 {
+ %X = alloca i32, align 4 ; <ptr> [#uses=1]
+ %Y = alloca i32, i32 42, align 16 ; <ptr> [#uses=0]
+ %Z = alloca i32 ; <ptr> [#uses=0]
+ ret ptr %X
}
define void @test3() alignstack(16) {
ret void
diff --git a/llvm/test/Feature/attributes.ll b/llvm/test/Feature/attributes.ll
index cae3cbfe79bad..883a68ec9b4dd 100644
--- a/llvm/test/Feature/attributes.ll
+++ b/llvm/test/Feature/attributes.ll
@@ -6,10 +6,10 @@
define void @foo() #0 {
entry:
- %call = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i32 0, i32 0))
+ %call = call i32 (ptr, ...) @printf(ptr @.str)
ret void
}
-declare i32 @printf(i8*, ...)
+declare i32 @printf(ptr, ...)
attributes #0 = { nounwind ssp uwtable }
diff --git a/llvm/test/Feature/callingconventions.ll b/llvm/test/Feature/callingconventions.ll
index ea30a8e7f4d16..7eb77b555cdc8 100644
--- a/llvm/test/Feature/callingconventions.ll
+++ b/llvm/test/Feature/callingconventions.ll
@@ -11,8 +11,8 @@ define coldcc void @bar() {
ret void
}
-define void @structret({ i8 }* sret({ i8 }) %P) {
- call void @structret( { i8 }* sret({ i8 }) %P )
+define void @structret(ptr sret({ i8 }) %P) {
+ call void @structret( ptr sret({ i8 }) %P )
ret void
}
@@ -25,7 +25,7 @@ define coldcc void @bar2() {
ret void
}
-define cc42 void @bar3() personality i32 (...)* @__gxx_personality_v0 {
+define cc42 void @bar3() personality ptr @__gxx_personality_v0 {
invoke fastcc void @foo( )
to label %Ok unwind label %U
@@ -33,12 +33,12 @@ Ok:
ret void
U:
- %exn = landingpad {i8*, i32}
+ %exn = landingpad {ptr, i32}
cleanup
- resume { i8*, i32 } %exn
+ resume { ptr, i32 } %exn
}
-define void @bar4() personality i32 (...)* @__gxx_personality_v0 {
+define void @bar4() personality ptr @__gxx_personality_v0 {
call cc42 void @bar( )
invoke cc42 void @bar3( )
to label %Ok unwind label %U
@@ -47,9 +47,9 @@ Ok:
ret void
U:
- %exn = landingpad {i8*, i32}
+ %exn = landingpad {ptr, i32}
cleanup
- resume { i8*, i32 } %exn
+ resume { ptr, i32 } %exn
}
declare ghccc void @ghc_callee()
diff --git a/llvm/test/Feature/calltest.ll b/llvm/test/Feature/calltest.ll
index a53c3a1215aee..6e7e2b0f15130 100644
--- a/llvm/test/Feature/calltest.ll
+++ b/llvm/test/Feature/calltest.ll
@@ -4,13 +4,13 @@
%FunTy = type i32 (i32)
-define void @invoke(%FunTy* %x) {
+define void @invoke(ptr %x) {
%foo = call i32 %x( i32 123 ) ; <i32> [#uses=0]
%foo2 = tail call i32 %x( i32 123 ) ; <i32> [#uses=0]
ret void
}
-define i32 @main(i32 %argc) personality i32 (...)* @__gxx_personality_v0 {
+define i32 @main(i32 %argc) personality ptr @__gxx_personality_v0 {
%retval = call i32 @test( i32 %argc ) ; <i32> [#uses=2]
%two = add i32 %retval, %retval ; <i32> [#uses=1]
%retval2 = invoke i32 @test( i32 %argc )
@@ -18,11 +18,11 @@ define i32 @main(i32 %argc) personality i32 (...)* @__gxx_personality_v0 {
Next:
%two2 = add i32 %two, %retval2 ; <i32> [#uses=1]
- call void @invoke( %FunTy* @test )
+ call void @invoke( ptr @test )
ret i32 %two2
Error:
- %exn = landingpad {i8*, i32}
+ %exn = landingpad {ptr, i32}
cleanup
ret i32 -1
}
diff --git a/llvm/test/Feature/comdat.ll b/llvm/test/Feature/comdat.ll
index b0286c06ea0f6..5eb723eb6007c 100644
--- a/llvm/test/Feature/comdat.ll
+++ b/llvm/test/Feature/comdat.ll
@@ -9,8 +9,8 @@ $f2 = comdat any
@v = global i32 0, comdat($f)
; CHECK: @v = global i32 0, comdat($f)
- at a = alias i32, i32* @v
-; CHECK: @a = alias i32, i32* @v{{$}}
+ at a = alias i32, ptr @v
+; CHECK: @a = alias i32, ptr @v{{$}}
define void @f() comdat($f) {
ret void
diff --git a/llvm/test/Feature/const_pv.ll b/llvm/test/Feature/const_pv.ll
index 15c1142b37a2f..c91b82e16dbe5 100644
--- a/llvm/test/Feature/const_pv.ll
+++ b/llvm/test/Feature/const_pv.ll
@@ -1,8 +1,8 @@
; RUN: llvm-as %s -disable-output
- at G = constant <3 x i64> ptrtoint (<3 x i8*> <i8* null, i8* null, i8* null> to <3 x i64>)
+ at G = constant <3 x i64> ptrtoint (<3 x ptr> <ptr null, ptr null, ptr null> to <3 x i64>)
@G1 = global i8 zeroinitializer
- at g = constant <2 x i8*> getelementptr (i8, <2 x i8*> <i8* @G1, i8* @G1>, <2 x i32> <i32 0, i32 0>)
+ at g = constant <2 x ptr> getelementptr (i8, <2 x ptr> <ptr @G1, ptr @G1>, <2 x i32> <i32 0, i32 0>)
- at t = constant <2 x i1> icmp eq (<2 x i32> ptrtoint (<2 x i8*> zeroinitializer to <2 x i32>), <2 x i32> zeroinitializer )
+ at t = constant <2 x i1> icmp eq (<2 x i32> ptrtoint (<2 x ptr> zeroinitializer to <2 x i32>), <2 x i32> zeroinitializer )
diff --git a/llvm/test/Feature/constpointer.ll b/llvm/test/Feature/constpointer.ll
index bd967272cf5b4..227ab198ba1c7 100644
--- a/llvm/test/Feature/constpointer.ll
+++ b/llvm/test/Feature/constpointer.ll
@@ -10,22 +10,22 @@
;
- at t3 = global i32* @t1 ;; Forward reference
+ at t3 = global ptr @t1 ;; Forward reference
@t1 = global i32 4
- at t4 = global i32** @t3 ;; reference to reference
+ at t4 = global ptr @t3 ;; reference to reference
- at t2 = global i32* @t1
+ at t2 = global ptr @t1
- at 0 = global float * @2 ;; Forward numeric reference
- at 1 = global float * @2 ;; Duplicate forward numeric reference
+ at 0 = global ptr @2 ;; Forward numeric reference
+ at 1 = global ptr @2 ;; Duplicate forward numeric reference
@2 = global float 0.0
- at 3 = global float * @2 ;; Numeric reference
+ at 3 = global ptr @2 ;; Numeric reference
- at fptr = global void() * @f ;; Forward ref method defn
+ at fptr = global ptr @f ;; Forward ref method defn
declare void @f() ;; External method
- at sptr1 = global [11x i8]* @somestr ;; Forward ref to a constant
+ at sptr1 = global ptr @somestr ;; Forward ref to a constant
@somestr = constant [11x i8] c"hello world"
- at sptr2 = global [11x i8]* @somestr
+ at sptr2 = global ptr @somestr
diff --git a/llvm/test/Feature/exception.ll b/llvm/test/Feature/exception.ll
index cbe2d0353cc32..c703d1dadfa81 100644
--- a/llvm/test/Feature/exception.ll
+++ b/llvm/test/Feature/exception.ll
@@ -2,11 +2,11 @@
; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
; RUN:
diff %t1.ll %t2.ll
- at _ZTIc = external constant i8*
- at _ZTId = external constant i8*
- at _ZTIPKc = external constant i8*
+ at _ZTIc = external constant ptr
+ at _ZTId = external constant ptr
+ at _ZTIPKc = external constant ptr
-define void @_Z3barv() uwtable optsize ssp personality i32 (...)* @__gxx_personality_v0 {
+define void @_Z3barv() uwtable optsize ssp personality ptr @__gxx_personality_v0 {
entry:
invoke void @_Z3quxv() optsize
to label %try.cont unwind label %lpad
@@ -15,18 +15,18 @@ try.cont: ; preds = %entry, %invoke.cont
ret void
lpad: ; preds = %entry
- %exn = landingpad {i8*, i32}
+ %exn = landingpad {ptr, i32}
cleanup
- catch i8** @_ZTIc
- filter [2 x i8**] [i8** @_ZTIPKc, i8** @_ZTId]
- resume { i8*, i32 } %exn
+ catch ptr @_ZTIc
+ filter [2 x ptr] [ptr @_ZTIPKc, ptr @_ZTId]
+ resume { ptr, i32 } %exn
}
declare void @_Z3quxv() optsize
declare i32 @__gxx_personality_v0(...)
-define void @cleanupret0() personality i32 (...)* @__gxx_personality_v0 {
+define void @cleanupret0() personality ptr @__gxx_personality_v0 {
entry:
invoke void @_Z3quxv() optsize
to label %exit unwind label %pad
@@ -38,7 +38,7 @@ exit:
}
; forward ref by name
-define void @cleanupret1() personality i32 (...)* @__gxx_personality_v0 {
+define void @cleanupret1() personality ptr @__gxx_personality_v0 {
entry:
invoke void @_Z3quxv() optsize
to label %exit unwind label %pad
@@ -52,7 +52,7 @@ exit:
}
; forward ref by ID
-define void @cleanupret2() personality i32 (...)* @__gxx_personality_v0 {
+define void @cleanupret2() personality ptr @__gxx_personality_v0 {
entry:
invoke void @_Z3quxv() optsize
to label %exit unwind label %pad
@@ -65,7 +65,7 @@ exit:
ret void
}
-define void @catchret0() personality i32 (...)* @__gxx_personality_v0 {
+define void @catchret0() personality ptr @__gxx_personality_v0 {
entry:
invoke void @_Z3quxv() optsize
to label %exit unwind label %pad
@@ -79,7 +79,7 @@ exit:
}
; forward ref by name
-define void @catchret1() personality i32 (...)* @__gxx_personality_v0 {
+define void @catchret1() personality ptr @__gxx_personality_v0 {
entry:
invoke void @_Z3quxv() optsize
to label %exit unwind label %pad
@@ -95,7 +95,7 @@ exit:
}
; forward ref by ID
-define void @catchret2() personality i32 (...)* @__gxx_personality_v0 {
+define void @catchret2() personality ptr @__gxx_personality_v0 {
entry:
invoke void @_Z3quxv() optsize
to label %exit unwind label %pad
@@ -110,7 +110,7 @@ exit:
ret void
}
-define i8 @catchpad() personality i32 (...)* @__gxx_personality_v0 {
+define i8 @catchpad() personality ptr @__gxx_personality_v0 {
entry:
invoke void @_Z3quxv() optsize
to label %exit unwind label %bb2
@@ -123,7 +123,7 @@ exit:
ret i8 0
}
-define void @cleanuppad() personality i32 (...)* @__gxx_personality_v0 {
+define void @cleanuppad() personality ptr @__gxx_personality_v0 {
entry:
br label %try.cont
diff --git a/llvm/test/Feature/forwardreftest.ll b/llvm/test/Feature/forwardreftest.ll
index 6ca1be79e4617..63eb90dc60cc0 100644
--- a/llvm/test/Feature/forwardreftest.ll
+++ b/llvm/test/Feature/forwardreftest.ll
@@ -4,11 +4,11 @@
%myty = type i32
%myfn = type float (i32,double,i32,i16)
-%0 = type i32(%myfn*)
+%0 = type i32(ptr)
%1 = type i32(i32)
-%2 = type i32(i32(i32)*)
+%2 = type i32(ptr)
- %thisfuncty = type i32 (i32) *
+ %thisfuncty = type ptr
declare void @F(%thisfuncty, %thisfuncty, %thisfuncty)
diff --git a/llvm/test/Feature/global_pv.ll b/llvm/test/Feature/global_pv.ll
index d0ad38dc26e58..a338f40068c32 100644
--- a/llvm/test/Feature/global_pv.ll
+++ b/llvm/test/Feature/global_pv.ll
@@ -2,13 +2,13 @@
; RUN: opt -passes='function(instcombine),globalopt' -S < %s | llvm-as
@G1 = global i32 zeroinitializer
@G2 = global i32 zeroinitializer
- at g = global <2 x i32*> zeroinitializer
-%0 = type { i32, void ()*, i8* }
- at llvm.global_ctors = appending global [1 x %0] [%0 { i32 65535, void ()* @test, i8* null }]
+ at g = global <2 x ptr> zeroinitializer
+%0 = type { i32, ptr, ptr }
+ at llvm.global_ctors = appending global [1 x %0] [%0 { i32 65535, ptr @test, ptr null }]
define internal void @test() {
- %A = insertelement <2 x i32*> undef, i32* @G1, i32 0
- %B = insertelement <2 x i32*> %A, i32* @G2, i32 1
- store <2 x i32*> %B, <2 x i32*>* @g
+ %A = insertelement <2 x ptr> undef, ptr @G1, i32 0
+ %B = insertelement <2 x ptr> %A, ptr @G2, i32 1
+ store <2 x ptr> %B, ptr @g
ret void
}
diff --git a/llvm/test/Feature/global_section.ll b/llvm/test/Feature/global_section.ll
index b8f5eb1b666c6..193fb1e70d720 100644
--- a/llvm/test/Feature/global_section.ll
+++ b/llvm/test/Feature/global_section.ll
@@ -2,7 +2,7 @@
; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
; RUN:
diff %t1.ll %t2.ll
- at X = global i32 4, section "foo", align 16 ; <i32*> [#uses=0]
+ at X = global i32 4, section "foo", align 16 ; <ptr> [#uses=0]
define void @test() section "bar" {
ret void
diff --git a/llvm/test/Feature/globalvars.ll b/llvm/test/Feature/globalvars.ll
index 3e47650df7d04..ab9e44ace9fdb 100644
--- a/llvm/test/Feature/globalvars.ll
+++ b/llvm/test/Feature/globalvars.ll
@@ -2,17 +2,17 @@
; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
; RUN:
diff %t1.ll %t2.ll
- at MyVar = external global i32 ; <i32*> [#uses=1]
- at MyIntList = external global { i32*, i32 } ; <{ \2*, i32 }*> [#uses=1]
- at 0 = external global i32 ; <i32*>:0 [#uses=0]
- at AConst = constant i32 123 ; <i32*> [#uses=0]
- at AString = constant [4 x i8] c"test" ; <[4 x i8]*> [#uses=0]
- at ZeroInit = global { [100 x i32], [40 x float] } zeroinitializer ; <{ [100 x i32], [40 x float] }*> [#uses=0]
+ at MyVar = external global i32 ; <ptr> [#uses=1]
+ at MyIntList = external global { ptr, i32 } ; <ptr> [#uses=1]
+ at 0 = external global i32 ; <ptr>:0 [#uses=0]
+ at AConst = constant i32 123 ; <ptr> [#uses=0]
+ at AString = constant [4 x i8] c"test" ; <ptr> [#uses=0]
+ at ZeroInit = global { [100 x i32], [40 x float] } zeroinitializer ; <ptr> [#uses=0]
define i32 @foo(i32 %blah) {
- store i32 5, i32* @MyVar
- %idx = getelementptr { i32*, i32 }, { i32*, i32 }* @MyIntList, i64 0, i32 1 ; <i32*> [#uses=1]
- store i32 12, i32* %idx
+ store i32 5, ptr @MyVar
+ %idx = getelementptr { ptr, i32 }, ptr @MyIntList, i64 0, i32 1 ; <ptr> [#uses=1]
+ store i32 12, ptr %idx
ret i32 %blah
}
diff --git a/llvm/test/Feature/indirectcall.ll b/llvm/test/Feature/indirectcall.ll
index c1cf39f337466..35f07d2f65f7b 100644
--- a/llvm/test/Feature/indirectcall.ll
+++ b/llvm/test/Feature/indirectcall.ll
@@ -2,7 +2,7 @@
; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
; RUN:
diff %t1.ll %t2.ll
-declare i32 @atoi(i8*)
+declare i32 @atoi(ptr)
define i64 @fib(i64 %n) {
icmp ult i64 %n, 2 ; <i1>:1 [#uses=1]
@@ -20,7 +20,7 @@ RecurseCase: ; preds = %0
ret i64 %result
}
-define i64 @realmain(i32 %argc, i8** %argv) {
+define i64 @realmain(i32 %argc, ptr %argv) {
; <label>:0
icmp eq i32 %argc, 2 ; <i1>:1 [#uses=1]
br i1 %1, label %HasArg, label %Continue
@@ -36,13 +36,13 @@ Continue: ; preds = %HasArg, %0
ret i64 %F
}
-define i64 @trampoline(i64 %n, i64 (i64)* %fibfunc) {
+define i64 @trampoline(i64 %n, ptr %fibfunc) {
%F = call i64 %fibfunc( i64 %n ) ; <i64> [#uses=1]
ret i64 %F
}
define i32 @main() {
- %Result = call i64 @trampoline( i64 10, i64 (i64)* @fib ) ; <i64> [#uses=1]
+ %Result = call i64 @trampoline( i64 10, ptr @fib ) ; <i64> [#uses=1]
%Result.upgrd.1 = trunc i64 %Result to i32 ; <i32> [#uses=1]
ret i32 %Result.upgrd.1
}
diff --git a/llvm/test/Feature/load_extension.ll b/llvm/test/Feature/load_extension.ll
index 87ab01e7294c3..ff29d409013c4 100644
--- a/llvm/test/Feature/load_extension.ll
+++ b/llvm/test/Feature/load_extension.ll
@@ -16,7 +16,7 @@ target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
@junk = global i32 0
-define i32* @somefunk() {
- ret i32* @junk
+define ptr @somefunk() {
+ ret ptr @junk
}
diff --git a/llvm/test/Feature/md_on_instruction.ll b/llvm/test/Feature/md_on_instruction.ll
index 99bfdb6934a8c..7374c99a3dbaf 100644
--- a/llvm/test/Feature/md_on_instruction.ll
+++ b/llvm/test/Feature/md_on_instruction.ll
@@ -3,16 +3,16 @@
define i32 @foo() nounwind ssp {
entry:
; CHECK: %retval = alloca i32
- ; CHECK: store i32 42, i32* %retval, align 4, !md !0
+ ; CHECK: store i32 42, ptr %retval, align 4, !md !0
; CHECK: br label %0, !md !1
%retval = alloca i32
- store i32 42, i32* %retval, !md !0
+ store i32 42, ptr %retval, !md !0
br label %0, !md !1
; <label:0>
- ; CHECK: %1 = load i32, i32* %retval, align 4, !md !2
+ ; CHECK: %1 = load i32, ptr %retval, align 4, !md !2
; CHECK: ret i32 %1, !md !3
- %1 = load i32, i32* %retval, !md !2
+ %1 = load i32, ptr %retval, !md !2
ret i32 %1, !md !3
}
diff --git a/llvm/test/Feature/memorymarkers.ll b/llvm/test/Feature/memorymarkers.ll
index 842346e007acc..e10fc661b6839 100644
--- a/llvm/test/Feature/memorymarkers.ll
+++ b/llvm/test/Feature/memorymarkers.ll
@@ -2,35 +2,34 @@
%"struct.std::pair<int,int>" = type { i32, i32 }
-declare void @_Z3barRKi(i32*)
+declare void @_Z3barRKi(ptr)
-declare void @llvm.lifetime.start(i64, i8* nocapture) nounwind
-declare void @llvm.lifetime.end(i64, i8* nocapture) nounwind
-declare {}* @llvm.invariant.start.p0i8(i64, i8* nocapture) readonly nounwind
-declare void @llvm.invariant.end.p0i8({}*, i64, i8* nocapture) nounwind
+declare void @llvm.lifetime.start(i64, ptr nocapture) nounwind
+declare void @llvm.lifetime.end(i64, ptr nocapture) nounwind
+declare ptr @llvm.invariant.start.p0(i64, ptr nocapture) readonly nounwind
+declare void @llvm.invariant.end.p0(ptr, i64, ptr nocapture) nounwind
define i32 @_Z4foo2v() nounwind {
entry:
%x = alloca %"struct.std::pair<int,int>"
- %y = bitcast %"struct.std::pair<int,int>"* %x to i8*
;; Constructor starts here (this isn't needed since it is immediately
;; preceded by an alloca, but shown for completeness).
- call void @llvm.lifetime.start(i64 8, i8* %y)
+ call void @llvm.lifetime.start(i64 8, ptr %x)
- %0 = getelementptr %"struct.std::pair<int,int>", %"struct.std::pair<int,int>"* %x, i32 0, i32 0
- store i32 4, i32* %0, align 8
- %1 = getelementptr %"struct.std::pair<int,int>", %"struct.std::pair<int,int>"* %x, i32 0, i32 1
- store i32 5, i32* %1, align 4
+ %0 = getelementptr %"struct.std::pair<int,int>", ptr %x, i32 0, i32 0
+ store i32 4, ptr %0, align 8
+ %1 = getelementptr %"struct.std::pair<int,int>", ptr %x, i32 0, i32 1
+ store i32 5, ptr %1, align 4
;; Constructor has finished here.
- %inv = call {}* @llvm.invariant.start.p0i8(i64 8, i8* %y)
- call void @_Z3barRKi(i32* %0) nounwind
- %2 = load i32, i32* %0, align 8
+ %inv = call ptr @llvm.invariant.start.p0(i64 8, ptr %x)
+ call void @_Z3barRKi(ptr %0) nounwind
+ %2 = load i32, ptr %0, align 8
;; Destructor is run here.
- call void @llvm.invariant.end.p0i8({}* %inv, i64 8, i8* %y)
+ call void @llvm.invariant.end.p0(ptr %inv, i64 8, ptr %x)
;; Destructor is done here.
- call void @llvm.lifetime.end(i64 8, i8* %y)
+ call void @llvm.lifetime.end(i64 8, ptr %x)
ret i32 %2
}
diff --git a/llvm/test/Feature/metadata.ll b/llvm/test/Feature/metadata.ll
index 612a79e511995..e3641dd2768ae 100644
--- a/llvm/test/Feature/metadata.ll
+++ b/llvm/test/Feature/metadata.ll
@@ -3,8 +3,8 @@
define void @foo(i32 %x) {
call void @llvm.zonk(metadata i32 %x, i64 0, metadata !1)
- store i32 0, i32* null, !whatever !0, !whatever_else !{}, !more !{!"hello"}
- store i32 0, i32* null, !whatever !{!"hello", !1, !{}, !2}
+ store i32 0, ptr null, !whatever !0, !whatever_else !{}, !more !{!"hello"}
+ store i32 0, ptr null, !whatever !{!"hello", !1, !{}, !2}
ret void, !_1 !0
}
@@ -12,6 +12,6 @@ declare void @llvm.zonk(metadata, i64, metadata) nounwind readnone
!named = !{!0}
!another_named = !{}
-!0 = !{i8** null}
-!1 = !{i8* null, !2}
+!0 = !{ptr null}
+!1 = !{ptr null, !2}
!2 = !{}
diff --git a/llvm/test/Feature/newcasts.ll b/llvm/test/Feature/newcasts.ll
index dd4748443ef9d..e59c22581a666 100644
--- a/llvm/test/Feature/newcasts.ll
+++ b/llvm/test/Feature/newcasts.ll
@@ -13,16 +13,16 @@ define void @"NewCasts" (i16 %x) {
%i = fpext float %d to double
%j = fptrunc double %i to float
%k = bitcast i32 %a to float
- %l = inttoptr i16 %x to i32*
- %m = ptrtoint i32* %l to i64
+ %l = inttoptr i16 %x to ptr
+ %m = ptrtoint ptr %l to i64
%n = insertelement <4 x i32> undef, i32 %a, i32 0
%o = sitofp <4 x i32> %n to <4 x float>
%p = uitofp <4 x i32> %n to <4 x float>
%q = fptosi <4 x float> %p to <4 x i32>
%r = fptoui <4 x float> %p to <4 x i32>
- %s = inttoptr <4 x i32> %n to <4 x i32*>
- %t = addrspacecast <4 x i32*> %s to <4 x i32 addrspace(1)*>
- %z = addrspacecast <4 x i32*> %s to <4 x float addrspace(2)*>
+ %s = inttoptr <4 x i32> %n to <4 x ptr>
+ %t = addrspacecast <4 x ptr> %s to <4 x ptr addrspace(1)>
+ %z = addrspacecast <4 x ptr> %s to <4 x ptr addrspace(2)>
ret void
}
diff --git a/llvm/test/Feature/optnone-llc.ll b/llvm/test/Feature/optnone-llc.ll
index 4f5f8554c16d8..7e6678f9cdc42 100644
--- a/llvm/test/Feature/optnone-llc.ll
+++ b/llvm/test/Feature/optnone-llc.ll
@@ -15,13 +15,13 @@
define i32 @_Z3fooi(i32 %x) #0 {
entry:
%x.addr = alloca i32, align 4
- store i32 %x, i32* %x.addr, align 4
+ store i32 %x, ptr %x.addr, align 4
br label %while.cond
while.cond: ; preds = %while.body, %entry
- %0 = load i32, i32* %x.addr, align 4
+ %0 = load i32, ptr %x.addr, align 4
%dec = add nsw i32 %0, -1
- store i32 %dec, i32* %x.addr, align 4
+ store i32 %dec, ptr %x.addr, align 4
%tobool = icmp ne i32 %0, 0
br i1 %tobool, label %while.body, label %while.end
diff --git a/llvm/test/Feature/optnone-opt.ll b/llvm/test/Feature/optnone-opt.ll
index b34a3a697a399..d8f9e1b44c6dd 100644
--- a/llvm/test/Feature/optnone-opt.ll
+++ b/llvm/test/Feature/optnone-opt.ll
@@ -15,13 +15,13 @@
define i32 @foo(i32 %x) #0 {
entry:
%x.addr = alloca i32, align 4
- store i32 %x, i32* %x.addr, align 4
+ store i32 %x, ptr %x.addr, align 4
br label %while.cond
while.cond: ; preds = %while.body, %entry
- %0 = load i32, i32* %x.addr, align 4
+ %0 = load i32, ptr %x.addr, align 4
%dec = add nsw i32 %0, -1
- store i32 %dec, i32* %x.addr, align 4
+ store i32 %dec, ptr %x.addr, align 4
%tobool = icmp ne i32 %0, 0
br i1 %tobool, label %while.body, label %while.end
diff --git a/llvm/test/Feature/packed.ll b/llvm/test/Feature/packed.ll
index fa29535271a47..3a78ab5786043 100644
--- a/llvm/test/Feature/packed.ll
+++ b/llvm/test/Feature/packed.ll
@@ -2,14 +2,14 @@
; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
; RUN:
diff %t1.ll %t2.ll
- at foo1 = external global <4 x float> ; <<4 x float>*> [#uses=2]
- at foo2 = external global <2 x i32> ; <<2 x i32>*> [#uses=2]
+ at foo1 = external global <4 x float> ; <ptr> [#uses=2]
+ at foo2 = external global <2 x i32> ; <ptr> [#uses=2]
define void @main() {
- store <4 x float> < float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00 >, <4 x float>* @foo1
- store <2 x i32> < i32 4, i32 4 >, <2 x i32>* @foo2
- %l1 = load <4 x float>, <4 x float>* @foo1 ; <<4 x float>> [#uses=0]
- %l2 = load <2 x i32>, <2 x i32>* @foo2 ; <<2 x i32>> [#uses=0]
+ store <4 x float> < float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00 >, ptr @foo1
+ store <2 x i32> < i32 4, i32 4 >, ptr @foo2
+ %l1 = load <4 x float>, ptr @foo1 ; <<4 x float>> [#uses=0]
+ %l2 = load <2 x i32>, ptr @foo2 ; <<2 x i32>> [#uses=0]
ret void
}
diff --git a/llvm/test/Feature/packed_struct.ll b/llvm/test/Feature/packed_struct.ll
index 172cd3456c8b8..dc05583562a4b 100644
--- a/llvm/test/Feature/packed_struct.ll
+++ b/llvm/test/Feature/packed_struct.ll
@@ -16,9 +16,9 @@
define i32 @main()
{
- %tmp = load i32, i32* getelementptr (%struct.anon, %struct.anon* @foos, i32 0, i32 1) ; <i32> [#uses=1]
- %tmp3 = load i32, i32* getelementptr (%struct.anon, %struct.anon* @foos, i32 0, i32 2) ; <i32> [#uses=1]
- %tmp6 = load i32, i32* getelementptr (%struct.anon, %struct.anon* @foos, i32 0, i32 3) ; <i32> [#uses=1]
+ %tmp = load i32, ptr getelementptr (%struct.anon, ptr @foos, i32 0, i32 1) ; <i32> [#uses=1]
+ %tmp3 = load i32, ptr getelementptr (%struct.anon, ptr @foos, i32 0, i32 2) ; <i32> [#uses=1]
+ %tmp6 = load i32, ptr getelementptr (%struct.anon, ptr @foos, i32 0, i32 3) ; <i32> [#uses=1]
%tmp4 = add i32 %tmp3, %tmp ; <i32> [#uses=1]
%tmp7 = add i32 %tmp4, %tmp6 ; <i32> [#uses=1]
ret i32 %tmp7
@@ -26,8 +26,8 @@ define i32 @main()
define i32 @bar() {
entry:
- %tmp = load i32, i32* getelementptr([2 x <{ i32, i8 }>], [2 x <{ i32, i8 }>]* @bara, i32 0, i32 0, i32 0 ) ; <i32> [#uses=1]
- %tmp4 = load i32, i32* getelementptr ([2 x <{ i32, i8 }>], [2 x <{ i32, i8 }>]* @bara, i32 0, i32 1, i32 0) ; <i32> [#uses=1]
+ %tmp = load i32, ptr getelementptr([2 x <{ i32, i8 }>], ptr @bara, i32 0, i32 0, i32 0 ) ; <i32> [#uses=1]
+ %tmp4 = load i32, ptr getelementptr ([2 x <{ i32, i8 }>], ptr @bara, i32 0, i32 1, i32 0) ; <i32> [#uses=1]
%tmp5 = add i32 %tmp4, %tmp ; <i32> [#uses=1]
ret i32 %tmp5
}
diff --git a/llvm/test/Feature/paramattrs.ll b/llvm/test/Feature/paramattrs.ll
index d24791ee67328..22b3c2d49d295 100644
--- a/llvm/test/Feature/paramattrs.ll
+++ b/llvm/test/Feature/paramattrs.ll
@@ -8,11 +8,11 @@
declare signext i16 @"test"(i16 signext %arg)
declare zeroext i8 @"test2" (i16 zeroext %a2)
-declare i32 @"test3"(i32* noalias %p)
+declare i32 @"test3"(ptr noalias %p)
declare void @exit(i32) noreturn nounwind
-define i32 @main(i32 inreg %argc, i8 ** inreg %argv) nounwind {
+define i32 @main(i32 inreg %argc, ptr inreg %argv) nounwind {
%val = trunc i32 %argc to i16
%res1 = call signext i16 (i16 )@test(i16 signext %val)
%two = add i16 %res1, %res1
diff --git a/llvm/test/Feature/ppcld.ll b/llvm/test/Feature/ppcld.ll
index 6f566190b9b35..cfb70ab878a67 100644
--- a/llvm/test/Feature/ppcld.ll
+++ b/llvm/test/Feature/ppcld.ll
@@ -4,23 +4,23 @@
; ModuleID = '<stdin>'
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"
target triple = "powerpc-apple-darwin8"
- at ld = external global ppc_fp128 ; <ppc_fp128*> [#uses=1]
- at d = global double 4.050000e+00, align 8 ; <double*> [#uses=1]
- at f = global float 0x4010333340000000 ; <float*> [#uses=1]
+ at ld = external global ppc_fp128 ; <ptr> [#uses=1]
+ at d = global double 4.050000e+00, align 8 ; <ptr> [#uses=1]
+ at f = global float 0x4010333340000000 ; <ptr> [#uses=1]
define i32 @foo() {
entry:
- %retval = alloca i32, align 4 ; <i32*> [#uses=1]
+ %retval = alloca i32, align 4 ; <ptr> [#uses=1]
%"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
- %tmp = load float, float* @f ; <float> [#uses=1]
+ %tmp = load float, ptr @f ; <float> [#uses=1]
%tmp1 = fpext float %tmp to double ; <double> [#uses=1]
- %tmp2 = load double, double* @d ; <double> [#uses=1]
+ %tmp2 = load double, ptr @d ; <double> [#uses=1]
%tmp3 = fmul double %tmp1, %tmp2 ; <double> [#uses=1]
%tmp4 = fpext double %tmp3 to ppc_fp128 ; <ppc_fp128> [#uses=1]
- store ppc_fp128 %tmp4, ppc_fp128* @ld
+ store ppc_fp128 %tmp4, ptr @ld
br label %return
return: ; preds = %entry
- %retval4 = load i32, i32* %retval ; <i32> [#uses=1]
+ %retval4 = load i32, ptr %retval ; <i32> [#uses=1]
ret i32 %retval4
}
diff --git a/llvm/test/Feature/prefixdata.ll b/llvm/test/Feature/prefixdata.ll
index b53945c11ff76..87cd053e64369 100644
--- a/llvm/test/Feature/prefixdata.ll
+++ b/llvm/test/Feature/prefixdata.ll
@@ -12,7 +12,7 @@ define void @f() prefix i32 1 {
ret void
}
-; CHECK: g(){{.*}}prefix i32* @i
-define void @g() prefix i32* @i {
+; CHECK: g(){{.*}}prefix ptr @i
+define void @g() prefix ptr @i {
ret void
}
diff --git a/llvm/test/Feature/prologuedata.ll b/llvm/test/Feature/prologuedata.ll
index 63f424cc40e53..f1dddda6aec71 100644
--- a/llvm/test/Feature/prologuedata.ll
+++ b/llvm/test/Feature/prologuedata.ll
@@ -12,7 +12,7 @@ define void @f() prologue i32 1 {
ret void
}
-; CHECK: g(){{.*}}prologue i32* @i
-define void @g() prologue i32* @i {
+; CHECK: g(){{.*}}prologue ptr @i
+define void @g() prologue ptr @i {
ret void
}
diff --git a/llvm/test/Feature/recursivetype.ll b/llvm/test/Feature/recursivetype.ll
index b04069648bc53..c4bb3a6eb427f 100644
--- a/llvm/test/Feature/recursivetype.ll
+++ b/llvm/test/Feature/recursivetype.ll
@@ -37,67 +37,63 @@
; if (FindData(MyList, 700)) foundIt();
; }
-%list = type { %list*, i32 }
+%list = type { ptr, i32 }
-declare i8* @malloc(i32)
+declare ptr @malloc(i32)
-define void @InsertIntoListTail(%list** %L, i32 %Data) {
+define void @InsertIntoListTail(ptr %L, i32 %Data) {
bb1:
- %reg116 = load %list*, %list** %L ; <%list*> [#uses=1]
- %cast1004 = inttoptr i64 0 to %list* ; <%list*> [#uses=1]
- %cond1000 = icmp eq %list* %reg116, %cast1004 ; <i1> [#uses=1]
+ %reg116 = load ptr, ptr %L ; <ptr> [#uses=1]
+ %cast1004 = inttoptr i64 0 to ptr ; <ptr> [#uses=1]
+ %cond1000 = icmp eq ptr %reg116, %cast1004 ; <i1> [#uses=1]
br i1 %cond1000, label %bb3, label %bb2
bb2: ; preds = %bb2, %bb1
- %reg117 = phi %list** [ %reg118, %bb2 ], [ %L, %bb1 ] ; <%list**> [#uses=1]
- %cast1010 = bitcast %list** %reg117 to %list*** ; <%list***> [#uses=1]
- %reg118 = load %list**, %list*** %cast1010 ; <%list**> [#uses=3]
- %reg109 = load %list*, %list** %reg118 ; <%list*> [#uses=1]
- %cast1005 = inttoptr i64 0 to %list* ; <%list*> [#uses=1]
- %cond1001 = icmp ne %list* %reg109, %cast1005 ; <i1> [#uses=1]
+ %reg117 = phi ptr [ %reg118, %bb2 ], [ %L, %bb1 ] ; <ptr> [#uses=1]
+ %reg118 = load ptr, ptr %reg117 ; <ptr> [#uses=3]
+ %reg109 = load ptr, ptr %reg118 ; <ptr> [#uses=1]
+ %cast1005 = inttoptr i64 0 to ptr ; <ptr> [#uses=1]
+ %cond1001 = icmp ne ptr %reg109, %cast1005 ; <i1> [#uses=1]
br i1 %cond1001, label %bb2, label %bb3
bb3: ; preds = %bb2, %bb1
- %reg119 = phi %list** [ %reg118, %bb2 ], [ %L, %bb1 ] ; <%list**> [#uses=1]
- %cast1006 = bitcast %list** %reg119 to i8** ; <i8**> [#uses=1]
- %reg111 = call i8* @malloc( i32 16 ) ; <i8*> [#uses=3]
- store i8* %reg111, i8** %cast1006
- %reg111.upgrd.1 = ptrtoint i8* %reg111 to i64 ; <i64> [#uses=1]
+ %reg119 = phi ptr [ %reg118, %bb2 ], [ %L, %bb1 ] ; <ptr> [#uses=1]
+ %reg111 = call ptr @malloc( i32 16 ) ; <ptr> [#uses=3]
+ store ptr %reg111, ptr %reg119
+ %reg111.upgrd.1 = ptrtoint ptr %reg111 to i64 ; <i64> [#uses=1]
%reg1002 = add i64 %reg111.upgrd.1, 8 ; <i64> [#uses=1]
- %reg1002.upgrd.2 = inttoptr i64 %reg1002 to i8* ; <i8*> [#uses=1]
- %cast1008 = bitcast i8* %reg1002.upgrd.2 to i32* ; <i32*> [#uses=1]
- store i32 %Data, i32* %cast1008
- %cast1003 = inttoptr i64 0 to i64* ; <i64*> [#uses=1]
- %cast1009 = bitcast i8* %reg111 to i64** ; <i64**> [#uses=1]
- store i64* %cast1003, i64** %cast1009
+ %reg1002.upgrd.2 = inttoptr i64 %reg1002 to ptr ; <ptr> [#uses=1]
+ store i32 %Data, ptr %reg1002.upgrd.2
+ %cast1003 = inttoptr i64 0 to ptr ; <ptr> [#uses=1]
+ store ptr %cast1003, ptr %reg111
ret void
}
-define %list* @FindData(%list* %L, i32 %Data) {
+define ptr @FindData(ptr %L, i32 %Data) {
bb1:
br label %bb2
bb2: ; preds = %bb6, %bb1
- %reg115 = phi %list* [ %reg116, %bb6 ], [ %L, %bb1 ] ; <%list*> [#uses=4]
- %cast1014 = inttoptr i64 0 to %list* ; <%list*> [#uses=1]
- %cond1011 = icmp ne %list* %reg115, %cast1014 ; <i1> [#uses=1]
+ %reg115 = phi ptr [ %reg116, %bb6 ], [ %L, %bb1 ] ; <ptr> [#uses=4]
+ %cast1014 = inttoptr i64 0 to ptr ; <ptr> [#uses=1]
+ %cond1011 = icmp ne ptr %reg115, %cast1014 ; <i1> [#uses=1]
br i1 %cond1011, label %bb4, label %bb3
bb3: ; preds = %bb2
- ret %list* null
+ ret ptr null
bb4: ; preds = %bb2
- %idx = getelementptr %list, %list* %reg115, i64 0, i32 1 ; <i32*> [#uses=1]
- %reg111 = load i32, i32* %idx ; <i32> [#uses=1]
+ %idx = getelementptr %list, ptr %reg115, i64 0, i32 1 ; <ptr> [#uses=1]
+ %reg111 = load i32, ptr %idx ; <i32> [#uses=1]
%cond1013 = icmp ne i32 %reg111, %Data ; <i1> [#uses=1]
br i1 %cond1013, label %bb6, label %bb5
bb5: ; preds = %bb4
- ret %list* %reg115
+ ret ptr %reg115
bb6: ; preds = %bb4
- %idx2 = getelementptr %list, %list* %reg115, i64 0, i32 0 ; <%list**> [#uses=1]
- %reg116 = load %list*, %list** %idx2 ; <%list*> [#uses=1]
+ %idx2 = getelementptr %list, ptr %reg115, i64 0, i32 0 ; <ptr> [#uses=1]
+ %reg116 = load ptr, ptr %idx2 ; <ptr> [#uses=1]
br label %bb2
}
diff --git a/llvm/test/Feature/seh-nounwind.ll b/llvm/test/Feature/seh-nounwind.ll
index 2afd10046473b..a590d5cd418c8 100644
--- a/llvm/test/Feature/seh-nounwind.ll
+++ b/llvm/test/Feature/seh-nounwind.ll
@@ -11,14 +11,14 @@ entry:
ret i32 %div
}
-define i32 @main() nounwind personality i8* bitcast (i32 (...)* @__C_specific_handler to i8*) {
+define i32 @main() nounwind personality ptr @__C_specific_handler {
entry:
%call = invoke i32 @div(i32 10, i32 0)
to label %__try.cont unwind label %lpad
lpad:
- %0 = landingpad { i8*, i32 }
- catch i8* null
+ %0 = landingpad { ptr, i32 }
+ catch ptr null
br label %__try.cont
__try.cont:
diff --git a/llvm/test/Feature/simplecalltest.ll b/llvm/test/Feature/simplecalltest.ll
index 64522864d5776..6369b67b952fa 100644
--- a/llvm/test/Feature/simplecalltest.ll
+++ b/llvm/test/Feature/simplecalltest.ll
@@ -4,17 +4,17 @@
%FunTy = type i32 (i32)
-define void @invoke(%FunTy* %x) {
+define void @invoke(ptr %x) {
%foo = call i32 %x( i32 123 ) ; <i32> [#uses=0]
ret void
}
-define i32 @main(i32 %argc, i8** %argv, i8** %envp) {
+define i32 @main(i32 %argc, ptr %argv, ptr %envp) {
%retval = call i32 @test( i32 %argc ) ; <i32> [#uses=2]
%two = add i32 %retval, %retval ; <i32> [#uses=1]
%retval2 = call i32 @test( i32 %argc ) ; <i32> [#uses=1]
%two2 = add i32 %two, %retval2 ; <i32> [#uses=1]
- call void @invoke( %FunTy* @test )
+ call void @invoke( ptr @test )
ret i32 %two2
}
diff --git a/llvm/test/Feature/sparcld.ll b/llvm/test/Feature/sparcld.ll
index f5a24f51fd3bf..27fe5f26c4446 100644
--- a/llvm/test/Feature/sparcld.ll
+++ b/llvm/test/Feature/sparcld.ll
@@ -2,23 +2,23 @@
; RUN: llvm-as < %t | llvm-dis > %t2
; RUN:
diff %t %t2
; ModuleID = '<stdin>'
- at ld = external global fp128 ; <fp128*> [#uses=1]
- at d = global double 4.050000e+00, align 8 ; <double*> [#uses=1]
- at f = global float 0x4010333340000000 ; <float*> [#uses=1]
+ at ld = external global fp128 ; <ptr> [#uses=1]
+ at d = global double 4.050000e+00, align 8 ; <ptr> [#uses=1]
+ at f = global float 0x4010333340000000 ; <ptr> [#uses=1]
define i32 @foo() {
entry:
- %retval = alloca i32, align 4 ; <i32*> [#uses=1]
+ %retval = alloca i32, align 4 ; <ptr> [#uses=1]
%"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
- %tmp = load float, float* @f ; <float> [#uses=1]
+ %tmp = load float, ptr @f ; <float> [#uses=1]
%tmp1 = fpext float %tmp to double ; <double> [#uses=1]
- %tmp2 = load double, double* @d ; <double> [#uses=1]
+ %tmp2 = load double, ptr @d ; <double> [#uses=1]
%tmp3 = fmul double %tmp1, %tmp2 ; <double> [#uses=1]
%tmp4 = fpext double %tmp3 to fp128 ; <fp128> [#uses=1]
- store fp128 %tmp4, fp128* @ld
+ store fp128 %tmp4, ptr @ld
br label %return
return: ; preds = %entry
- %retval4 = load i32, i32* %retval ; <i32> [#uses=1]
+ %retval4 = load i32, ptr %retval ; <i32> [#uses=1]
ret i32 %retval4
}
diff --git a/llvm/test/Feature/strip_names.ll b/llvm/test/Feature/strip_names.ll
index e056717991373..dd941e45fb66a 100644
--- a/llvm/test/Feature/strip_names.ll
+++ b/llvm/test/Feature/strip_names.ll
@@ -5,14 +5,14 @@
; CHECK: @GlobalValueName
; CHECK: @foo(i32 %in)
; CHECK: somelabel:
-; CHECK: %GV = load i32, i32* @GlobalValueName
+; CHECK: %GV = load i32, ptr @GlobalValueName
; CHECK: %add = add i32 %in, %GV
; CHECK: ret i32 %add
; NONAME: @GlobalValueName
; NONAME: @foo(i32 %0)
; NONAME-NOT: somelabel:
-; NONAME: %2 = load i32, i32* @GlobalValueName
+; NONAME: %2 = load i32, ptr @GlobalValueName
; NONAME: %3 = add i32 %0, %2
; NONAME: ret i32 %3
@@ -20,7 +20,7 @@
define i32 @foo(i32 %in) {
somelabel:
- %GV = load i32, i32* @GlobalValueName
+ %GV = load i32, ptr @GlobalValueName
%add = add i32 %in, %GV
ret i32 %add
}
diff --git a/llvm/test/Feature/terminators.ll b/llvm/test/Feature/terminators.ll
index 1bca2a842c5d2..fd3ae662c580c 100644
--- a/llvm/test/Feature/terminators.ll
+++ b/llvm/test/Feature/terminators.ll
@@ -25,17 +25,17 @@ Case4: ; preds = %0
}
- at Addr = global i8* blockaddress(@indbrtest, %BB1)
- at Addr3 = global i8* blockaddress(@squared, %Case1)
+ at Addr = global ptr blockaddress(@indbrtest, %BB1)
+ at Addr3 = global ptr blockaddress(@squared, %Case1)
-define i32 @indbrtest(i8* %P, i32* %Q) {
- indirectbr i8* %P, [label %BB1, label %BB2, label %BB3]
+define i32 @indbrtest(ptr %P, ptr %Q) {
+ indirectbr ptr %P, [label %BB1, label %BB2, label %BB3]
BB1:
- indirectbr i32* %Q, []
+ indirectbr ptr %Q, []
BB2:
- %R = bitcast i8* blockaddress(@indbrtest, %BB3) to i8*
- indirectbr i8* %R, [label %BB1, label %BB2, label %BB3]
+ %R = bitcast ptr blockaddress(@indbrtest, %BB3) to ptr
+ indirectbr ptr %R, [label %BB1, label %BB2, label %BB3]
BB3:
ret i32 2
}
diff --git a/llvm/test/Feature/testconstants.ll b/llvm/test/Feature/testconstants.ll
index a8368652610c5..ddc042d9d72a0 100644
--- a/llvm/test/Feature/testconstants.ll
+++ b/llvm/test/Feature/testconstants.ll
@@ -2,21 +2,21 @@
; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
; RUN:
diff %t1.ll %t2.ll
- at somestr = constant [11 x i8] c"hello world" ; <[11 x i8]*> [#uses=1]
- at array = constant [2 x i32] [ i32 12, i32 52 ] ; <[2 x i32]*> [#uses=1]
- at 0 = constant { i32, i32 } { i32 4, i32 3 } ; <{ i32, i32 }*>:0 [#uses=0]
+ at somestr = constant [11 x i8] c"hello world" ; <ptr> [#uses=1]
+ at array = constant [2 x i32] [ i32 12, i32 52 ] ; <ptr> [#uses=1]
+ at 0 = constant { i32, i32 } { i32 4, i32 3 } ; <ptr>:0 [#uses=0]
-define [2 x i32]* @testfunction(i32 %i0, i32 %j0) {
- ret [2 x i32]* @array
+define ptr @testfunction(i32 %i0, i32 %j0) {
+ ret ptr @array
}
-define i8* @otherfunc(i32, double) {
- %somestr = getelementptr [11 x i8], [11 x i8]* @somestr, i64 0, i64 0 ; <i8*> [#uses=1]
- ret i8* %somestr
+define ptr @otherfunc(i32, double) {
+ %somestr = getelementptr [11 x i8], ptr @somestr, i64 0, i64 0 ; <ptr> [#uses=1]
+ ret ptr %somestr
}
-define i8* @yetanotherfunc(i32, double) {
- ret i8* null
+define ptr @yetanotherfunc(i32, double) {
+ ret ptr null
}
define i32 @negativeUnsigned() {
diff --git a/llvm/test/Feature/testtype.ll b/llvm/test/Feature/testtype.ll
index cdeb5a017cfa5..9b854ab6e9db0 100644
--- a/llvm/test/Feature/testtype.ll
+++ b/llvm/test/Feature/testtype.ll
@@ -2,20 +2,20 @@
; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
; RUN:
diff %t1.ll %t2.ll
-%X = type i32* addrspace(4)*
+%X = type ptr addrspace(4)
%inners = type { float, { i8 } }
%struct = type { i32, %inners, i64 }
-%fwd = type %fwdref*
-%fwdref = type { %fwd* }
+%fwd = type ptr
+%fwdref = type { ptr }
; same as above with unnamed types
-%1 = type %0*
+%1 = type ptr
%test = type %1
-%0 = type { %1* }
+%0 = type { ptr }
%test2 = type [2 x i32]
-;%x = type %undefined*
+;%x = type ptr
-%test3 = type i32 (i32()*, float(...)*, ...)*
+%test3 = type ptr
diff --git a/llvm/test/Feature/testvarargs.ll b/llvm/test/Feature/testvarargs.ll
index ccc81f6d899d2..c480c1c77e3f5 100644
--- a/llvm/test/Feature/testvarargs.ll
+++ b/llvm/test/Feature/testvarargs.ll
@@ -3,10 +3,10 @@
; RUN:
diff %t1.ll %t2.ll
-declare i32 @printf(i8*, ...) ;; Prototype for: int __builtin_printf(const char*, ...)
+declare i32 @printf(ptr, ...) ;; Prototype for: int __builtin_printf(const char*, ...)
define i32 @testvarar() {
- call i32 (i8*, ...) @printf( i8* null, i32 12, i8 42 ) ; <i32>:1 [#uses=1]
+ call i32 (ptr, ...) @printf( ptr null, i32 12, i8 42 ) ; <i32>:1 [#uses=1]
ret i32 %1
}
diff --git a/llvm/test/Feature/undefined.ll b/llvm/test/Feature/undefined.ll
index e01ed4c0f9c44..c4848161c6edb 100644
--- a/llvm/test/Feature/undefined.ll
+++ b/llvm/test/Feature/undefined.ll
@@ -3,9 +3,9 @@
; RUN:
diff %t1.ll %t2.ll
; RUN: FileCheck %s < %t1.ll
- at X = global i32 undef ; <i32*> [#uses=0]
+ at X = global i32 undef ; <ptr> [#uses=0]
-declare i32 @atoi(i8*)
+declare i32 @atoi(ptr)
define i32 @test() {
ret i32 undef
@@ -21,7 +21,7 @@ define i32 @test2() {
; CHECK: @X = global
; CHECK-EMPTY:
-; CHECK: declare i32 @atoi(i8*)
+; CHECK: declare i32 @atoi(ptr)
; CHECK-EMPTY:
; CHECK: define i32 @test() {
; CHECK: {{^[}]}}
diff --git a/llvm/test/Feature/varargs.ll b/llvm/test/Feature/varargs.ll
index b9317df491afb..6f544177eec5d 100644
--- a/llvm/test/Feature/varargs.ll
+++ b/llvm/test/Feature/varargs.ll
@@ -5,25 +5,20 @@
; Demonstrate all of the variable argument handling intrinsic functions plus
; the va_arg instruction.
-declare void @llvm.va_start(i8*)
+declare void @llvm.va_start(ptr)
-declare void @llvm.va_copy(i8*, i8*)
+declare void @llvm.va_copy(ptr, ptr)
-declare void @llvm.va_end(i8*)
+declare void @llvm.va_end(ptr)
define i32 @test(i32 %X, ...) {
- %ap = alloca i8* ; <i8**> [#uses=4]
- %va.upgrd.1 = bitcast i8** %ap to i8* ; <i8*> [#uses=1]
- call void @llvm.va_start( i8* %va.upgrd.1 )
- %tmp = va_arg i8** %ap, i32 ; <i32> [#uses=1]
- %aq = alloca i8* ; <i8**> [#uses=2]
- %va0.upgrd.2 = bitcast i8** %aq to i8* ; <i8*> [#uses=1]
- %va1.upgrd.3 = bitcast i8** %ap to i8* ; <i8*> [#uses=1]
- call void @llvm.va_copy( i8* %va0.upgrd.2, i8* %va1.upgrd.3 )
- %va.upgrd.4 = bitcast i8** %aq to i8* ; <i8*> [#uses=1]
- call void @llvm.va_end( i8* %va.upgrd.4 )
- %va.upgrd.5 = bitcast i8** %ap to i8* ; <i8*> [#uses=1]
- call void @llvm.va_end( i8* %va.upgrd.5 )
+ %ap = alloca ptr ; <ptr> [#uses=4]
+ call void @llvm.va_start( ptr %ap )
+ %tmp = va_arg ptr %ap, i32 ; <i32> [#uses=1]
+ %aq = alloca ptr ; <ptr> [#uses=2]
+ call void @llvm.va_copy( ptr %aq, ptr %ap )
+ call void @llvm.va_end( ptr %aq )
+ call void @llvm.va_end( ptr %ap )
ret i32 %tmp
}
diff --git a/llvm/test/Feature/varargs_new.ll b/llvm/test/Feature/varargs_new.ll
index ca5599d369a16..70c1ce4811127 100644
--- a/llvm/test/Feature/varargs_new.ll
+++ b/llvm/test/Feature/varargs_new.ll
@@ -5,34 +5,29 @@
; Demonstrate all of the variable argument handling intrinsic functions plus
; the va_arg instruction.
-declare void @llvm.va_start(i8*)
+declare void @llvm.va_start(ptr)
-declare void @llvm.va_copy(i8*, i8*)
+declare void @llvm.va_copy(ptr, ptr)
-declare void @llvm.va_end(i8*)
+declare void @llvm.va_end(ptr)
define i32 @test(i32 %X, ...) {
; Allocate two va_list items. On this target, va_list is of type sbyte*
- %ap = alloca i8* ; <i8**> [#uses=4]
- %aq = alloca i8* ; <i8**> [#uses=2]
+ %ap = alloca ptr ; <ptr> [#uses=4]
+ %aq = alloca ptr ; <ptr> [#uses=2]
; Initialize variable argument processing
- %va.upgrd.1 = bitcast i8** %ap to i8* ; <i8*> [#uses=1]
- call void @llvm.va_start( i8* %va.upgrd.1 )
+ call void @llvm.va_start( ptr %ap )
; Read a single integer argument
- %tmp = va_arg i8** %ap, i32 ; <i32> [#uses=1]
+ %tmp = va_arg ptr %ap, i32 ; <i32> [#uses=1]
; Demonstrate usage of llvm.va_copy and llvm_va_end
- %apv = load i8*, i8** %ap ; <i8*> [#uses=1]
- %va0.upgrd.2 = bitcast i8** %aq to i8* ; <i8*> [#uses=1]
- %va1.upgrd.3 = bitcast i8* %apv to i8* ; <i8*> [#uses=1]
- call void @llvm.va_copy( i8* %va0.upgrd.2, i8* %va1.upgrd.3 )
- %va.upgrd.4 = bitcast i8** %aq to i8* ; <i8*> [#uses=1]
- call void @llvm.va_end( i8* %va.upgrd.4 )
+ %apv = load ptr, ptr %ap ; <ptr> [#uses=1]
+ call void @llvm.va_copy( ptr %aq, ptr %apv )
+ call void @llvm.va_end( ptr %aq )
; Stop processing of arguments.
- %va.upgrd.5 = bitcast i8** %ap to i8* ; <i8*> [#uses=1]
- call void @llvm.va_end( i8* %va.upgrd.5 )
+ call void @llvm.va_end( ptr %ap )
ret i32 %tmp
}
diff --git a/llvm/test/Feature/weak_constant.ll b/llvm/test/Feature/weak_constant.ll
index a4051e995361e..185a9aab1fc2f 100644
--- a/llvm/test/Feature/weak_constant.ll
+++ b/llvm/test/Feature/weak_constant.ll
@@ -5,25 +5,25 @@
; RUN: grep 'i32 9' %t | count 1
%0 = type { i32, i32 } ; type %0
- at a = weak constant i32 undef ; <i32*> [#uses=1]
- at b = weak constant i32 5 ; <i32*> [#uses=1]
- at c = weak constant %0 { i32 7, i32 9 } ; <%0*> [#uses=1]
+ at a = weak constant i32 undef ; <ptr> [#uses=1]
+ at b = weak constant i32 5 ; <ptr> [#uses=1]
+ at c = weak constant %0 { i32 7, i32 9 } ; <ptr> [#uses=1]
define i32 @la() {
- %v = load i32, i32* @a ; <i32> [#uses=1]
+ %v = load i32, ptr @a ; <i32> [#uses=1]
ret i32 %v
}
define i32 @lb() {
- %v = load i32, i32* @b ; <i32> [#uses=1]
+ %v = load i32, ptr @b ; <i32> [#uses=1]
ret i32 %v
}
define i32 @lc() {
- %g = getelementptr %0, %0* @c, i32 0, i32 0 ; <i32*> [#uses=1]
- %u = load i32, i32* %g ; <i32> [#uses=1]
- %h = getelementptr %0, %0* @c, i32 0, i32 1 ; <i32*> [#uses=1]
- %v = load i32, i32* %h ; <i32> [#uses=1]
+ %g = getelementptr %0, ptr @c, i32 0, i32 0 ; <ptr> [#uses=1]
+ %u = load i32, ptr %g ; <i32> [#uses=1]
+ %h = getelementptr %0, ptr @c, i32 0, i32 1 ; <ptr> [#uses=1]
+ %v = load i32, ptr %h ; <i32> [#uses=1]
%r = add i32 %u, %v
ret i32 %r
}
diff --git a/llvm/test/Feature/x86ld.ll b/llvm/test/Feature/x86ld.ll
index 7f91abd6d7ff5..9e690e4e5c638 100644
--- a/llvm/test/Feature/x86ld.ll
+++ b/llvm/test/Feature/x86ld.ll
@@ -4,23 +4,23 @@
; ModuleID = '<stdin>'
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"
target triple = "i686-apple-darwin8"
- at ld = external global x86_fp80 ; <x86_fp80*> [#uses=1]
- at d = global double 4.050000e+00, align 8 ; <double*> [#uses=1]
- at f = global float 0x4010333340000000 ; <float*> [#uses=1]
+ at ld = external global x86_fp80 ; <ptr> [#uses=1]
+ at d = global double 4.050000e+00, align 8 ; <ptr> [#uses=1]
+ at f = global float 0x4010333340000000 ; <ptr> [#uses=1]
define i32 @foo() {
entry:
- %retval = alloca i32, align 4 ; <i32*> [#uses=1]
+ %retval = alloca i32, align 4 ; <ptr> [#uses=1]
%"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
- %tmp = load float, float* @f ; <float> [#uses=1]
+ %tmp = load float, ptr @f ; <float> [#uses=1]
%tmp1 = fpext float %tmp to double ; <double> [#uses=1]
- %tmp2 = load double, double* @d ; <double> [#uses=1]
+ %tmp2 = load double, ptr @d ; <double> [#uses=1]
%tmp3 = fmul double %tmp1, %tmp2 ; <double> [#uses=1]
%tmp4 = fpext double %tmp3 to x86_fp80 ; <x86_fp80> [#uses=1]
- store x86_fp80 %tmp4, x86_fp80* @ld
+ store x86_fp80 %tmp4, ptr @ld
br label %return
return: ; preds = %entry
- %retval4 = load i32, i32* %retval ; <i32> [#uses=1]
+ %retval4 = load i32, ptr %retval ; <i32> [#uses=1]
ret i32 %retval4
}
More information about the llvm-commits
mailing list