brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.2 KiB · c5ce47c Raw
54 lines · c
1// REQUIRES: systemz-registered-target2// RUN: %clang_cc1 -target-cpu z16 -triple s390x-ibm-linux -flax-vector-conversions=none \3// RUN: -Wall -Wno-unused -Werror -emit-llvm %s -o - | FileCheck %s4 5typedef __attribute__((vector_size(16))) signed char vec_schar;6typedef __attribute__((vector_size(16))) signed short vec_sshort;7typedef __attribute__((vector_size(16))) signed int vec_sint;8typedef __attribute__((vector_size(16))) signed long long vec_slong;9typedef __attribute__((vector_size(16))) unsigned char vec_uchar;10typedef __attribute__((vector_size(16))) unsigned short vec_ushort;11typedef __attribute__((vector_size(16))) unsigned int vec_uint;12typedef __attribute__((vector_size(16))) unsigned long long vec_ulong;13typedef __attribute__((vector_size(16))) double vec_double;14typedef __attribute__((vector_size(16))) float vec_float;15 16volatile vec_schar vsc;17volatile vec_sshort vss;18volatile vec_sint vsi;19volatile vec_slong vsl;20volatile vec_uchar vuc;21volatile vec_ushort vus;22volatile vec_uint vui;23volatile vec_ulong vul;24volatile vec_double vd;25volatile vec_float vf;26 27void 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