Skip to content

Commit 95aac89

Browse files
committed
use simd_ge instead
1 parent 5fdb148 commit 95aac89

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

crates/core_arch/src/powerpc/altivec.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -844,16 +844,17 @@ pub(crate) mod sealed {
844844

845845
test_impl! { vec_vcmpgefp(a: vector_float, b: vector_float) -> vector_bool_int [ vcmpgefp, vcmpgefp ] }
846846

847-
// Implement VectorCmpGe trait for vector_float using vcmpgefp (AltiVec)
848-
// This is overridden by vsx.rs when VSX is available
849-
#[cfg(not(target_feature = "vsx"))]
847+
// Implement VectorCmpGe trait for vector_float using simd_ge
850848
#[unstable(feature = "stdarch_powerpc", issue = "111145")]
851849
impl VectorCmpGe<vector_float> for vector_float {
852850
type Result = vector_bool_int;
853851
#[inline]
854852
#[target_feature(enable = "altivec")]
853+
#[cfg_attr(all(test, not(target_feature = "vsx")), assert_instr(vcmpgefp))]
854+
#[cfg_attr(all(test, target_feature = "vsx"), assert_instr(xvcmpgesp))]
855855
unsafe fn vec_cmpge(self, b: vector_float) -> Self::Result {
856-
vec_vcmpgefp(self, b)
856+
let result: m32x4 = simd_ge(self, b);
857+
transmute(result)
857858
}
858859
}
859860

crates/core_arch/src/powerpc/vsx.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,6 @@ impl_vsx_cmp!(VectorCmpEq, vec_cmpeq, simd_eq, vector_float, vector_bool_int, m3
196196
impl_vsx_cmp!(VectorCmpEq, vec_cmpeq, simd_eq, vector_double, vector_bool_long, m64x2, xvcmpeqdp);
197197
impl_vsx_cmp!(VectorCmpGt, vec_cmpgt, simd_gt, vector_float, vector_bool_int, m32x4, xvcmpgtsp);
198198
impl_vsx_cmp!(VectorCmpGt, vec_cmpgt, simd_gt, vector_double, vector_bool_long, m64x2, xvcmpgtdp);
199-
impl_vsx_cmp!(VectorCmpGe, vec_cmpge, simd_ge, vector_float, vector_bool_int, m32x4, xvcmpgesp);
200199
impl_vsx_cmp!(VectorCmpGe, vec_cmpge, simd_ge, vector_double, vector_bool_long, m64x2, xvcmpgedp);
201200

202201
/// Vector permute.

0 commit comments

Comments
 (0)