id = 1780 title = "PowerPC mishandles xscmpudp instruction" state = "opened" created_at = "2023-07-23T02:53:14.731Z" closed_at = "n/a" labels = ["target: ppc", "workflow::Triaged"] url = "https://gitlab.com/qemu-project/qemu/-/issues/1780" host-os = "Ubuntu 20.04" host-arch = "x86_64" qemu-version = "7.0.0" guest-os = "Ubuntu 20.04" guest-arch = "PowerPC64" description = """xscmpudp instruction is mishandled""" reproduce = """1. Compile the attached program with VSX (e.g. `RUSTFLAGS=-Ctarget-feature=+vsx cargo build --target=powerpc64-unknown-linux-gnu`) 2. Run the program and expect assertions to pass. 3. See assertions fail.""" additional = """When VSX is disabled, the `fcmpu` instruction is emitted instead (and handled properly). See the offending program: ``` pub fn main() { use std::hint::black_box; assert!(black_box(f64::NAN) .clamp(black_box(0f64), black_box(0f64)) .is_nan()); } ```"""