1 // min-llvm-version 7.0
3 // compile-flags: -C no-prepopulate-passes
7 #![feature(repr_simd, platform_intrinsics)]
8 #![allow(non_camel_case_types)]
11 #[derive(Copy, Clone, PartialEq, Debug)]
12 pub struct f32x4(pub f32, pub f32, pub f32, pub f32);
14 extern "platform-intrinsic" {
15 fn simd_fmin<T>(x: T, y: T) -> T;
16 fn simd_fmax<T>(x: T, y: T) -> T;
21 pub unsafe fn fmin(a: f32x4, b: f32x4) -> f32x4 {
22 // CHECK: call <4 x float> @llvm.minnum.v4f32
28 pub unsafe fn fmax(a: f32x4, b: f32x4) -> f32x4 {
29 // CHECK: call <4 x float> @llvm.maxnum.v4f32