Closed
Description
Running RUSTFLAGS="-Zcodegen-backend=cranelift" cargo miri test
on the following test trips up Miri.
#[test]
fn f() {
std::hint::spin_loop();
}
$ RUSTFLAGS="-Zcodegen-backend=cranelift" cargo miri test
test f ... error: Undefined Behavior: attempted to call intrinsic `llvm.x86.sse2.pause` that requires missing target feature sse2
--> /home/timo/.rustup/toolchains/nightly-2023-12-16-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/../../stdarch/crates/core_arch/src/x86/sse2.rs:25:5
|
25 | pause()
| ^^^^^^^ attempted to call intrinsic `llvm.x86.sse2.pause` that requires missing target feature sse2
I'm guessing the problem is this FIXME here?
rustc_codegen_cranelift/src/lib.rs
Lines 191 to 193 in 289a274
spin_loop
has a #[cfg(target_arch = "x86_64")]
(which evaluates to true
) in which it executes an sse2 instruction