115 lines · plain
1; RUN: not opt -passes=verify < %s 2>&1 | FileCheck %s2 3; Mask is not a vector4; CHECK: Intrinsic has incorrect argument type!5define <16 x float> @gather2(<16 x ptr> %ptrs, ptr %mask, <16 x float> %passthru) {6 %res = call <16 x float> @llvm.masked.gather.v16f32.v16p0(<16 x ptr> %ptrs, ptr %mask, <16 x float> %passthru)7 ret <16 x float> %res8}9declare <16 x float> @llvm.masked.gather.v16f32.v16p0(<16 x ptr>, ptr, <16 x float>)10 11; Mask length != return length12; CHECK: Intrinsic has incorrect argument type!13define <8 x float> @gather3(<8 x ptr> %ptrs, <16 x i1> %mask, <8 x float> %passthru) {14 %res = call <8 x float> @llvm.masked.gather.v8f32.v8p0(<8 x ptr> %ptrs, <16 x i1> %mask, <8 x float> %passthru)15 ret <8 x float> %res16}17declare <8 x float> @llvm.masked.gather.v8f32.v8p0(<8 x ptr>, <16 x i1>, <8 x float>)18 19; Return type is not a vector20; CHECK: Intrinsic has incorrect return type!21define ptr @gather4(<8 x ptr> %ptrs, <8 x i1> %mask, <8 x float> %passthru) {22 %res = call ptr @llvm.masked.gather.p0.v8p0(<8 x ptr> %ptrs, <8 x i1> %mask, <8 x float> %passthru)23 ret ptr %res24}25declare ptr @llvm.masked.gather.p0.v8p0(<8 x ptr>, <8 x i1>, <8 x float>)26 27; Value type is not a vector28; CHECK: Intrinsic has incorrect argument type!29define <8 x float> @gather5(ptr %ptrs, <8 x i1> %mask, <8 x float> %passthru) {30 %res = call <8 x float> @llvm.masked.gather.v8f32.p0(ptr %ptrs, <8 x i1> %mask, <8 x float> %passthru)31 ret <8 x float> %res32}33declare <8 x float> @llvm.masked.gather.v8f32.p0(ptr, <8 x i1>, <8 x float>)34 35; Value type is not a vector of pointers36; CHECK: Intrinsic has incorrect argument type!37define <8 x float> @gather6(<8 x float> %ptrs, <8 x i1> %mask, <8 x float> %passthru) {38 %res = call <8 x float> @llvm.masked.gather.v8f32.v8f32(<8 x float> %ptrs, <8 x i1> %mask, <8 x float> %passthru)39 ret <8 x float> %res40}41declare <8 x float> @llvm.masked.gather.v8f32.v8f32(<8 x float>, <8 x i1>, <8 x float>)42 43; Value length!= vector of pointers length44; CHECK: Intrinsic has incorrect argument type!45; CHECK-NEXT: ptr @llvm.masked.gather.v8f32.v16p046define <8 x float> @gather8(<16 x ptr> %ptrs, <8 x i1> %mask, <8 x float> %passthru) {47 %res = call <8 x float> @llvm.masked.gather.v8f32.v16p0(<16 x ptr> %ptrs, <8 x i1> %mask, <8 x float> %passthru)48 ret <8 x float> %res49}50declare <8 x float> @llvm.masked.gather.v8f32.v16p0(<16 x ptr>, <8 x i1>, <8 x float>)51 52; Passthru type doesn't match return type53; CHECK: Intrinsic has incorrect argument type!54; CHECK-NEXT: ptr @llvm.masked.gather.v16i32.v16p055define <16 x i32> @gather9(<16 x ptr> %ptrs, <16 x i1> %mask, <8 x i32> %passthru) {56 %res = call <16 x i32> @llvm.masked.gather.v16i32.v16p0(<16 x ptr> %ptrs, <16 x i1> %mask, <8 x i32> %passthru)57 ret <16 x i32> %res58}59declare <16 x i32> @llvm.masked.gather.v16i32.v16p0(<16 x ptr>, <16 x i1>, <8 x i32>)60 61; Mask is not a vector62; CHECK: Intrinsic has incorrect argument type!63; CHECK-NEXT: ptr @llvm.masked.scatter.v16f32.v16p064define void @scatter2(<16 x float> %value, <16 x ptr> %ptrs, ptr %mask) {65 call void @llvm.masked.scatter.v16f32.v16p0(<16 x float> %value, <16 x ptr> %ptrs, ptr %mask)66 ret void67}68declare void @llvm.masked.scatter.v16f32.v16p0(<16 x float>, <16 x ptr>, ptr)69 70; Mask length != value length71; CHECK: Intrinsic has incorrect argument type!72; CHECK-NEXT: ptr @llvm.masked.scatter.v8f32.v8p073define void @scatter3(<8 x float> %value, <8 x ptr> %ptrs, <16 x i1> %mask) {74 call void @llvm.masked.scatter.v8f32.v8p0(<8 x float> %value, <8 x ptr> %ptrs, <16 x i1> %mask)75 ret void76}77declare void @llvm.masked.scatter.v8f32.v8p0(<8 x float>, <8 x ptr>, <16 x i1>)78 79; Value type is not a vector80; CHECK: Intrinsic has incorrect argument type!81; CHECK-NEXT: ptr @llvm.masked.scatter.p0.v8p082define void @scatter4(ptr %value, <8 x ptr> %ptrs, <8 x i1> %mask) {83 call void @llvm.masked.scatter.p0.v8p0(ptr %value, <8 x ptr> %ptrs, <8 x i1> %mask)84 ret void85}86declare void @llvm.masked.scatter.p0.v8p0(ptr, <8 x ptr>, <8 x i1>)87 88; ptrs is not a vector89; CHECK: Intrinsic has incorrect argument type!90; CHECK-NEXT: ptr @llvm.masked.scatter.v8f32.p091define void @scatter5(<8 x float> %value, ptr %ptrs, <8 x i1> %mask) {92 call void @llvm.masked.scatter.v8f32.p0(<8 x float> %value, ptr %ptrs, <8 x i1> %mask)93 ret void94}95declare void @llvm.masked.scatter.v8f32.p0(<8 x float>, ptr, <8 x i1>)96 97; Value type is not a vector of pointers98; CHECK: Intrinsic has incorrect argument type!99; CHECK-NEXT: ptr @llvm.masked.scatter.v8f32.v8f32100define void @scatter6(<8 x float> %value, <8 x float> %ptrs, <8 x i1> %mask) {101 call void @llvm.masked.scatter.v8f32.v8f32(<8 x float> %value, <8 x float> %ptrs, <8 x i1> %mask)102 ret void103}104declare void @llvm.masked.scatter.v8f32.v8f32(<8 x float>, <8 x float>, <8 x i1>)105 106; Value length!= vector of pointers length107; CHECK: Intrinsic has incorrect argument type!108; CHECK-NEXT: ptr @llvm.masked.scatter.v8f32.v16p0109define void @scatter8(<8 x float> %value, <16 x ptr> %ptrs, <8 x i1> %mask) {110 call void @llvm.masked.scatter.v8f32.v16p0(<8 x float> %value, <16 x ptr> %ptrs, <8 x i1> %mask)111 ret void112}113declare void @llvm.masked.scatter.v8f32.v16p0(<8 x float>, <16 x ptr>, <8 x i1>)114 115