Skip to content

Commit 52cc719

Browse files
committed
s390x: implement vec_subc_u128 using overflowing_sub
1 parent a21bddb commit 52cc719

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

crates/core_arch/src/s390x/vector.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4678,11 +4678,9 @@ pub unsafe fn vec_subc_u128(
46784678
a: vector_unsigned_char,
46794679
b: vector_unsigned_char,
46804680
) -> vector_unsigned_char {
4681-
// FIXME(llvm) sadly this does not work https://github.com/llvm/llvm-project/issues/129608
4682-
// let a: u128 = transmute(a);
4683-
// let b: u128 = transmute(b);
4684-
// transmute(!a.overflowing_sub(b).1 as u128)
4685-
transmute(vscbiq(transmute(a), transmute(b)))
4681+
let a: u128 = transmute(a);
4682+
let b: u128 = transmute(b);
4683+
transmute(!a.overflowing_sub(b).1 as u128)
46864684
}
46874685

46884686
/// Vector Add Compute Carryout unsigned 128-bits
@@ -4714,7 +4712,7 @@ pub unsafe fn vec_adde_u128(
47144712
let a: u128 = transmute(a);
47154713
let b: u128 = transmute(b);
47164714
let c: u128 = transmute(c);
4717-
// FIXME(llvm) sadly this does not work
4715+
// FIXME(llvm) https://github.com/llvm/llvm-project/pull/153557
47184716
// let (d, _carry) = a.carrying_add(b, c & 1 != 0);
47194717
// transmute(d)
47204718
transmute(vacq(a, b, c))

0 commit comments

Comments
 (0)