1 // REQUIRES: systemz-registered-target 2 // RUN: %clang_cc1 -target-cpu arch14 -triple s390x-ibm-linux -flax-vector-conversions=none \ 3 // RUN: -Wall -Wno-unused -Werror -emit-llvm %s -o - | FileCheck %s 4 5 typedef __attribute__((vector_size(16))) signed char vec_schar; 6 typedef __attribute__((vector_size(16))) signed short vec_sshort; 7 typedef __attribute__((vector_size(16))) signed int vec_sint; 8 typedef __attribute__((vector_size(16))) signed long long vec_slong; 9 typedef __attribute__((vector_size(16))) unsigned char vec_uchar; 10 typedef __attribute__((vector_size(16))) unsigned short vec_ushort; 11 typedef __attribute__((vector_size(16))) unsigned int vec_uint; 12 typedef __attribute__((vector_size(16))) unsigned long long vec_ulong; 13 typedef __attribute__((vector_size(16))) double vec_double; 14 typedef __attribute__((vector_size(16))) float vec_float; 15 16 volatile vec_schar vsc; 17 volatile vec_sshort vss; 18 volatile vec_sint vsi; 19 volatile vec_slong vsl; 20 volatile vec_uchar vuc; 21 volatile vec_ushort vus; 22 volatile vec_uint vui; 23 volatile vec_ulong vul; 24 volatile vec_double vd; 25 volatile vec_float vf; 26 27 void test_nnp_assist(void) { 28 vf = __builtin_s390_vclfnhs(vus, 0); 29 // CHECK: call <4 x float> @llvm.s390.vclfnhs(<8 x i16> %{{.*}}, i32 0) 30 vf = __builtin_s390_vclfnhs(vus, 15); 31 // CHECK: call <4 x float> @llvm.s390.vclfnhs(<8 x i16> %{{.*}}, i32 15) 32 33 vf = __builtin_s390_vclfnls(vus, 0); 34 // CHECK: call <4 x float> @llvm.s390.vclfnls(<8 x i16> %{{.*}}, i32 0) 35 vf = __builtin_s390_vclfnls(vus, 15); 36 // CHECK: call <4 x float> @llvm.s390.vclfnls(<8 x i16> %{{.*}}, i32 15) 37 38 vus = __builtin_s390_vcrnfs(vf, vf, 0); 39 // CHECK: call <8 x i16> @llvm.s390.vcrnfs(<4 x float> %{{.*}}, <4 x float> %{{.*}}, i32 0) 40 vus = __builtin_s390_vcrnfs(vf, vf, 15); 41 // CHECK: call <8 x i16> @llvm.s390.vcrnfs(<4 x float> %{{.*}}, <4 x float> %{{.*}}, i32 15) 42 43 vus = __builtin_s390_vcfn(vus, 0); 44 // CHECK: call <8 x i16> @llvm.s390.vcfn(<8 x i16> %{{.*}} i32 0) 45 vus = __builtin_s390_vcfn(vus, 15); 46 // CHECK: call <8 x i16> @llvm.s390.vcfn(<8 x i16> %{{.*}} i32 15) 47 48 vus = __builtin_s390_vcnf(vus, 0); 49 // CHECK: call <8 x i16> @llvm.s390.vcnf(<8 x i16> %{{.*}} i32 0) 50 vus = __builtin_s390_vcnf(vus, 15); 51 // CHECK: call <8 x i16> @llvm.s390.vcnf(<8 x i16> %{{.*}} i32 15) 52 } 53 54