forked from OSchip/llvm-project
[PowerPC] Add more missing overloads to altivec.h
Add vec_cvf as a synonym for vec_doublee/vec_floate.
This commit is contained in:
parent
64db6b8d37
commit
d8e574c8e6
|
@ -3421,6 +3421,15 @@ vec_doubleo(vector float __a) {
|
|||
return __builtin_vsx_xvcvspdp(vec_sld(__a, __a, 4));
|
||||
#endif
|
||||
}
|
||||
|
||||
/* vec_cvf */
|
||||
static __inline__ vector double __ATTRS_o_ai vec_cvf(vector float __a) {
|
||||
return vec_doublee(__a);
|
||||
}
|
||||
|
||||
static __inline__ vector float __ATTRS_o_ai vec_cvf(vector double __a) {
|
||||
return vec_floate(__a);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* vec_div */
|
||||
|
|
|
@ -1519,6 +1519,15 @@ void test1() {
|
|||
// CHECK-LE: sub nsw i32 17
|
||||
// CHECK-LE: sub nsw i32 18
|
||||
// CHECK-LE: sub nsw i32 31
|
||||
// CHECK-LE: @llvm.ppc.altivec.vperm
|
||||
|
||||
res_vf = vec_cvf(vd);
|
||||
// CHECK: @llvm.ppc.vsx.xvcvdpsp
|
||||
// CHECK-LE: @llvm.ppc.vsx.xvcvdpsp
|
||||
// CHECK-LE: sub nsw i32 16
|
||||
// CHECK-LE: sub nsw i32 17
|
||||
// CHECK-LE: sub nsw i32 18
|
||||
// CHECK-LE: sub nsw i32 31
|
||||
// CHECK-LE: @llvm.ppc.altivec.vperm
|
||||
|
||||
res_vf = vec_floato(vsll);
|
||||
|
@ -1581,6 +1590,15 @@ void test1() {
|
|||
// CHECK-LE: sub nsw i32 18
|
||||
// CHECK-LE: sub nsw i32 31
|
||||
// CHECK-LE: @llvm.ppc.altivec.vperm
|
||||
// CHECK-LE: @llvm.ppc.vsx.xvcvspdp(<4 x float
|
||||
|
||||
res_vd = vec_cvf(vf);
|
||||
// CHECK: @llvm.ppc.vsx.xvcvspdp(<4 x float
|
||||
// CHECK-LE: sub nsw i32 16
|
||||
// CHECK-LE: sub nsw i32 17
|
||||
// CHECK-LE: sub nsw i32 18
|
||||
// CHECK-LE: sub nsw i32 31
|
||||
// CHECK-LE: @llvm.ppc.altivec.vperm
|
||||
// CHECK-LE: @llvm.ppc.vsx.xvcvspdp(<4 x float
|
||||
|
||||
res_vd = vec_doubleh(vsi);
|
||||
|
|
Loading…
Reference in New Issue