4 changes: 2 additions & 2 deletions llvm/test/Verifier/recursive-type-store.ll
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

%rt2 = type { i32, { i8, %rt2, i8 }, i32 }

define void @f(%rt2 %r, %rt2 *%p) nounwind {
define void @f(%rt2 %r, ptr %p) nounwind {
entry:
; Check that recursive types trigger an error instead of segfaulting, when
; the recursion isn't through a pointer to the type.
; CHECK: storing unsized types is not allowed
store %rt2 %r, %rt2 *%p
store %rt2 %r, ptr %p
ret void
}
16 changes: 8 additions & 8 deletions llvm/test/Verifier/reduction-intrinsics.ll
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ define float @not_float_reduce(<4 x float> %x) {
ret float %r
}

define i32* @not_pointer_reduce(<4 x i32*> %x) {
define ptr @not_pointer_reduce(<4 x ptr> %x) {
; CHECK: Intrinsic has incorrect argument type!
%r = call i32* @llvm.vector.reduce.or.v4p0i32(<4 x i32*> %x)
ret i32* %r
%r = call ptr @llvm.vector.reduce.or.v4p0(<4 x ptr> %x)
ret ptr %r
}

define i32 @not_integer_reduce(<4 x i32> %x) {
Expand All @@ -51,17 +51,17 @@ define i32 @not_integer_reduce(<4 x i32> %x) {
ret i32 %r
}

define i32* @not_pointer_reduce2(<4 x i32*> %x) {
define ptr @not_pointer_reduce2(<4 x ptr> %x) {
; CHECK: Intrinsic has incorrect argument type!
%r = call i32* @llvm.vector.reduce.fmin.v4p0i32(<4 x i32*> %x)
ret i32* %r
%r = call ptr @llvm.vector.reduce.fmin.v4p0(<4 x ptr> %x)
ret ptr %r
}

declare float @llvm.vector.reduce.umin.v4f32(<4 x float>)
declare i32* @llvm.vector.reduce.or.v4p0i32(<4 x i32*>)
declare ptr @llvm.vector.reduce.or.v4p0(<4 x ptr>)
declare i32 @llvm.vector.reduce.fadd.v4i32(i32, <4 x i32>)
declare float @llvm.vector.reduce.fadd.v4f32(double, <4 x float>)
declare i32* @llvm.vector.reduce.fmin.v4p0i32(<4 x i32*>)
declare ptr @llvm.vector.reduce.fmin.v4p0(<4 x ptr>)
declare float @llvm.vector.reduce.fmax.f32(float)
declare i32 @llvm.vector.reduce.smax.i32(i32)
declare i64 @llvm.vector.reduce.add.v4i32(<4 x i32>)
2 changes: 1 addition & 1 deletion llvm/test/Verifier/resume.ll
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

define void @test1() {
entry:
resume { i8*, i32 } undef
resume { ptr, i32 } undef
; CHECK: ResumeInst needs to be in a function with a personality.
}
6 changes: 3 additions & 3 deletions llvm/test/Verifier/scalable-global-vars.ll
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
;; know the size at compile time.

; CHECK: Globals cannot contain scalable vectors
; CHECK-NEXT: <vscale x 4 x i32>* @ScalableVecGlobal
; CHECK-NEXT: ptr @ScalableVecGlobal
@ScalableVecGlobal = global <vscale x 4 x i32> zeroinitializer

; CHECK-NEXT: Globals cannot contain scalable vectors
; CHECK-NEXT: { i32, <vscale x 4 x i32> }* @ScalableVecStructGlobal
; CHECK-NEXT: ptr @ScalableVecStructGlobal
@ScalableVecStructGlobal = global { i32, <vscale x 4 x i32> } zeroinitializer

;; Global _pointers_ to scalable vectors are fine
; CHECK-NOT: Globals cannot contain scalable vectors
@ScalableVecPtr = global <vscale x 8 x i16>* zeroinitializer
@ScalableVecPtr = global ptr zeroinitializer
4 changes: 2 additions & 2 deletions llvm/test/Verifier/scalable-vector-struct-load.ll
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
; RUN: not opt -S -passes=verify < %s 2>&1 | FileCheck %s

define <vscale x 1 x i32> @load({ i32, <vscale x 1 x i32> }* %x) {
define <vscale x 1 x i32> @load(ptr %x) {
; CHECK: error: loading unsized types is not allowed
%a = load { i32, <vscale x 1 x i32> }, { i32, <vscale x 1 x i32> }* %x
%a = load { i32, <vscale x 1 x i32> }, ptr %x
%b = extractvalue { i32, <vscale x 1 x i32> } %a, 1
ret <vscale x 1 x i32> %b
}
4 changes: 2 additions & 2 deletions llvm/test/Verifier/scalable-vector-struct-store.ll
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
; RUN: not opt -S -passes=verify < %s 2>&1 | FileCheck %s

define void @store({ i32, <vscale x 1 x i32> }* %x, i32 %y, <vscale x 1 x i32> %z) {
define void @store(ptr %x, i32 %y, <vscale x 1 x i32> %z) {
; CHECK: error: storing unsized types is not allowed
%a = insertvalue { i32, <vscale x 1 x i32> } undef, i32 %y, 0
%b = insertvalue { i32, <vscale x 1 x i32> } %a, <vscale x 1 x i32> %z, 1
store { i32, <vscale x 1 x i32> } %b, { i32, <vscale x 1 x i32> }* %x
store { i32, <vscale x 1 x i32> } %b, ptr %x
ret void
}
8 changes: 4 additions & 4 deletions llvm/test/Verifier/set1.ll
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ entry:
br label %second, !dbg !21

second: ; preds = %entry
call void @llvm.dbg.declare(metadata i64* %as, metadata !22, metadata !DIExpression()), !dbg !25
call void @llvm.dbg.declare(metadata i64* %bs, metadata !26, metadata !DIExpression()), !dbg !25
store i64 36028797018972298, i64* %as, align 8, !dbg !28
store i64 85, i64* %bs, align 8, !dbg !29
call void @llvm.dbg.declare(metadata ptr %as, metadata !22, metadata !DIExpression()), !dbg !25
call void @llvm.dbg.declare(metadata ptr %bs, metadata !26, metadata !DIExpression()), !dbg !25
store i64 36028797018972298, ptr %as, align 8, !dbg !28
store i64 85, ptr %bs, align 8, !dbg !29
ret void, !dbg !21
}

Expand Down
4 changes: 2 additions & 2 deletions llvm/test/Verifier/speculatable-callsite-invalid.ll
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ define i32 @call_not_speculatable() {
@gv = internal unnamed_addr constant i32 0

; CHECK: speculatable attribute may not apply to call sites
; CHECK-NEXT: %ret = call float bitcast (i32* @gv to float ()*)() #0
; CHECK-NEXT: %ret = call float @gv() #0
define float @call_bitcast_speculatable() {
%ret = call float bitcast (i32* @gv to float()*)() #0
%ret = call float @gv() #0
ret float %ret
}

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Verifier/speculatable-callsite.ll
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ define i32 @call_speculatable() {
}

define float @call_bitcast_speculatable() {
%ret = call float bitcast (i32()* @speculatable to float()*)() #0
%ret = call float @speculatable() #0
ret float %ret
}

Expand Down
6 changes: 3 additions & 3 deletions llvm/test/Verifier/sret.ll
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
; RUN: not llvm-as %s -o /dev/null 2>&1 | FileCheck %s

declare void @a(i32* sret(i32) %a, i32* sret(i32) %b)
declare void @a(ptr sret(i32) %a, ptr sret(i32) %b)
; CHECK: Cannot have multiple 'sret' parameters!

declare void @b(i32* %a, i32* %b, i32* sret(i32) %c)
declare void @b(ptr %a, ptr %b, ptr sret(i32) %c)
; CHECK: Attribute 'sret' is not on first or second parameter!

; CHECK: Attribute 'sret(i32)' applied to incompatible type!
; CHECK-NEXT: void (i32)* @not_ptr
; CHECK-NEXT: ptr @not_ptr
declare void @not_ptr(i32 sret(i32) %x)
52 changes: 24 additions & 28 deletions llvm/test/Verifier/statepoint.ll
Original file line number Diff line number Diff line change
@@ -1,48 +1,44 @@
; RUN: opt -S %s -passes=verify | FileCheck %s

declare void @use(...)
declare i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token, i32, i32)
declare i64 addrspace(1)* @llvm.experimental.gc.relocate.p1i64(token, i32, i32)
declare token @llvm.experimental.gc.statepoint.p0f_isVoidf(i64, i32, void ()*, i32, i32, ...)
declare token @llvm.experimental.gc.statepoint.p0f_isVoidp0s_structsf(i64, i32, void (%struct*)*, i32, i32, ...)
declare ptr addrspace(1) @llvm.experimental.gc.relocate.p1(token, i32, i32)
declare token @llvm.experimental.gc.statepoint.p0(i64, i32, ptr, i32, i32, ...)
declare i32 @"personality_function"()

;; Basic usage
define i64 addrspace(1)* @test1(i8 addrspace(1)* %arg) gc "statepoint-example" {
define ptr addrspace(1) @test1(ptr addrspace(1) %arg) gc "statepoint-example" {
entry:
%cast = bitcast i8 addrspace(1)* %arg to i64 addrspace(1)*
%safepoint_token = call token (i64, i32, void ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidf(i64 0, i32 0, void ()* elementtype(void ()) undef, i32 0, i32 0, i32 0, i32 0) ["gc-live" (i8 addrspace(1)* %arg, i64 addrspace(1)* %cast, i8 addrspace(1)* %arg, i8 addrspace(1)* %arg), "deopt" (i32 0, i32 0, i32 0, i32 10, i32 0)]
%reloc = call i64 addrspace(1)* @llvm.experimental.gc.relocate.p1i64(token %safepoint_token, i32 0, i32 1)
%safepoint_token = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 0, i32 0, ptr elementtype(void ()) undef, i32 0, i32 0, i32 0, i32 0) ["gc-live" (ptr addrspace(1) %arg, ptr addrspace(1) %arg, ptr addrspace(1) %arg, ptr addrspace(1) %arg), "deopt" (i32 0, i32 0, i32 0, i32 10, i32 0)]
%reloc = call ptr addrspace(1) @llvm.experimental.gc.relocate.p1(token %safepoint_token, i32 0, i32 1)
;; It is perfectly legal to relocate the same value multiple times...
%reloc2 = call i64 addrspace(1)* @llvm.experimental.gc.relocate.p1i64(token %safepoint_token, i32 0, i32 1)
%reloc3 = call i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %safepoint_token, i32 1, i32 0)
ret i64 addrspace(1)* %reloc
%reloc2 = call ptr addrspace(1) @llvm.experimental.gc.relocate.p1(token %safepoint_token, i32 0, i32 1)
%reloc3 = call ptr addrspace(1) @llvm.experimental.gc.relocate.p1(token %safepoint_token, i32 1, i32 0)
ret ptr addrspace(1) %reloc
; CHECK-LABEL: test1
; CHECK: statepoint
; CHECK: gc.relocate
; CHECK: gc.relocate
; CHECK: gc.relocate
; CHECK: ret i64 addrspace(1)* %reloc
; CHECK: ret ptr addrspace(1) %reloc
}

; This test catches two cases where the verifier was too strict:
; 1) A base doesn't need to be relocated if it's never used again
; 2) A value can be replaced by one which is known equal. This
; means a potentially derived pointer can be known base and that
; we can't check that derived pointer are never bases.
define void @test2(i8 addrspace(1)* %arg, i64 addrspace(1)* %arg2) gc "statepoint-example" {
define void @test2(ptr addrspace(1) %arg, ptr addrspace(1) %arg2) gc "statepoint-example" {
entry:
%cast = bitcast i8 addrspace(1)* %arg to i64 addrspace(1)*
%c = icmp eq i64 addrspace(1)* %cast, %arg2
%c = icmp eq ptr addrspace(1) %arg, %arg2
br i1 %c, label %equal, label %notequal

notequal:
ret void

equal:
%safepoint_token = call token (i64, i32, void ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidf(i64 0, i32 0, void ()* elementtype(void ()) undef, i32 0, i32 0, i32 0, i32 0) ["gc-live" (i8 addrspace(1)* %arg, i64 addrspace(1)* %cast, i8 addrspace(1)* %arg, i8 addrspace(1)* %arg), "deopt" (i32 0, i32 0, i32 0, i32 10, i32 0)]
%reloc = call i64 addrspace(1)* @llvm.experimental.gc.relocate.p1i64(token %safepoint_token, i32 0, i32 0)
call void undef(i64 addrspace(1)* %reloc)
%safepoint_token = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 0, i32 0, ptr elementtype(void ()) undef, i32 0, i32 0, i32 0, i32 0) ["gc-live" (ptr addrspace(1) %arg, ptr addrspace(1) %arg, ptr addrspace(1) %arg, ptr addrspace(1) %arg), "deopt" (i32 0, i32 0, i32 0, i32 10, i32 0)]
%reloc = call ptr addrspace(1) @llvm.experimental.gc.relocate.p1(token %safepoint_token, i32 0, i32 0)
call void undef(ptr addrspace(1) %reloc)
ret void
; CHECK-LABEL: test2
; CHECK-LABEL: equal
Expand All @@ -53,43 +49,43 @@ equal:
}

; Basic test for invoke statepoints
define i8 addrspace(1)* @test3(i8 addrspace(1)* %obj, i8 addrspace(1)* %obj1) gc "statepoint-example" personality i32 ()* @"personality_function" {
define ptr addrspace(1) @test3(ptr addrspace(1) %obj, ptr addrspace(1) %obj1) gc "statepoint-example" personality ptr @"personality_function" {
; CHECK-LABEL: test3
entry:
; CHECK-LABEL: entry
; CHECK: statepoint
%0 = invoke token (i64, i32, void ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidf(i64 0, i32 0, void ()* elementtype(void ()) undef, i32 0, i32 0, i32 0, i32 0) ["gc-live" (i8 addrspace(1)* %obj, i8 addrspace(1)* %obj1), "deopt" (i32 0, i32 -1, i32 0, i32 0, i32 0)]
%0 = invoke token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 0, i32 0, ptr elementtype(void ()) undef, i32 0, i32 0, i32 0, i32 0) ["gc-live" (ptr addrspace(1) %obj, ptr addrspace(1) %obj1), "deopt" (i32 0, i32 -1, i32 0, i32 0, i32 0)]
to label %normal_dest unwind label %exceptional_return

normal_dest:
; CHECK-LABEL: normal_dest:
; CHECK: gc.relocate
; CHECK: gc.relocate
; CHECK: ret
%obj.relocated = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %0, i32 0, i32 0)
%obj1.relocated = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %0, i32 1, i32 1)
ret i8 addrspace(1)* %obj.relocated
%obj.relocated = call coldcc ptr addrspace(1) @llvm.experimental.gc.relocate.p1(token %0, i32 0, i32 0)
%obj1.relocated = call coldcc ptr addrspace(1) @llvm.experimental.gc.relocate.p1(token %0, i32 1, i32 1)
ret ptr addrspace(1) %obj.relocated

exceptional_return:
; CHECK-LABEL: exceptional_return
; CHECK: gc.relocate
; CHECK: gc.relocate
%landing_pad = landingpad token
cleanup
%obj.relocated1 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %landing_pad, i32 0, i32 0)
%obj1.relocated1 = call coldcc i8 addrspace(1)* @llvm.experimental.gc.relocate.p1i8(token %landing_pad, i32 1, i32 1)
ret i8 addrspace(1)* %obj1.relocated1
%obj.relocated1 = call coldcc ptr addrspace(1) @llvm.experimental.gc.relocate.p1(token %landing_pad, i32 0, i32 0)
%obj1.relocated1 = call coldcc ptr addrspace(1) @llvm.experimental.gc.relocate.p1(token %landing_pad, i32 1, i32 1)
ret ptr addrspace(1) %obj1.relocated1
}

; Test for statepoint with sret attribute.
; This should be allowed as long as the wrapped function is not vararg.
%struct = type { i64, i64, i64 }

declare void @fn_sret(%struct* sret(%struct))
declare void @fn_sret(ptr sret(%struct))

define void @test_sret() gc "statepoint-example" {
%x = alloca %struct
%statepoint_token = call token (i64, i32, void (%struct*)*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidp0s_structsf(i64 0, i32 0, void (%struct*)* elementtype(void (%struct*)) @fn_sret, i32 1, i32 0, %struct* sret(%struct) %x, i32 0, i32 0)
%statepoint_token = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 0, i32 0, ptr elementtype(void (ptr)) @fn_sret, i32 1, i32 0, ptr sret(%struct) %x, i32 0, i32 0)
ret void
; CHECK-LABEL: test_sret
; CHECK: alloca
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Verifier/swiftasync.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: not llvm-as %s -o /dev/null 2>&1 | FileCheck %s

declare void @a(i32* swiftasync %a, i32* swiftasync %b)
declare void @a(ptr swiftasync %a, ptr swiftasync %b)
; CHECK: Cannot have multiple 'swiftasync' parameters!
2 changes: 1 addition & 1 deletion llvm/test/Verifier/swifterror2.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: not llvm-as %s -o /dev/null 2>&1 | FileCheck %s

; CHECK: this attribute does not apply to return values
declare swifterror void @c(i32** swifterror %a)
declare swifterror void @c(ptr swifterror %a)
2 changes: 1 addition & 1 deletion llvm/test/Verifier/swifterror3.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: not llvm-as %s -o /dev/null 2>&1 | FileCheck %s

; CHECK: expected type
declare void @c(swifterror i32* %a)
declare void @c(swifterror ptr %a)
2 changes: 1 addition & 1 deletion llvm/test/Verifier/swiftself.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: not llvm-as %s -o /dev/null 2>&1 | FileCheck %s

declare void @a(i32* swiftself %a, i32* swiftself %b)
declare void @a(ptr swiftself %a, ptr swiftself %b)
; CHECK: Cannot have multiple 'swiftself' parameters!
6 changes: 3 additions & 3 deletions llvm/test/Verifier/swifttailcc-musttail-valid.ll
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
; RUN: opt -passes=verify %s

define swifttailcc void @valid_attrs(i64* sret(i64) %ret, i8* byval(i8) %byval, i8* swiftself %self, i8* swiftasync %ctx) {
musttail call swifttailcc void @valid_attrs(i64* sret(i64) %ret, i8* byval(i8) %byval, i8* swiftself %self, i8* swiftasync %ctx)
define swifttailcc void @valid_attrs(ptr sret(i64) %ret, ptr byval(i8) %byval, ptr swiftself %self, ptr swiftasync %ctx) {
musttail call swifttailcc void @valid_attrs(ptr sret(i64) %ret, ptr byval(i8) %byval, ptr swiftself %self, ptr swiftasync %ctx)
ret void
}

define swifttailcc void @mismatch_parms() {
musttail call swifttailcc void @valid_attrs(i64* sret(i64) undef, i8* byval(i8) undef, i8* swiftself undef, i8* swiftasync undef)
musttail call swifttailcc void @valid_attrs(ptr sret(i64) undef, ptr byval(i8) undef, ptr swiftself undef, ptr swiftasync undef)
ret void
}
22 changes: 11 additions & 11 deletions llvm/test/Verifier/swifttailcc-musttail.ll
Original file line number Diff line number Diff line change
Expand Up @@ -2,64 +2,64 @@

declare swifttailcc void @simple()

define swifttailcc void @inreg(i8* inreg) {
define swifttailcc void @inreg(ptr inreg) {
; CHECK: inreg attribute not allowed in swifttailcc musttail caller
musttail call swifttailcc void @simple()
ret void
}

define swifttailcc void @inalloca(i8* inalloca(i8)) {
define swifttailcc void @inalloca(ptr inalloca(i8)) {
; CHECK: inalloca attribute not allowed in swifttailcc musttail caller
musttail call swifttailcc void @simple()
ret void
}

define swifttailcc void @swifterror(i8** swifterror) {
define swifttailcc void @swifterror(ptr swifterror) {
; CHECK: swifterror attribute not allowed in swifttailcc musttail caller
musttail call swifttailcc void @simple()
ret void
}

define swifttailcc void @preallocated(i8* preallocated(i8)) {
define swifttailcc void @preallocated(ptr preallocated(i8)) {
; CHECK: preallocated attribute not allowed in swifttailcc musttail caller
musttail call swifttailcc void @simple()
ret void
}

define swifttailcc void @byref(i8* byref(i8)) {
define swifttailcc void @byref(ptr byref(i8)) {
; CHECK: byref attribute not allowed in swifttailcc musttail caller
musttail call swifttailcc void @simple()
ret void
}

define swifttailcc void @call_inreg() {
; CHECK: inreg attribute not allowed in swifttailcc musttail callee
musttail call swifttailcc void @inreg(i8* inreg undef)
musttail call swifttailcc void @inreg(ptr inreg undef)
ret void
}

define swifttailcc void @call_inalloca() {
; CHECK: inalloca attribute not allowed in swifttailcc musttail callee
musttail call swifttailcc void @inalloca(i8* inalloca(i8) undef)
musttail call swifttailcc void @inalloca(ptr inalloca(i8) undef)
ret void
}

define swifttailcc void @call_swifterror() {
; CHECK: swifterror attribute not allowed in swifttailcc musttail callee
%err = alloca swifterror i8*
musttail call swifttailcc void @swifterror(i8** swifterror %err)
%err = alloca swifterror ptr
musttail call swifttailcc void @swifterror(ptr swifterror %err)
ret void
}

define swifttailcc void @call_preallocated() {
; CHECK: preallocated attribute not allowed in swifttailcc musttail callee
musttail call swifttailcc void @preallocated(i8* preallocated(i8) undef)
musttail call swifttailcc void @preallocated(ptr preallocated(i8) undef)
ret void
}

define swifttailcc void @call_byref() {
; CHECK: byref attribute not allowed in swifttailcc musttail callee
musttail call swifttailcc void @byref(i8* byref(i8) undef)
musttail call swifttailcc void @byref(ptr byref(i8) undef)
ret void
}

Expand Down
22 changes: 11 additions & 11 deletions llvm/test/Verifier/tailcc-musttail.ll
Original file line number Diff line number Diff line change
Expand Up @@ -2,64 +2,64 @@

declare tailcc void @simple()

define tailcc void @inreg(i8* inreg) {
define tailcc void @inreg(ptr inreg) {
; CHECK: inreg attribute not allowed in tailcc musttail caller
musttail call tailcc void @simple()
ret void
}

define tailcc void @inalloca(i8* inalloca(i8)) {
define tailcc void @inalloca(ptr inalloca(i8)) {
; CHECK: inalloca attribute not allowed in tailcc musttail caller
musttail call tailcc void @simple()
ret void
}

define tailcc void @swifterror(i8** swifterror) {
define tailcc void @swifterror(ptr swifterror) {
; CHECK: swifterror attribute not allowed in tailcc musttail caller
musttail call tailcc void @simple()
ret void
}

define tailcc void @preallocated(i8* preallocated(i8)) {
define tailcc void @preallocated(ptr preallocated(i8)) {
; CHECK: preallocated attribute not allowed in tailcc musttail caller
musttail call tailcc void @simple()
ret void
}

define tailcc void @byref(i8* byref(i8)) {
define tailcc void @byref(ptr byref(i8)) {
; CHECK: byref attribute not allowed in tailcc musttail caller
musttail call tailcc void @simple()
ret void
}

define tailcc void @call_inreg() {
; CHECK: inreg attribute not allowed in tailcc musttail callee
musttail call tailcc void @inreg(i8* inreg undef)
musttail call tailcc void @inreg(ptr inreg undef)
ret void
}

define tailcc void @call_inalloca() {
; CHECK: inalloca attribute not allowed in tailcc musttail callee
musttail call tailcc void @inalloca(i8* inalloca(i8) undef)
musttail call tailcc void @inalloca(ptr inalloca(i8) undef)
ret void
}

define tailcc void @call_swifterror() {
; CHECK: swifterror attribute not allowed in tailcc musttail callee
%err = alloca swifterror i8*
musttail call tailcc void @swifterror(i8** swifterror %err)
%err = alloca swifterror ptr
musttail call tailcc void @swifterror(ptr swifterror %err)
ret void
}

define tailcc void @call_preallocated() {
; CHECK: preallocated attribute not allowed in tailcc musttail callee
musttail call tailcc void @preallocated(i8* preallocated(i8) undef)
musttail call tailcc void @preallocated(ptr preallocated(i8) undef)
ret void
}

define tailcc void @call_byref() {
; CHECK: byref attribute not allowed in tailcc musttail callee
musttail call tailcc void @byref(i8* byref(i8) undef)
musttail call tailcc void @byref(ptr byref(i8) undef)
ret void
}

Expand Down
16 changes: 8 additions & 8 deletions llvm/test/Verifier/tbaa-allowed.ll
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
; This file contains TBAA metadata that is okay and should pass the verifier.

declare void @callee()
declare void @llvm.va_start(i8*) nounwind
declare void @llvm.va_start(ptr) nounwind

define void @f_0(i8* %ptr, ...) {
define void @f_0(ptr %ptr, ...) {
%args = alloca i8, align 8
call void @llvm.va_start(i8* %args)
call void @llvm.va_start(ptr %args)

%old = atomicrmw add i8* %ptr, i8 0 seq_cst, !tbaa !{!1, !1, i64 0}
%pair = cmpxchg i8* %ptr, i8 0, i8 1 acquire acquire, !tbaa !{!1, !1, i64 0}
%ld = load i8, i8* %ptr, !tbaa !{!1, !1, i64 0}
store i8 1, i8* %ptr, !tbaa !{!1, !1, i64 0}
%old = atomicrmw add ptr %ptr, i8 0 seq_cst, !tbaa !{!1, !1, i64 0}
%pair = cmpxchg ptr %ptr, i8 0, i8 1 acquire acquire, !tbaa !{!1, !1, i64 0}
%ld = load i8, ptr %ptr, !tbaa !{!1, !1, i64 0}
store i8 1, ptr %ptr, !tbaa !{!1, !1, i64 0}
call void @callee(), !tbaa !{!1, !1, i64 0}
%argval = va_arg i8* %args, i8, !tbaa !{!1, !1, i64 0}
%argval = va_arg ptr %args, i8, !tbaa !{!1, !1, i64 0}
ret void
}

Expand Down
90 changes: 45 additions & 45 deletions llvm/test/Verifier/tbaa.ll
Original file line number Diff line number Diff line change
Expand Up @@ -4,103 +4,103 @@
; STRIP-NOT: tbaa
; STRIP: @f_0
; STRIP: Do no strip this
define void @f_0(i32* %ptr) {
define void @f_0(ptr %ptr) {
; This part checks for the easy syntactic verifier rules.

; CHECK: Struct tag metadata must have either 3 or 4 operands
; CHECK-NEXT: store i32 0, i32* %ptr, align 4, !tbaa !{{[0-9]+}}
; CHECK-NEXT: store i32 0, ptr %ptr, align 4, !tbaa !{{[0-9]+}}

; CHECK: Immutability tag on struct tag metadata must be a constant
; CHECK-NEXT: store i32 1, i32* %ptr, align 4, !tbaa !{{[0-9]+}}
; CHECK-NEXT: store i32 1, ptr %ptr, align 4, !tbaa !{{[0-9]+}}

; CHECK: Immutability part of the struct tag metadata must be either 0 or 1
; CHECK-NEXT: store i32 2, i32* %ptr, align 4, !tbaa !{{[0-9]+}}
; CHECK-NEXT: store i32 2, ptr %ptr, align 4, !tbaa !{{[0-9]+}}

; CHECK: Offset must be constant integer
; CHECK-NEXT: store i32 3, i32* %ptr, align 4, !tbaa !{{[0-9]+}}
; CHECK-NEXT: store i32 3, ptr %ptr, align 4, !tbaa !{{[0-9]+}}

; CHECK: Malformed struct tag metadata: base and access-type should be non-null and point to Metadata nodes
; CHECK-NEXT: store i32 4, i32* %ptr, align 4, !tbaa !{{[0-9]+}}
; CHECK-NEXT: store i32 4, ptr %ptr, align 4, !tbaa !{{[0-9]+}}

; CHECK: Access type node must be a valid scalar type
; CHECK-NEXT: store i32 5, i32* %ptr, align 4, !tbaa !{{[0-9]+}}
; CHECK-NEXT: store i32 5, ptr %ptr, align 4, !tbaa !{{[0-9]+}}

; CHECK: Access bit-width not the same as description bit-width
; CHECK-NEXT: store i32 6, i32* %ptr, align 4, !tbaa !{{[0-9]+}}
; CHECK-NEXT: store i32 6, ptr %ptr, align 4, !tbaa !{{[0-9]+}}

; CHECK: Access type node must be a valid scalar type
; CHECK-NEXT: store i32 7, i32* %ptr, align 4, !tbaa !{{[0-9]+}}
; CHECK-NEXT: store i32 7, ptr %ptr, align 4, !tbaa !{{[0-9]+}}

; CHECK: Struct tag nodes have a string as their first operand
; CHECK-NEXT: !{{[0-9]+}} = !{!{{[0-9]+}}, !{{[0-9]+}}, i64 0}

; CHECK: Access type node must be a valid scalar type
; CHECK-NEXT: store i32 9, i32* %ptr, align 4, !tbaa !{{[0-9]+}}

store i32 0, i32* %ptr, !tbaa !{!3, !2, i64 40, i64 0, i64 1, i64 2}
store i32 1, i32* %ptr, !tbaa !{!3, !2, i64 40, !"immutable"}
store i32 2, i32* %ptr, !tbaa !{!3, !2, i64 40, i64 4}
store i32 3, i32* %ptr, !tbaa !{!3, !2, !"40", i64 0}
store i32 4, i32* %ptr, !tbaa !{!3, null, !"40", i64 0}
store i32 5, i32* %ptr, !tbaa !{!3, !3, !"40", i64 0}
store i32 6, i32* %ptr, !tbaa !{!3, !2, i32 40, i64 0}
store i32 7, i32* %ptr, !tbaa !{!3, !12, i32 40, i64 0}, !metadata !42
store i32 8, i32* %ptr, !tbaa !{!13, !1, i64 0}
store i32 9, i32* %ptr, !tbaa !{!14, !14, i64 0}
; CHECK-NEXT: store i32 9, ptr %ptr, align 4, !tbaa !{{[0-9]+}}

store i32 0, ptr %ptr, !tbaa !{!3, !2, i64 40, i64 0, i64 1, i64 2}
store i32 1, ptr %ptr, !tbaa !{!3, !2, i64 40, !"immutable"}
store i32 2, ptr %ptr, !tbaa !{!3, !2, i64 40, i64 4}
store i32 3, ptr %ptr, !tbaa !{!3, !2, !"40", i64 0}
store i32 4, ptr %ptr, !tbaa !{!3, null, !"40", i64 0}
store i32 5, ptr %ptr, !tbaa !{!3, !3, !"40", i64 0}
store i32 6, ptr %ptr, !tbaa !{!3, !2, i32 40, i64 0}
store i32 7, ptr %ptr, !tbaa !{!3, !12, i32 40, i64 0}, !metadata !42
store i32 8, ptr %ptr, !tbaa !{!13, !1, i64 0}
store i32 9, ptr %ptr, !tbaa !{!14, !14, i64 0}
ret void
}
!42 = !{!"Do no strip this!"}

define void @f_1(i32* %ptr) {
define void @f_1(ptr %ptr) {
; This part checks for more semantic verifier rules.

; CHECK: Cycle detected in struct path
; CHECK-NEXT: store i32 0, i32* %ptr, align 4, !tbaa !{{[0-9]+}}
; CHECK-NEXT: store i32 0, ptr %ptr, align 4, !tbaa !{{[0-9]+}}

; CHECK: Offset not zero at the point of scalar access
; CHECK-NEXT: store i32 1, i32* %ptr, align 4, !tbaa !{{[0-9]+}}
; CHECK-NEXT: store i32 1, ptr %ptr, align 4, !tbaa !{{[0-9]+}}

; CHECK: Offset not zero at the point of scalar access
; CHECK-NEXT: store i32 2, i32* %ptr, align 4, !tbaa !{{[0-9]+}}
; CHECK-NEXT: store i32 2, ptr %ptr, align 4, !tbaa !{{[0-9]+}}

; CHECK: Could not find TBAA parent in struct type node
; CHECK-NEXT: store i32 3, i32* %ptr, align 4, !tbaa !{{[0-9]+}}
; CHECK-NEXT: store i32 3, ptr %ptr, align 4, !tbaa !{{[0-9]+}}

; CHECK: Did not see access type in access path!
; CHECK-NEXT: store i32 3, i32* %ptr, align 4, !tbaa !{{[0-9]+}}
; CHECK-NEXT: store i32 3, ptr %ptr, align 4, !tbaa !{{[0-9]+}}

; CHECK: Access type node must be a valid scalar type
; CHECK-NEXT: store i32 4, i32* %ptr, align 4, !tbaa !{{[0-9]+}}
; CHECK-NEXT: store i32 4, ptr %ptr, align 4, !tbaa !{{[0-9]+}}

; CHECK: Access type node must be a valid scalar type
; CHECK-NEXT: store i32 5, i32* %ptr, align 4, !tbaa !{{[0-9]+}}
; CHECK-NEXT: store i32 5, ptr %ptr, align 4, !tbaa !{{[0-9]+}}

; CHECK: Access type node must be a valid scalar type
; CHECK-NEXT: store i32 6, i32* %ptr, align 4, !tbaa !{{[0-9]+}}
; CHECK-NEXT: store i32 6, ptr %ptr, align 4, !tbaa !{{[0-9]+}}

; CHECK: Struct tag nodes must have an odd number of operands!
; CHECK-NEXT:!{{[0-9]+}} = !{!"bad-struct-type-0", !{{[0-9]+}}, i64 40, !{{[0-9]+}}}

; CHECK: Incorrect field entry in struct type node!
; CHECK-NEXT: store i32 8, i32* %ptr, align 4, !tbaa !{{[0-9]+}}
; CHECK-NEXT: store i32 8, ptr %ptr, align 4, !tbaa !{{[0-9]+}}

; CHECK: Bitwidth between the offsets and struct type entries must match
; CHECK-NEXT: store i32 9, i32* %ptr, align 4, !tbaa !{{[0-9]+}}
; CHECK-NEXT: store i32 9, ptr %ptr, align 4, !tbaa !{{[0-9]+}}

; CHECK: Offsets must be increasing!
; CHECK-NEXT: store i32 10, i32* %ptr, align 4, !tbaa !{{[0-9]+}}

store i32 0, i32* %ptr, !tbaa !{!4, !2, i64 40}
store i32 1, i32* %ptr, !tbaa !{!3, !2, i64 45}
store i32 2, i32* %ptr, !tbaa !{!3, !2, i64 45}
store i32 3, i32* %ptr, !tbaa !{!3, !2, i64 10}
store i32 4, i32* %ptr, !tbaa !{!5, !5, i64 0}
store i32 5, i32* %ptr, !tbaa !{!6, !6, i64 0}
store i32 6, i32* %ptr, !tbaa !{!7, !7, i64 0}
store i32 7, i32* %ptr, !tbaa !{!8, !1, i64 40}
store i32 8, i32* %ptr, !tbaa !{!9, !1, i64 40}
store i32 9, i32* %ptr, !tbaa !{!10, !1, i64 40}
store i32 10, i32* %ptr, !tbaa !{!11, !1, i64 40}
; CHECK-NEXT: store i32 10, ptr %ptr, align 4, !tbaa !{{[0-9]+}}

store i32 0, ptr %ptr, !tbaa !{!4, !2, i64 40}
store i32 1, ptr %ptr, !tbaa !{!3, !2, i64 45}
store i32 2, ptr %ptr, !tbaa !{!3, !2, i64 45}
store i32 3, ptr %ptr, !tbaa !{!3, !2, i64 10}
store i32 4, ptr %ptr, !tbaa !{!5, !5, i64 0}
store i32 5, ptr %ptr, !tbaa !{!6, !6, i64 0}
store i32 6, ptr %ptr, !tbaa !{!7, !7, i64 0}
store i32 7, ptr %ptr, !tbaa !{!8, !1, i64 40}
store i32 8, ptr %ptr, !tbaa !{!9, !1, i64 40}
store i32 9, ptr %ptr, !tbaa !{!10, !1, i64 40}
store i32 10, ptr %ptr, !tbaa !{!11, !1, i64 40}
ret void
}

Expand Down
6 changes: 3 additions & 3 deletions llvm/test/Verifier/unsized-types-load.ll
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

%X = type opaque

define void @f_0(%X* %ptr) {
%t = load %X, %X* %ptr
define void @f_0(ptr %ptr) {
%t = load %X, ptr %ptr
ret void
; CHECK: loading unsized types is not allowed
; CHECK-NEXT: %t = load %X, %X* %ptr
; CHECK-NEXT: %t = load %X, ptr %ptr
}
6 changes: 3 additions & 3 deletions llvm/test/Verifier/unsized-types-store.ll
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

%X = type opaque

define void @f_1(%X %val, %X* %ptr) {
store %X %val, %X* %ptr
define void @f_1(%X %val, ptr %ptr) {
store %X %val, ptr %ptr
ret void
; CHECK: storing unsized types is not allowed
; CHECK-NEXT: store %X %val, %X* %ptr
; CHECK-NEXT: store %X %val, ptr %ptr
}
10 changes: 5 additions & 5 deletions llvm/test/Verifier/vp-intrinsics.ll
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ define void @test_vp_splice1(<vscale x 8 x i32> %i0, <vscale x 8 x i32> %i1, <vs
ret void
}

define void @test_vp_conversions(<8 x i32*> %p0, <8 x i32> %i0, <8 x i64> %i1, <8 x float> %f0, <8 x double> %f1, <8 x i1> %mask, i32 %evl) {
define void @test_vp_conversions(<8 x ptr> %p0, <8 x i32> %i0, <8 x i64> %i1, <8 x float> %f0, <8 x double> %f1, <8 x i1> %mask, i32 %evl) {
%r0 = call <8 x i32> @llvm.vp.fptoui.v8i32.v8f32(<8 x float> %f0, <8 x i1> %mask, i32 %evl)
%r1 = call <8 x i32> @llvm.vp.fptosi.v8i32.v8f32(<8 x float> %f0, <8 x i1> %mask, i32 %evl)
%r2 = call <8 x float> @llvm.vp.uitofp.v8f32.v8i32(<8 x i32> %i0, <8 x i1> %mask, i32 %evl)
Expand All @@ -67,8 +67,8 @@ define void @test_vp_conversions(<8 x i32*> %p0, <8 x i32> %i0, <8 x i64> %i1, <
%r6 = call <8 x i32> @llvm.vp.trunc.v8i32.v8i64(<8 x i64> %i1, <8 x i1> %mask, i32 %evl)
%r7 = call <8 x i64> @llvm.vp.zext.v8i64.v8i32(<8 x i32> %i0, <8 x i1> %mask, i32 %evl)
%r8 = call <8 x i64> @llvm.vp.sext.v8i64.v8i32(<8 x i32> %i0, <8 x i1> %mask, i32 %evl)
%r9 = call <8 x i32> @llvm.vp.ptrtoint.v8i32.v8p0i32(<8 x i32*> %p0, <8 x i1> %mask, i32 %evl)
%r10 = call <8 x i32*> @llvm.vp.inttoptr.v8p0i32.v8i32(<8 x i32> %i0, <8 x i1> %mask, i32 %evl)
%r9 = call <8 x i32> @llvm.vp.ptrtoint.v8i32.v8p0(<8 x ptr> %p0, <8 x i1> %mask, i32 %evl)
%r10 = call <8 x ptr> @llvm.vp.inttoptr.v8p0.v8i32(<8 x i32> %i0, <8 x i1> %mask, i32 %evl)
ret void
}

Expand Down Expand Up @@ -123,8 +123,8 @@ declare <8 x double> @llvm.vp.fpext.v8f64.v8f32(<8 x float>, <8 x i1>, i32)
declare <8 x i32> @llvm.vp.trunc.v8i32.v8i64(<8 x i64>, <8 x i1>, i32)
declare <8 x i64> @llvm.vp.zext.v8i64.v8i32(<8 x i32>, <8 x i1>, i32)
declare <8 x i64> @llvm.vp.sext.v8i64.v8i32(<8 x i32>, <8 x i1>, i32)
declare <8 x i32> @llvm.vp.ptrtoint.v8i32.v8p0i32(<8 x i32*>, <8 x i1>, i32)
declare <8 x i32*> @llvm.vp.inttoptr.v8p0i32.v8i32(<8 x i32>, <8 x i1>, i32)
declare <8 x i32> @llvm.vp.ptrtoint.v8i32.v8p0(<8 x ptr>, <8 x i1>, i32)
declare <8 x ptr> @llvm.vp.inttoptr.v8p0.v8i32(<8 x i32>, <8 x i1>, i32)
; compares
declare <8 x i1> @llvm.vp.fcmp.v8f32(<8 x float>, <8 x float>, metadata, <8 x i1>, i32)
declare <8 x i1> @llvm.vp.icmp.v8i32(<8 x i32>, <8 x i32>, metadata, <8 x i1>, i32)
Expand Down
4 changes: 2 additions & 2 deletions llvm/test/Verifier/vscale_range.ll
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
; RUN: not llvm-as %s -o /dev/null 2>&1 | FileCheck %s

; CHECK: 'vscale_range' minimum must be greater than 0
declare i8* @a(i32*) vscale_range(0, 1)
declare ptr @a(ptr) vscale_range(0, 1)

; CHECK: 'vscale_range' minimum cannot be greater than maximum
declare i8* @b(i32*) vscale_range(8, 1)
declare ptr @b(ptr) vscale_range(8, 1)
2 changes: 1 addition & 1 deletion llvm/test/Verifier/weak-dllimport.ll
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ target triple = "x86_64-pc-windows-msvc19.11.0"
@"?var_hook@@3HA" = extern_weak dllimport global i32, align 4

; Function Attrs: noinline optnone uwtable
define dso_local zeroext i1 @"?foo@@YA_NPEAHH@Z"(i32* %0, i32 %1) #0 {
define dso_local zeroext i1 @"?foo@@YA_NPEAHH@Z"(ptr %0, i32 %1) #0 {
ret i1 0
}

Expand Down
4 changes: 2 additions & 2 deletions llvm/test/Verifier/x86_amx9.ll
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

define dso_local void @test_tile_init(i16 signext %row, i16 signext %col) {
entry:
tail call void @llvm.x86.tilestored64.internal(i16 %row, i16 %col, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @buf, i64 0, i64 0), i64 64, x86_amx bitcast (<256 x i32> <i32 1, i32 2, i32 3, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0> to x86_amx))
tail call void @llvm.x86.tilestored64.internal(i16 %row, i16 %col, ptr @buf, i64 64, x86_amx bitcast (<256 x i32> <i32 1, i32 2, i32 3, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0> to x86_amx))
ret void
}
; CHECK: const x86_amx is not allowed in argument!

declare void @llvm.x86.tilestored64.internal(i16, i16, i8*, i64, x86_amx)
declare void @llvm.x86.tilestored64.internal(i16, i16, ptr, i64, x86_amx)
12 changes: 6 additions & 6 deletions llvm/test/Verifier/x86_intr.ll
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
; RUN: not llvm-as < %s 2>&1 | FileCheck %s

; CHECK: Calling convention parameter requires byval
; CHECK-NEXT: void (i32)* @non_ptr_arg0
; CHECK-NEXT: ptr @non_ptr_arg0
define x86_intrcc void @non_ptr_arg0(i32) {
ret void
}

; CHECK: Calling convention parameter requires byval
; CHECK-NEXT: void (i32*)* @non_byval_ptr_arg0
define x86_intrcc void @non_byval_ptr_arg0(i32*) {
; CHECK-NEXT: ptr @non_byval_ptr_arg0
define x86_intrcc void @non_byval_ptr_arg0(ptr) {
ret void
}

; CHECK: Calling convention parameter requires byval
; CHECK-NEXT: void (i32)* @non_ptr_arg0_decl
; CHECK-NEXT: ptr @non_ptr_arg0_decl
declare x86_intrcc void @non_ptr_arg0_decl(i32)

; CHECK: Calling convention parameter requires byval
; CHECK-NEXT: void (i32*)* @non_byval_ptr_arg0_decl
declare x86_intrcc void @non_byval_ptr_arg0_decl(i32*)
; CHECK-NEXT: ptr @non_byval_ptr_arg0_decl
declare x86_intrcc void @non_byval_ptr_arg0_decl(ptr)