about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-02-26 22:24:16 +0000
committerbors <bors@rust-lang.org>2024-02-26 22:24:16 +0000
commitdf6d03155d03180ff4d110fd8996cbdccdeca3e7 (patch)
treede4f9e24f3a3b6ddfa49cb24071d317ab2ab726f
parentfcb86c871f5062b12925afc77935166dccf30ce4 (diff)
parent08e4eafa491fc5f3e25fe78ffdb79b5f63e37f8a (diff)
downloadrust-df6d03155d03180ff4d110fd8996cbdccdeca3e7.tar.gz
rust-df6d03155d03180ff4d110fd8996cbdccdeca3e7.zip
Auto merge of #121516 - RalfJung:platform-intrinsics-begone, r=oli-obk
remove platform-intrinsics ABI; make SIMD intrinsics be regular intrinsics

`@Amanieu` `@workingjubilee` I don't think there is any reason these need to be "special"? The [original RFC](https://rust-lang.github.io/rfcs/1199-simd-infrastructure.html) indicated eventually making them stable, but I think that is no longer the plan, so seems to me like we can clean this up a bit.

Blocked on https://github.com/rust-lang/stdarch/pull/1538, https://github.com/rust-lang/rust/pull/121542.
-rw-r--r--example/float-minmax-pass.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/example/float-minmax-pass.rs b/example/float-minmax-pass.rs
index 80a2776ca1e..a71217a554b 100644
--- a/example/float-minmax-pass.rs
+++ b/example/float-minmax-pass.rs
@@ -4,17 +4,14 @@
 
 // Test that the simd_f{min,max} intrinsics produce the correct results.
 
-#![feature(repr_simd, platform_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 "platform-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);