packed_simd icon indicating copy to clipboard operation
packed_simd copied to clipboard

Right shift of 128-bit wide integer by zero produces incorrect results

Open gnzlbg opened this issue 7 years ago • 0 comments

This test passes on s390x-unknown-linux-gnu and sparc64-unknown-linux-gnu (it does not panic):

#[test]
pub fn scalar_test() {
    let z = 0_i128;
    let o = 1_i128;

    if o >> z != o {
        panic!();
    }
}

The same applies to vectors containing i128 like i128x1 and i128x2.

Reported upstream: https://github.com/rust-lang/rust/issues/52015

gnzlbg avatar Jul 19 '18 00:07 gnzlbg