about summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift/example/float-minmax-pass.rs
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2024-02-23 18:36:24 +0100
committerRalf Jung <post@ralfj.de>2024-02-25 08:15:44 +0100
commitc1d0e489e564049eae866d6beb5b192c36b3b835 (patch)
tree94f89e05641b10a6f82df7aa094342f9910f54fe /compiler/rustc_codegen_cranelift/example/float-minmax-pass.rs
parentcc3df0af7ba25a9a7bc82dac52e4b0fbb9d9713a (diff)
downloadrust-c1d0e489e564049eae866d6beb5b192c36b3b835.tar.gz
rust-c1d0e489e564049eae866d6beb5b192c36b3b835.zip
fix use of platform_intrinsics in tests
Diffstat (limited to 'compiler/rustc_codegen_cranelift/example/float-minmax-pass.rs')
-rw-r--r--compiler/rustc_codegen_cranelift/example/float-minmax-pass.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/compiler/rustc_codegen_cranelift/example/float-minmax-pass.rs b/compiler/rustc_codegen_cranelift/example/float-minmax-pass.rs
index eebd77083ec..a71217a554b 100644
--- a/compiler/rustc_codegen_cranelift/example/float-minmax-pass.rs
+++ b/compiler/rustc_codegen_cranelift/example/float-minmax-pass.rs
@@ -4,17 +4,14 @@
 
 // Test that the simd_f{min,max} intrinsics produce the correct results.
 
-#![feature(repr_simd, intrinsics)]
+#![feature(repr_simd, core_intrinsics)]
 #![allow(non_camel_case_types)]
 
 #[repr(simd)]
 #[derive(Copy, Clone, PartialEq, Debug)]
 struct f32x4(pub f32, pub f32, pub f32, pub f32);
 
-extern "intrinsic" {
-    fn simd_fmin<T>(x: T, y: T) -> T;
-    fn simd_fmax<T>(x: T, y: T) -> T;
-}
+use std::intrinsics::simd::*;
 
 fn main() {
     let x = f32x4(1.0, 2.0, 3.0, 4.0);