brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · 6be6cec Raw
83 lines · c
1// RUN: %clang_cc1 -flax-vector-conversions=none -triple powerpc64le-linux-gnu -S -O0 -o - %s -target-feature +altivec -target-feature +vsx | FileCheck %s -check-prefix=CHECK -check-prefix=VSX2// RUN: %clang_cc1 -flax-vector-conversions=none -triple powerpc-linux-gnu -S -O0 -o - %s -target-feature +altivec -target-feature -vsx | FileCheck %s3 4// REQUIRES: powerpc-registered-target5 6#include <altivec.h>7 8// CHECK-LABEL: test19// CHECK: vcfsx10vector float test1(vector int x) {11  return vec_ctf(x, 0);12}13 14// CHECK-LABEL: test215// CHECK: vcfux16vector float test2(vector unsigned int x) {17  return vec_ctf(x, 0);18}19 20#ifdef __VSX__21// VSX-LABEL: test322vector float test3(vector signed long long x) {23  return vec_ctf(x, 0);24}25 26// VSX-LABEL: test427vector float test4(vector unsigned long long x) {28  return vec_ctf(x, 0);29}30#endif31 32// CHECK-LABEL: test533// CHECK: vcfsx34vector float test5(vector int x) {35  return vec_vcfsx(x, 0);36}37 38// CHECK-LABEL: test639// CHECK: vcfux40vector float test6(vector unsigned int x) {41  return vec_vcfux(x, 0);42}43 44// CHECK-LABEL: test745// CHECK: vctsxs46vector int test7(vector float x) {47  return vec_cts(x, 0);48}49 50#ifdef __VSX__51// VSX-LABEL: test852vector signed long long test8(vector double x) {53  return vec_cts(x, 0);54}55 56#endif57 58// CHECK-LABEL: test959// CHECK: vctsxs60vector int test9(vector float x) {61  return vec_vctsxs(x, 0);62}63 64// CHECK-LABEL: test1065// CHECK: vctuxs66vector unsigned test10(vector float x) {67  return vec_ctu(x, 0);68}69 70#ifdef __VSX__71// VSX-LABEL: test1172vector unsigned long long test11(vector double x) {73  return vec_ctu(x, 0);74}75 76#endif77 78// CHECK-LABEL: test1279// CHECK: vctuxs80vector unsigned test12(vector float x) {81  return vec_vctuxs(x, 0);82}83