brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.3 KiB · adc5592 Raw
64 lines · c
1// REQUIRES: systemz-registered-target2// RUN: %clang_cc1 -target-cpu z16 -triple s390x-linux-gnu \3// RUN: -O2 -fzvector -flax-vector-conversions=none \4// RUN: -Wall -Wno-unused -Werror -emit-llvm %s -o - | FileCheck %s5// RUN: %clang_cc1 -target-cpu z16 -triple s390x-linux-gnu \6// RUN: -O2 -fzvector -flax-vector-conversions=none \7// RUN: -Wall -Wno-unused -Werror -S %s -o - | FileCheck %s --check-prefix=CHECK-ASM8 9#include <vecintrin.h>10 11volatile vector signed char vsc;12volatile vector signed short vss;13volatile vector signed int vsi;14volatile vector signed long long vsl;15volatile vector unsigned char vuc;16volatile vector unsigned short vus;17volatile vector unsigned int vui;18volatile vector unsigned long long vul;19volatile vector bool char vbc;20volatile vector bool short vbs;21volatile vector bool int vbi;22volatile vector bool long long vbl;23volatile vector float vf;24volatile vector double vd;25 26void test_nnp_assist(void) {27  // CHECK-ASM-LABEL: test_nnp_assist28 29  vf = vec_extend_to_fp32_hi(vus, 0);30  // CHECK: call <4 x float> @llvm.s390.vclfnhs(<8 x i16> %{{.*}}, i32 0)31  // CHECK-ASM: vclfnh32  vf = vec_extend_to_fp32_hi(vus, 15);33  // CHECK: call <4 x float> @llvm.s390.vclfnhs(<8 x i16> %{{.*}}, i32 15)34  // CHECK-ASM: vclfnh35 36  vf = vec_extend_to_fp32_lo(vus, 0);37  // CHECK: call <4 x float> @llvm.s390.vclfnls(<8 x i16> %{{.*}}, i32 0)38  // CHECK-ASM: vclfnl39  vf = vec_extend_to_fp32_lo(vus, 15);40  // CHECK: call <4 x float> @llvm.s390.vclfnls(<8 x i16> %{{.*}}, i32 15)41  // CHECK-ASM: vclfnl42 43  vus = vec_round_from_fp32(vf, vf, 0);44  // CHECK: call <8 x i16> @llvm.s390.vcrnfs(<4 x float> %{{.*}}, <4 x float> %{{.*}}, i32 0)45  // CHECK-ASM: vcrnf46  vus = vec_round_from_fp32(vf, vf, 15);47  // CHECK: call <8 x i16> @llvm.s390.vcrnfs(<4 x float> %{{.*}}, <4 x float> %{{.*}}, i32 15)48  // CHECK-ASM: vcrnf49 50  vus = vec_convert_to_fp16(vus, 0);51  // CHECK: call <8 x i16> @llvm.s390.vcfn(<8 x i16> %{{.*}} i32 0)52  // CHECK-ASM: vcfn53  vus = vec_convert_to_fp16(vus, 15);54  // CHECK: call <8 x i16> @llvm.s390.vcfn(<8 x i16> %{{.*}} i32 15)55  // CHECK-ASM: vcfn56 57  vus = vec_convert_from_fp16(vus, 0);58  // CHECK: call <8 x i16> @llvm.s390.vcnf(<8 x i16> %{{.*}} i32 0)59  // CHECK-ASM: vcnf60  vus = vec_convert_from_fp16(vus, 15);61  // CHECK: call <8 x i16> @llvm.s390.vcnf(<8 x i16> %{{.*}} i32 15)62  // CHECK-ASM: vcnf63}64