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