69 lines · plain
1; RUN: not llvm-as < %s -disable-output 2>&1 | FileCheck %s2 3declare <4 x i32> @llvm.vp.fptosi.v4i32.v8f32(<8 x float>, <4 x i1>, i32)4declare <4 x i1> @llvm.vp.fcmp.v4f32(<4 x float>, <4 x float>, metadata, <4 x i1>, i32)5declare <4 x i1> @llvm.vp.icmp.v4i32(<4 x i32>, <4 x i32>, metadata, <4 x i1>, i32)6 7; CHECK: VP cast intrinsic first argument and result vector lengths must be equal8; CHECK-NEXT: %r0 = call <4 x i32>9 10define void @test_vp_fptosi(<8 x float> %src, <4 x i1> %m, i32 %n) {11 %r0 = call <4 x i32> @llvm.vp.fptosi.v4i32.v8f32(<8 x float> %src, <4 x i1> %m, i32 %n)12 ret void13}14 15; CHECK: invalid predicate for VP FP comparison intrinsic16; CHECK-NEXT: %r0 = call <4 x i1> @llvm.vp.fcmp.v4f3217; CHECK: invalid predicate for VP FP comparison intrinsic18; CHECK-NEXT: %r1 = call <4 x i1> @llvm.vp.fcmp.v4f3219 20define void @test_vp_fcmp(<4 x float> %a, <4 x float> %b, <4 x i1> %m, i32 %n) {21 %r0 = call <4 x i1> @llvm.vp.fcmp.v4f32(<4 x float> %a, <4 x float> %b, metadata !"bad", <4 x i1> %m, i32 %n)22 %r1 = call <4 x i1> @llvm.vp.fcmp.v4f32(<4 x float> %a, <4 x float> %b, metadata !"eq", <4 x i1> %m, i32 %n)23 ret void24}25 26; CHECK: invalid predicate for VP integer comparison intrinsic27; CHECK-NEXT: %r0 = call <4 x i1> @llvm.vp.icmp.v4i3228; CHECK: invalid predicate for VP integer comparison intrinsic29; CHECK-NEXT: %r1 = call <4 x i1> @llvm.vp.icmp.v4i3230 31define void @test_vp_icmp(<4 x i32> %a, <4 x i32> %b, <4 x i1> %m, i32 %n) {32 %r0 = call <4 x i1> @llvm.vp.icmp.v4i32(<4 x i32> %a, <4 x i32> %b, metadata !"bad", <4 x i1> %m, i32 %n)33 %r1 = call <4 x i1> @llvm.vp.icmp.v4i32(<4 x i32> %a, <4 x i32> %b, metadata !"oeq", <4 x i1> %m, i32 %n)34 ret void35}36 37; CHECK: The splice index exceeds the range [-VL, VL-1] where VL is the known minimum number of elements in the vector38define <2 x double> @splice_v2f64_idx_neg3(<2 x double> %a, <2 x double> %b, i32 %evl1, i32 %evl2) #0 {39 %res = call <2 x double> @llvm.experimental.vp.splice.v2f64(<2 x double> %a, <2 x double> %b, i32 -3, <2 x i1> splat (i1 1), i32 %evl1, i32 %evl2)40 ret <2 x double> %res41}42 43; CHECK: The splice index exceeds the range [-VL, VL-1] where VL is the known minimum number of elements in the vector44define <vscale x 2 x double> @splice_nxv2f64_idx_neg3_vscale_min1(<vscale x 2 x double> %a, <vscale x 2 x double> %b, i32 %evl1, i32 %evl2) #0 {45 %res = call <vscale x 2 x double> @llvm.experimental.vp.splice.nxv2f64(<vscale x 2 x double> %a, <vscale x 2 x double> %b, i32 -3, <vscale x 2 x i1> splat (i1 1), i32 %evl1, i32 %evl2)46 ret <vscale x 2 x double> %res47}48 49; CHECK: The splice index exceeds the range [-VL, VL-1] where VL is the known minimum number of elements in the vector50define <vscale x 2 x double> @splice_nxv2f64_idx_neg5_vscale_min2(<vscale x 2 x double> %a, <vscale x 2 x double> %b, i32 %evl1, i32 %evl2) #1 {51 %res = call <vscale x 2 x double> @llvm.experimental.vp.splice.nxv2f64(<vscale x 2 x double> %a, <vscale x 2 x double> %b, i32 -5, <vscale x 2 x i1> splat (i1 1), i32 %evl1, i32 %evl2)52 ret <vscale x 2 x double> %res53}54 55; CHECK: The splice index exceeds the range [-VL, VL-1] where VL is the known minimum number of elements in the vector56define <2 x double> @splice_v2f64_idx2(<2 x double> %a, <2 x double> %b, i32 %evl1, i32 %evl2) #0 {57 %res = call <2 x double> @llvm.experimental.vp.splice.v2f64(<2 x double> %a, <2 x double> %b, i32 2, <2 x i1> splat (i1 1), i32 %evl1, i32 %evl2)58 ret <2 x double> %res59}60 61; CHECK: The splice index exceeds the range [-VL, VL-1] where VL is the known minimum number of elements in the vector62define <2 x double> @splice_v2f64_idx3(<2 x double> %a, <2 x double> %b, i32 %evl1, i32 %evl2) #1 {63 %res = call <2 x double> @llvm.experimental.vp.splice.v2f64(<2 x double> %a, <2 x double> %b, i32 4, <2 x i1> splat (i1 1), i32 %evl1, i32 %evl2)64 ret <2 x double> %res65}66 67attributes #0 = { vscale_range(1,16) }68attributes #1 = { vscale_range(2,16) }69