1 ; RUN: not llvm-as < %s 2>&1 | FileCheck %s
3 target datalayout = "p1:64:64:64:32"
5 declare float @llvm.ptrmask.f32.i64(float, i64)
6 declare ptr @llvm.ptrmask.p0.v4i64(ptr, <4 x i64>)
7 declare <2 x ptr> @llvm.ptrmask.v2p0.i64(<2 x ptr>, i64)
8 declare <2 x ptr> @llvm.ptrmask.v2p0.v4i64(<2 x ptr>, <4 x i64>)
9 declare ptr @llvm.ptrmask.p0.i32(ptr, i32)
10 declare ptr addrspace(1) @llvm.ptrmask.p1.i64(ptr addrspace(1), i64)
12 ; CHECK: llvm.ptrmask intrinsic first argument must be pointer or vector of pointers
13 ; CHECK-NEXT: %1 = call float @llvm.ptrmask.f32.i64(float 0.000000e+00, i64 0)
14 define void @not_ptr() {
15 call float @llvm.ptrmask.f32.i64(float 0.0, i64 0)
19 ; CHECK: llvm.ptrmask intrinsic arguments must be both scalars or both vectors
20 ; CHECK: %1 = call ptr @llvm.ptrmask.p0.v4i64(ptr null, <4 x i64> zeroinitializer)
21 define void @scalar_vector_mismatch_1() {
22 call ptr @llvm.ptrmask.p0.v4i64(ptr null, <4 x i64> zeroinitializer)
26 ; CHECK: llvm.ptrmask intrinsic arguments must be both scalars or both vectors
27 ; CHECK: %1 = call <2 x ptr> @llvm.ptrmask.v2p0.i64(<2 x ptr> zeroinitializer, i64 0)
28 define void @scalar_vector_mismatch_2() {
29 call <2 x ptr> @llvm.ptrmask.v2p0.i64(<2 x ptr> zeroinitializer, i64 0)
33 ; CHECK: llvm.ptrmask intrinsic arguments must have the same number of elements
34 ; CHECK: %1 = call <2 x ptr> @llvm.ptrmask.v2p0.v4i64(<2 x ptr> zeroinitializer, <4 x i64> zeroinitializer)
35 define void @vector_size_mismatch() {
36 call <2 x ptr> @llvm.ptrmask.v2p0.v4i64(<2 x ptr> zeroinitializer, <4 x i64> zeroinitializer)
40 ; CHECK: llvm.ptrmask intrinsic second argument bitwidth must match pointer index type size of first argument
41 ; CHECK: %1 = call ptr @llvm.ptrmask.p0.i32(ptr null, i32 0)
42 define void @wrong_size_1() {
43 call ptr @llvm.ptrmask.p0.i32(ptr null, i32 0)
47 ; CHECK: llvm.ptrmask intrinsic second argument bitwidth must match pointer index type size of first argument
48 ; CHECK: %1 = call ptr addrspace(1) @llvm.ptrmask.p1.i64(ptr addrspace(1) null, i64 0)
49 define void @wrong_size_2() {
50 call ptr addrspace(1) @llvm.ptrmask.p1.i64(ptr addrspace(1) null, i64 0)