1; Test vector count trailing zeros 2; 3; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | FileCheck %s 4 5declare <16 x i8> @llvm.cttz.v16i8(<16 x i8> %src, i1 %is_zero_undef) 6declare <8 x i16> @llvm.cttz.v8i16(<8 x i16> %src, i1 %is_zero_undef) 7declare <4 x i32> @llvm.cttz.v4i32(<4 x i32> %src, i1 %is_zero_undef) 8declare <2 x i64> @llvm.cttz.v2i64(<2 x i64> %src, i1 %is_zero_undef) 9 10define <16 x i8> @f1(<16 x i8> %a) { 11; CHECK-LABEL: f1: 12; CHECK: vctzb %v24, %v24 13; CHECK: br %r14 14 15 %res = call <16 x i8> @llvm.cttz.v16i8(<16 x i8> %a, i1 false) 16 ret <16 x i8> %res 17} 18 19define <16 x i8> @f2(<16 x i8> %a) { 20; CHECK-LABEL: f2: 21; CHECK: vctzb %v24, %v24 22; CHECK: br %r14 23 24 %res = call <16 x i8> @llvm.cttz.v16i8(<16 x i8> %a, i1 true) 25 ret <16 x i8> %res 26} 27 28define <8 x i16> @f3(<8 x i16> %a) { 29; CHECK-LABEL: f3: 30; CHECK: vctzh %v24, %v24 31; CHECK: br %r14 32 33 %res = call <8 x i16> @llvm.cttz.v8i16(<8 x i16> %a, i1 false) 34 ret <8 x i16> %res 35} 36 37define <8 x i16> @f4(<8 x i16> %a) { 38; CHECK-LABEL: f4: 39; CHECK: vctzh %v24, %v24 40; CHECK: br %r14 41 42 %res = call <8 x i16> @llvm.cttz.v8i16(<8 x i16> %a, i1 true) 43 ret <8 x i16> %res 44} 45 46define <4 x i32> @f5(<4 x i32> %a) { 47; CHECK-LABEL: f5: 48; CHECK: vctzf %v24, %v24 49; CHECK: br %r14 50 51 %res = call <4 x i32> @llvm.cttz.v4i32(<4 x i32> %a, i1 false) 52 ret <4 x i32> %res 53} 54 55define <4 x i32> @f6(<4 x i32> %a) { 56; CHECK-LABEL: f6: 57; CHECK: vctzf %v24, %v24 58; CHECK: br %r14 59 60 %res = call <4 x i32> @llvm.cttz.v4i32(<4 x i32> %a, i1 true) 61 ret <4 x i32> %res 62} 63 64define <2 x i64> @f7(<2 x i64> %a) { 65; CHECK-LABEL: f7: 66; CHECK: vctzg %v24, %v24 67; CHECK: br %r14 68 69 %res = call <2 x i64> @llvm.cttz.v2i64(<2 x i64> %a, i1 false) 70 ret <2 x i64> %res 71} 72 73define <2 x i64> @f8(<2 x i64> %a) { 74; CHECK-LABEL: f8: 75; CHECK: vctzg %v24, %v24 76; CHECK: br %r14 77 78 %res = call <2 x i64> @llvm.cttz.v2i64(<2 x i64> %a, i1 true) 79 ret <2 x i64> %res 80} 81 82