diff --git a/llvm/test/Feature/OperandBundles/basic-aa-argmemonly.ll b/llvm/test/Feature/OperandBundles/basic-aa-argmemonly.ll index 1c58838ade33..61436ec13e84 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 6fd51620da62..440b710a2089 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 b811a5a5122f..78715b651ec7 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 1db14cc7b538..d3001fa7da42 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 3aac76f1cce4..9b9fd71b1f23 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 ae5bc11d71a9..7d3bca583123 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 -@a1 = alias i16, bitcast (i32* @v1 to i16*) -; CHECK: @a1 = alias i16, bitcast (i32* @v1 to i16*) +@a1 = alias i16, ptr @v1 +; CHECK: @a1 = alias i16, ptr @v1 -@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) +@a2 = alias i32, ptr @v2 +; CHECK: @a2 = alias i32, ptr @v2 -@a3 = alias i32, addrspacecast (i32* @v1 to i32 addrspace(2)*) -; CHECK: @a3 = alias i32, addrspacecast (i32* @v1 to i32 addrspace(2)*) +@a3 = alias i32, addrspacecast (ptr @v1 to ptr addrspace(2)) +; CHECK: @a3 = alias i32, addrspacecast (ptr @v1 to ptr addrspace(2)) -@a4 = alias i16, bitcast (i32* @v1 to i16*) -; CHECK: @a4 = alias i16, bitcast (i32* @v1 to i16*) +@a4 = alias i16, ptr @v1 +; CHECK: @a4 = alias i16, ptr @v1 -@a5 = thread_local(localdynamic) alias i32, i32* @v1 -; CHECK: @a5 = thread_local(localdynamic) alias i32, i32* @v1 +@a5 = thread_local(localdynamic) alias i32, ptr @v1 +; CHECK: @a5 = thread_local(localdynamic) alias i32, ptr @v1 -@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) +@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 f6dbe33b24ba..76fb5a225d09 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 -@X = global i32 4, align 16 ; [#uses=0] +@X = global i32 4, align 16 ; [#uses=0] -define i32* @test() align 32 { - %X = alloca i32, align 4 ; [#uses=1] - %Y = alloca i32, i32 42, align 16 ; [#uses=0] - %Z = alloca i32 ; [#uses=0] - ret i32* %X +define ptr @test() align 32 { + %X = alloca i32, align 4 ; [#uses=1] + %Y = alloca i32, i32 42, align 16 ; [#uses=0] + %Z = alloca i32 ; [#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 cae3cbfe79ba..883a68ec9b4d 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 ea30a8e7f4d1..7eb77b555cdc 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 a53c3a1215ae..6e7e2b0f1513 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 ) ; [#uses=0] %foo2 = tail call i32 %x( i32 123 ) ; [#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 ) ; [#uses=2] %two = add i32 %retval, %retval ; [#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 ; [#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 b0286c06ea0f..5eb723eb6007 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) -@a = alias i32, i32* @v -; CHECK: @a = alias i32, i32* @v{{$}} +@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 15c1142b37a2..c91b82e16dbe 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 -@G = constant <3 x i64> ptrtoint (<3 x i8*> to <3 x i64>) +@G = constant <3 x i64> ptrtoint (<3 x ptr> to <3 x i64>) @G1 = global i8 zeroinitializer -@g = constant <2 x i8*> getelementptr (i8, <2 x i8*> , <2 x i32> ) +@g = constant <2 x ptr> getelementptr (i8, <2 x ptr> , <2 x i32> ) -@t = constant <2 x i1> icmp eq (<2 x i32> ptrtoint (<2 x i8*> zeroinitializer to <2 x i32>), <2 x i32> zeroinitializer ) +@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 bd967272cf5b..227ab198ba1c 100644 --- a/llvm/test/Feature/constpointer.ll +++ b/llvm/test/Feature/constpointer.ll @@ -10,22 +10,22 @@ ; -@t3 = global i32* @t1 ;; Forward reference +@t3 = global ptr @t1 ;; Forward reference @t1 = global i32 4 -@t4 = global i32** @t3 ;; reference to reference +@t4 = global ptr @t3 ;; reference to reference -@t2 = global i32* @t1 +@t2 = global ptr @t1 -@0 = global float * @2 ;; Forward numeric reference -@1 = global float * @2 ;; Duplicate forward numeric reference +@0 = global ptr @2 ;; Forward numeric reference +@1 = global ptr @2 ;; Duplicate forward numeric reference @2 = global float 0.0 -@3 = global float * @2 ;; Numeric reference +@3 = global ptr @2 ;; Numeric reference -@fptr = global void() * @f ;; Forward ref method defn +@fptr = global ptr @f ;; Forward ref method defn declare void @f() ;; External method -@sptr1 = global [11x i8]* @somestr ;; Forward ref to a constant +@sptr1 = global ptr @somestr ;; Forward ref to a constant @somestr = constant [11x i8] c"hello world" -@sptr2 = global [11x i8]* @somestr +@sptr2 = global ptr @somestr diff --git a/llvm/test/Feature/exception.ll b/llvm/test/Feature/exception.ll index cbe2d0353cc3..c703d1dadfa8 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 -@_ZTIc = external constant i8* -@_ZTId = external constant i8* -@_ZTIPKc = external constant i8* +@_ZTIc = external constant ptr +@_ZTId = external constant ptr +@_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 6ca1be79e461..63eb90dc60cc 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 d0ad38dc26e5..a338f40068c3 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 -@g = global <2 x i32*> zeroinitializer -%0 = type { i32, void ()*, i8* } -@llvm.global_ctors = appending global [1 x %0] [%0 { i32 65535, void ()* @test, i8* null }] +@g = global <2 x ptr> zeroinitializer +%0 = type { i32, ptr, ptr } +@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 b8f5eb1b666c..193fb1e70d72 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 -@X = global i32 4, section "foo", align 16 ; [#uses=0] +@X = global i32 4, section "foo", align 16 ; [#uses=0] define void @test() section "bar" { ret void diff --git a/llvm/test/Feature/globalvars.ll b/llvm/test/Feature/globalvars.ll index 3e47650df7d0..ab9e44ace9fd 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 -@MyVar = external global i32 ; [#uses=1] -@MyIntList = external global { i32*, i32 } ; <{ \2*, i32 }*> [#uses=1] -@0 = external global i32 ; :0 [#uses=0] -@AConst = constant i32 123 ; [#uses=0] -@AString = constant [4 x i8] c"test" ; <[4 x i8]*> [#uses=0] -@ZeroInit = global { [100 x i32], [40 x float] } zeroinitializer ; <{ [100 x i32], [40 x float] }*> [#uses=0] +@MyVar = external global i32 ; [#uses=1] +@MyIntList = external global { ptr, i32 } ; [#uses=1] +@0 = external global i32 ; :0 [#uses=0] +@AConst = constant i32 123 ; [#uses=0] +@AString = constant [4 x i8] c"test" ; [#uses=0] +@ZeroInit = global { [100 x i32], [40 x float] } zeroinitializer ; [#uses=0] define i32 @foo(i32 %blah) { - store i32 5, i32* @MyVar - %idx = getelementptr { i32*, i32 }, { i32*, i32 }* @MyIntList, i64 0, i32 1 ; [#uses=1] - store i32 12, i32* %idx + store i32 5, ptr @MyVar + %idx = getelementptr { ptr, i32 }, ptr @MyIntList, i64 0, i32 1 ; [#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 c1cf39f33746..35f07d2f65f7 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 ; :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) { ;