mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-22 12:43:36 +00:00
enable fast-math flags
This commit is contained in:
parent
180342df0b
commit
1bd9573c1f
@ -1197,9 +1197,11 @@ fn generic_simd_intrinsic<'a, 'tcx>(
|
||||
|
||||
let llvm_name = &format!("llvm.{0}.v{1}{2}", name, in_len, ety);
|
||||
let intrinsic = bx.cx.get_intrinsic(&llvm_name);
|
||||
return Ok(bx.call(intrinsic,
|
||||
&args.iter().map(|arg| arg.immediate()).collect::<Vec<_>>(),
|
||||
None));
|
||||
let c = bx.call(intrinsic,
|
||||
&args.iter().map(|arg| arg.immediate()).collect::<Vec<_>>(),
|
||||
None);
|
||||
unsafe { llvm::LLVMRustSetHasUnsafeAlgebra(c) };
|
||||
return Ok(c);
|
||||
}
|
||||
|
||||
if name == "simd_fsqrt" {
|
||||
|
@ -44,28 +44,28 @@ extern "platform-intrinsic" {
|
||||
// CHECK-LABEL: @fabs_32x2
|
||||
#[no_mangle]
|
||||
pub unsafe fn fabs_32x2(a: f32x2) -> f32x2 {
|
||||
// CHECK: call <2 x float> @llvm.fabs.v2f32
|
||||
// CHECK: call fast <2 x float> @llvm.fabs.v2f32
|
||||
simd_fabs(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @fabs_32x4
|
||||
#[no_mangle]
|
||||
pub unsafe fn fabs_32x4(a: f32x4) -> f32x4 {
|
||||
// CHECK: call <4 x float> @llvm.fabs.v4f32
|
||||
// CHECK: call fast <4 x float> @llvm.fabs.v4f32
|
||||
simd_fabs(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @fabs_32x8
|
||||
#[no_mangle]
|
||||
pub unsafe fn fabs_32x8(a: f32x8) -> f32x8 {
|
||||
// CHECK: call <8 x float> @llvm.fabs.v8f32
|
||||
// CHECK: call fast <8 x float> @llvm.fabs.v8f32
|
||||
simd_fabs(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @fabs_32x16
|
||||
#[no_mangle]
|
||||
pub unsafe fn fabs_32x16(a: f32x16) -> f32x16 {
|
||||
// CHECK: call <16 x float> @llvm.fabs.v16f32
|
||||
// CHECK: call fast <16 x float> @llvm.fabs.v16f32
|
||||
simd_fabs(a)
|
||||
}
|
||||
|
||||
@ -85,20 +85,20 @@ pub struct f64x8(pub f64, pub f64, pub f64, pub f64,
|
||||
// CHECK-LABEL: @fabs_64x4
|
||||
#[no_mangle]
|
||||
pub unsafe fn fabs_64x4(a: f64x4) -> f64x4 {
|
||||
// CHECK: call <4 x double> @llvm.fabs.v4f64
|
||||
// CHECK: call fast <4 x double> @llvm.fabs.v4f64
|
||||
simd_fabs(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @fabs_64x2
|
||||
#[no_mangle]
|
||||
pub unsafe fn fabs_64x2(a: f64x2) -> f64x2 {
|
||||
// CHECK: call <2 x double> @llvm.fabs.v2f64
|
||||
// CHECK: call fast <2 x double> @llvm.fabs.v2f64
|
||||
simd_fabs(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @fabs_64x8
|
||||
#[no_mangle]
|
||||
pub unsafe fn fabs_64x8(a: f64x8) -> f64x8 {
|
||||
// CHECK: call <8 x double> @llvm.fabs.v8f64
|
||||
// CHECK: call fast <8 x double> @llvm.fabs.v8f64
|
||||
simd_fabs(a)
|
||||
}
|
||||
|
@ -44,28 +44,28 @@ extern "platform-intrinsic" {
|
||||
// CHECK-LABEL: @ceil_32x2
|
||||
#[no_mangle]
|
||||
pub unsafe fn ceil_32x2(a: f32x2) -> f32x2 {
|
||||
// CHECK: call <2 x float> @llvm.ceil.v2f32
|
||||
// CHECK: call fast <2 x float> @llvm.ceil.v2f32
|
||||
simd_ceil(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @ceil_32x4
|
||||
#[no_mangle]
|
||||
pub unsafe fn ceil_32x4(a: f32x4) -> f32x4 {
|
||||
// CHECK: call <4 x float> @llvm.ceil.v4f32
|
||||
// CHECK: call fast <4 x float> @llvm.ceil.v4f32
|
||||
simd_ceil(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @ceil_32x8
|
||||
#[no_mangle]
|
||||
pub unsafe fn ceil_32x8(a: f32x8) -> f32x8 {
|
||||
// CHECK: call <8 x float> @llvm.ceil.v8f32
|
||||
// CHECK: call fast <8 x float> @llvm.ceil.v8f32
|
||||
simd_ceil(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @ceil_32x16
|
||||
#[no_mangle]
|
||||
pub unsafe fn ceil_32x16(a: f32x16) -> f32x16 {
|
||||
// CHECK: call <16 x float> @llvm.ceil.v16f32
|
||||
// CHECK: call fast <16 x float> @llvm.ceil.v16f32
|
||||
simd_ceil(a)
|
||||
}
|
||||
|
||||
@ -85,20 +85,20 @@ pub struct f64x8(pub f64, pub f64, pub f64, pub f64,
|
||||
// CHECK-LABEL: @ceil_64x4
|
||||
#[no_mangle]
|
||||
pub unsafe fn ceil_64x4(a: f64x4) -> f64x4 {
|
||||
// CHECK: call <4 x double> @llvm.ceil.v4f64
|
||||
// CHECK: call fast <4 x double> @llvm.ceil.v4f64
|
||||
simd_ceil(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @ceil_64x2
|
||||
#[no_mangle]
|
||||
pub unsafe fn ceil_64x2(a: f64x2) -> f64x2 {
|
||||
// CHECK: call <2 x double> @llvm.ceil.v2f64
|
||||
// CHECK: call fast <2 x double> @llvm.ceil.v2f64
|
||||
simd_ceil(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @ceil_64x8
|
||||
#[no_mangle]
|
||||
pub unsafe fn ceil_64x8(a: f64x8) -> f64x8 {
|
||||
// CHECK: call <8 x double> @llvm.ceil.v8f64
|
||||
// CHECK: call fast <8 x double> @llvm.ceil.v8f64
|
||||
simd_ceil(a)
|
||||
}
|
||||
|
@ -44,28 +44,28 @@ extern "platform-intrinsic" {
|
||||
// CHECK-LABEL: @fcos_32x2
|
||||
#[no_mangle]
|
||||
pub unsafe fn fcos_32x2(a: f32x2) -> f32x2 {
|
||||
// CHECK: call <2 x float> @llvm.cos.v2f32
|
||||
// CHECK: call fast <2 x float> @llvm.cos.v2f32
|
||||
simd_fcos(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @fcos_32x4
|
||||
#[no_mangle]
|
||||
pub unsafe fn fcos_32x4(a: f32x4) -> f32x4 {
|
||||
// CHECK: call <4 x float> @llvm.cos.v4f32
|
||||
// CHECK: call fast <4 x float> @llvm.cos.v4f32
|
||||
simd_fcos(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @fcos_32x8
|
||||
#[no_mangle]
|
||||
pub unsafe fn fcos_32x8(a: f32x8) -> f32x8 {
|
||||
// CHECK: call <8 x float> @llvm.cos.v8f32
|
||||
// CHECK: call fast <8 x float> @llvm.cos.v8f32
|
||||
simd_fcos(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @fcos_32x16
|
||||
#[no_mangle]
|
||||
pub unsafe fn fcos_32x16(a: f32x16) -> f32x16 {
|
||||
// CHECK: call <16 x float> @llvm.cos.v16f32
|
||||
// CHECK: call fast <16 x float> @llvm.cos.v16f32
|
||||
simd_fcos(a)
|
||||
}
|
||||
|
||||
@ -85,20 +85,20 @@ pub struct f64x8(pub f64, pub f64, pub f64, pub f64,
|
||||
// CHECK-LABEL: @fcos_64x4
|
||||
#[no_mangle]
|
||||
pub unsafe fn fcos_64x4(a: f64x4) -> f64x4 {
|
||||
// CHECK: call <4 x double> @llvm.cos.v4f64
|
||||
// CHECK: call fast <4 x double> @llvm.cos.v4f64
|
||||
simd_fcos(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @fcos_64x2
|
||||
#[no_mangle]
|
||||
pub unsafe fn fcos_64x2(a: f64x2) -> f64x2 {
|
||||
// CHECK: call <2 x double> @llvm.cos.v2f64
|
||||
// CHECK: call fast <2 x double> @llvm.cos.v2f64
|
||||
simd_fcos(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @fcos_64x8
|
||||
#[no_mangle]
|
||||
pub unsafe fn fcos_64x8(a: f64x8) -> f64x8 {
|
||||
// CHECK: call <8 x double> @llvm.cos.v8f64
|
||||
// CHECK: call fast <8 x double> @llvm.cos.v8f64
|
||||
simd_fcos(a)
|
||||
}
|
||||
|
@ -44,28 +44,28 @@ extern "platform-intrinsic" {
|
||||
// CHECK-LABEL: @exp_32x2
|
||||
#[no_mangle]
|
||||
pub unsafe fn exp_32x2(a: f32x2) -> f32x2 {
|
||||
// CHECK: call <2 x float> @llvm.exp.v2f32
|
||||
// CHECK: call fast <2 x float> @llvm.exp.v2f32
|
||||
simd_fexp(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @exp_32x4
|
||||
#[no_mangle]
|
||||
pub unsafe fn exp_32x4(a: f32x4) -> f32x4 {
|
||||
// CHECK: call <4 x float> @llvm.exp.v4f32
|
||||
// CHECK: call fast <4 x float> @llvm.exp.v4f32
|
||||
simd_fexp(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @exp_32x8
|
||||
#[no_mangle]
|
||||
pub unsafe fn exp_32x8(a: f32x8) -> f32x8 {
|
||||
// CHECK: call <8 x float> @llvm.exp.v8f32
|
||||
// CHECK: call fast <8 x float> @llvm.exp.v8f32
|
||||
simd_fexp(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @exp_32x16
|
||||
#[no_mangle]
|
||||
pub unsafe fn exp_32x16(a: f32x16) -> f32x16 {
|
||||
// CHECK: call <16 x float> @llvm.exp.v16f32
|
||||
// CHECK: call fast <16 x float> @llvm.exp.v16f32
|
||||
simd_fexp(a)
|
||||
}
|
||||
|
||||
@ -85,20 +85,20 @@ pub struct f64x8(pub f64, pub f64, pub f64, pub f64,
|
||||
// CHECK-LABEL: @exp_64x4
|
||||
#[no_mangle]
|
||||
pub unsafe fn exp_64x4(a: f64x4) -> f64x4 {
|
||||
// CHECK: call <4 x double> @llvm.exp.v4f64
|
||||
// CHECK: call fast <4 x double> @llvm.exp.v4f64
|
||||
simd_fexp(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @exp_64x2
|
||||
#[no_mangle]
|
||||
pub unsafe fn exp_64x2(a: f64x2) -> f64x2 {
|
||||
// CHECK: call <2 x double> @llvm.exp.v2f64
|
||||
// CHECK: call fast <2 x double> @llvm.exp.v2f64
|
||||
simd_fexp(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @exp_64x8
|
||||
#[no_mangle]
|
||||
pub unsafe fn exp_64x8(a: f64x8) -> f64x8 {
|
||||
// CHECK: call <8 x double> @llvm.exp.v8f64
|
||||
// CHECK: call fast <8 x double> @llvm.exp.v8f64
|
||||
simd_fexp(a)
|
||||
}
|
||||
|
@ -44,28 +44,28 @@ extern "platform-intrinsic" {
|
||||
// CHECK-LABEL: @exp2_32x2
|
||||
#[no_mangle]
|
||||
pub unsafe fn exp2_32x2(a: f32x2) -> f32x2 {
|
||||
// CHECK: call <2 x float> @llvm.exp2.v2f32
|
||||
// CHECK: call fast <2 x float> @llvm.exp2.v2f32
|
||||
simd_fexp2(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @exp2_32x4
|
||||
#[no_mangle]
|
||||
pub unsafe fn exp2_32x4(a: f32x4) -> f32x4 {
|
||||
// CHECK: call <4 x float> @llvm.exp2.v4f32
|
||||
// CHECK: call fast <4 x float> @llvm.exp2.v4f32
|
||||
simd_fexp2(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @exp2_32x8
|
||||
#[no_mangle]
|
||||
pub unsafe fn exp2_32x8(a: f32x8) -> f32x8 {
|
||||
// CHECK: call <8 x float> @llvm.exp2.v8f32
|
||||
// CHECK: call fast <8 x float> @llvm.exp2.v8f32
|
||||
simd_fexp2(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @exp2_32x16
|
||||
#[no_mangle]
|
||||
pub unsafe fn exp2_32x16(a: f32x16) -> f32x16 {
|
||||
// CHECK: call <16 x float> @llvm.exp2.v16f32
|
||||
// CHECK: call fast <16 x float> @llvm.exp2.v16f32
|
||||
simd_fexp2(a)
|
||||
}
|
||||
|
||||
@ -85,20 +85,20 @@ pub struct f64x8(pub f64, pub f64, pub f64, pub f64,
|
||||
// CHECK-LABEL: @exp2_64x4
|
||||
#[no_mangle]
|
||||
pub unsafe fn exp2_64x4(a: f64x4) -> f64x4 {
|
||||
// CHECK: call <4 x double> @llvm.exp2.v4f64
|
||||
// CHECK: call fast <4 x double> @llvm.exp2.v4f64
|
||||
simd_fexp2(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @exp2_64x2
|
||||
#[no_mangle]
|
||||
pub unsafe fn exp2_64x2(a: f64x2) -> f64x2 {
|
||||
// CHECK: call <2 x double> @llvm.exp2.v2f64
|
||||
// CHECK: call fast <2 x double> @llvm.exp2.v2f64
|
||||
simd_fexp2(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @exp2_64x8
|
||||
#[no_mangle]
|
||||
pub unsafe fn exp2_64x8(a: f64x8) -> f64x8 {
|
||||
// CHECK: call <8 x double> @llvm.exp2.v8f64
|
||||
// CHECK: call fast <8 x double> @llvm.exp2.v8f64
|
||||
simd_fexp2(a)
|
||||
}
|
||||
|
@ -44,28 +44,28 @@ extern "platform-intrinsic" {
|
||||
// CHECK-LABEL: @floor_32x2
|
||||
#[no_mangle]
|
||||
pub unsafe fn floor_32x2(a: f32x2) -> f32x2 {
|
||||
// CHECK: call <2 x float> @llvm.floor.v2f32
|
||||
// CHECK: call fast <2 x float> @llvm.floor.v2f32
|
||||
simd_floor(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @floor_32x4
|
||||
#[no_mangle]
|
||||
pub unsafe fn floor_32x4(a: f32x4) -> f32x4 {
|
||||
// CHECK: call <4 x float> @llvm.floor.v4f32
|
||||
// CHECK: call fast <4 x float> @llvm.floor.v4f32
|
||||
simd_floor(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @floor_32x8
|
||||
#[no_mangle]
|
||||
pub unsafe fn floor_32x8(a: f32x8) -> f32x8 {
|
||||
// CHECK: call <8 x float> @llvm.floor.v8f32
|
||||
// CHECK: call fast <8 x float> @llvm.floor.v8f32
|
||||
simd_floor(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @floor_32x16
|
||||
#[no_mangle]
|
||||
pub unsafe fn floor_32x16(a: f32x16) -> f32x16 {
|
||||
// CHECK: call <16 x float> @llvm.floor.v16f32
|
||||
// CHECK: call fast <16 x float> @llvm.floor.v16f32
|
||||
simd_floor(a)
|
||||
}
|
||||
|
||||
@ -85,20 +85,20 @@ pub struct f64x8(pub f64, pub f64, pub f64, pub f64,
|
||||
// CHECK-LABEL: @floor_64x4
|
||||
#[no_mangle]
|
||||
pub unsafe fn floor_64x4(a: f64x4) -> f64x4 {
|
||||
// CHECK: call <4 x double> @llvm.floor.v4f64
|
||||
// CHECK: call fast <4 x double> @llvm.floor.v4f64
|
||||
simd_floor(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @floor_64x2
|
||||
#[no_mangle]
|
||||
pub unsafe fn floor_64x2(a: f64x2) -> f64x2 {
|
||||
// CHECK: call <2 x double> @llvm.floor.v2f64
|
||||
// CHECK: call fast <2 x double> @llvm.floor.v2f64
|
||||
simd_floor(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @floor_64x8
|
||||
#[no_mangle]
|
||||
pub unsafe fn floor_64x8(a: f64x8) -> f64x8 {
|
||||
// CHECK: call <8 x double> @llvm.floor.v8f64
|
||||
// CHECK: call fast <8 x double> @llvm.floor.v8f64
|
||||
simd_floor(a)
|
||||
}
|
||||
|
@ -44,28 +44,28 @@ extern "platform-intrinsic" {
|
||||
// CHECK-LABEL: @fma_32x2
|
||||
#[no_mangle]
|
||||
pub unsafe fn fma_32x2(a: f32x2, b: f32x2, c: f32x2) -> f32x2 {
|
||||
// CHECK: call <2 x float> @llvm.fma.v2f32
|
||||
// CHECK: call fast <2 x float> @llvm.fma.v2f32
|
||||
simd_fma(a, b, c)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @fma_32x4
|
||||
#[no_mangle]
|
||||
pub unsafe fn fma_32x4(a: f32x4, b: f32x4, c: f32x4) -> f32x4 {
|
||||
// CHECK: call <4 x float> @llvm.fma.v4f32
|
||||
// CHECK: call fast <4 x float> @llvm.fma.v4f32
|
||||
simd_fma(a, b, c)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @fma_32x8
|
||||
#[no_mangle]
|
||||
pub unsafe fn fma_32x8(a: f32x8, b: f32x8, c: f32x8) -> f32x8 {
|
||||
// CHECK: call <8 x float> @llvm.fma.v8f32
|
||||
// CHECK: call fast <8 x float> @llvm.fma.v8f32
|
||||
simd_fma(a, b, c)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @fma_32x16
|
||||
#[no_mangle]
|
||||
pub unsafe fn fma_32x16(a: f32x16, b: f32x16, c: f32x16) -> f32x16 {
|
||||
// CHECK: call <16 x float> @llvm.fma.v16f32
|
||||
// CHECK: call fast <16 x float> @llvm.fma.v16f32
|
||||
simd_fma(a, b, c)
|
||||
}
|
||||
|
||||
@ -85,20 +85,20 @@ pub struct f64x8(pub f64, pub f64, pub f64, pub f64,
|
||||
// CHECK-LABEL: @fma_64x4
|
||||
#[no_mangle]
|
||||
pub unsafe fn fma_64x4(a: f64x4, b: f64x4, c: f64x4) -> f64x4 {
|
||||
// CHECK: call <4 x double> @llvm.fma.v4f64
|
||||
// CHECK: call fast <4 x double> @llvm.fma.v4f64
|
||||
simd_fma(a, b, c)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @fma_64x2
|
||||
#[no_mangle]
|
||||
pub unsafe fn fma_64x2(a: f64x2, b: f64x2, c: f64x2) -> f64x2 {
|
||||
// CHECK: call <2 x double> @llvm.fma.v2f64
|
||||
// CHECK: call fast <2 x double> @llvm.fma.v2f64
|
||||
simd_fma(a, b, c)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @fma_64x8
|
||||
#[no_mangle]
|
||||
pub unsafe fn fma_64x8(a: f64x8, b: f64x8, c: f64x8) -> f64x8 {
|
||||
// CHECK: call <8 x double> @llvm.fma.v8f64
|
||||
// CHECK: call fast <8 x double> @llvm.fma.v8f64
|
||||
simd_fma(a, b, c)
|
||||
}
|
||||
|
@ -44,28 +44,28 @@ extern "platform-intrinsic" {
|
||||
// CHECK-LABEL: @fsqrt_32x2
|
||||
#[no_mangle]
|
||||
pub unsafe fn fsqrt_32x2(a: f32x2) -> f32x2 {
|
||||
// CHECK: call <2 x float> @llvm.sqrt.v2f32
|
||||
// CHECK: call fast <2 x float> @llvm.sqrt.v2f32
|
||||
simd_fsqrt(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @fsqrt_32x4
|
||||
#[no_mangle]
|
||||
pub unsafe fn fsqrt_32x4(a: f32x4) -> f32x4 {
|
||||
// CHECK: call <4 x float> @llvm.sqrt.v4f32
|
||||
// CHECK: call fast <4 x float> @llvm.sqrt.v4f32
|
||||
simd_fsqrt(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @fsqrt_32x8
|
||||
#[no_mangle]
|
||||
pub unsafe fn fsqrt_32x8(a: f32x8) -> f32x8 {
|
||||
// CHECK: call <8 x float> @llvm.sqrt.v8f32
|
||||
// CHECK: call fast <8 x float> @llvm.sqrt.v8f32
|
||||
simd_fsqrt(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @fsqrt_32x16
|
||||
#[no_mangle]
|
||||
pub unsafe fn fsqrt_32x16(a: f32x16) -> f32x16 {
|
||||
// CHECK: call <16 x float> @llvm.sqrt.v16f32
|
||||
// CHECK: call fast <16 x float> @llvm.sqrt.v16f32
|
||||
simd_fsqrt(a)
|
||||
}
|
||||
|
||||
@ -85,20 +85,20 @@ pub struct f64x8(pub f64, pub f64, pub f64, pub f64,
|
||||
// CHECK-LABEL: @fsqrt_64x4
|
||||
#[no_mangle]
|
||||
pub unsafe fn fsqrt_64x4(a: f64x4) -> f64x4 {
|
||||
// CHECK: call <4 x double> @llvm.sqrt.v4f64
|
||||
// CHECK: call fast <4 x double> @llvm.sqrt.v4f64
|
||||
simd_fsqrt(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @fsqrt_64x2
|
||||
#[no_mangle]
|
||||
pub unsafe fn fsqrt_64x2(a: f64x2) -> f64x2 {
|
||||
// CHECK: call <2 x double> @llvm.sqrt.v2f64
|
||||
// CHECK: call fast <2 x double> @llvm.sqrt.v2f64
|
||||
simd_fsqrt(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @fsqrt_64x8
|
||||
#[no_mangle]
|
||||
pub unsafe fn fsqrt_64x8(a: f64x8) -> f64x8 {
|
||||
// CHECK: call <8 x double> @llvm.sqrt.v8f64
|
||||
// CHECK: call fast <8 x double> @llvm.sqrt.v8f64
|
||||
simd_fsqrt(a)
|
||||
}
|
||||
|
@ -44,28 +44,28 @@ extern "platform-intrinsic" {
|
||||
// CHECK-LABEL: @log_32x2
|
||||
#[no_mangle]
|
||||
pub unsafe fn log_32x2(a: f32x2) -> f32x2 {
|
||||
// CHECK: call <2 x float> @llvm.log.v2f32
|
||||
// CHECK: call fast <2 x float> @llvm.log.v2f32
|
||||
simd_flog(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @log_32x4
|
||||
#[no_mangle]
|
||||
pub unsafe fn log_32x4(a: f32x4) -> f32x4 {
|
||||
// CHECK: call <4 x float> @llvm.log.v4f32
|
||||
// CHECK: call fast <4 x float> @llvm.log.v4f32
|
||||
simd_flog(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @log_32x8
|
||||
#[no_mangle]
|
||||
pub unsafe fn log_32x8(a: f32x8) -> f32x8 {
|
||||
// CHECK: call <8 x float> @llvm.log.v8f32
|
||||
// CHECK: call fast <8 x float> @llvm.log.v8f32
|
||||
simd_flog(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @log_32x16
|
||||
#[no_mangle]
|
||||
pub unsafe fn log_32x16(a: f32x16) -> f32x16 {
|
||||
// CHECK: call <16 x float> @llvm.log.v16f32
|
||||
// CHECK: call fast <16 x float> @llvm.log.v16f32
|
||||
simd_flog(a)
|
||||
}
|
||||
|
||||
@ -85,20 +85,20 @@ pub struct f64x8(pub f64, pub f64, pub f64, pub f64,
|
||||
// CHECK-LABEL: @log_64x4
|
||||
#[no_mangle]
|
||||
pub unsafe fn log_64x4(a: f64x4) -> f64x4 {
|
||||
// CHECK: call <4 x double> @llvm.log.v4f64
|
||||
// CHECK: call fast <4 x double> @llvm.log.v4f64
|
||||
simd_flog(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @log_64x2
|
||||
#[no_mangle]
|
||||
pub unsafe fn log_64x2(a: f64x2) -> f64x2 {
|
||||
// CHECK: call <2 x double> @llvm.log.v2f64
|
||||
// CHECK: call fast <2 x double> @llvm.log.v2f64
|
||||
simd_flog(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @log_64x8
|
||||
#[no_mangle]
|
||||
pub unsafe fn log_64x8(a: f64x8) -> f64x8 {
|
||||
// CHECK: call <8 x double> @llvm.log.v8f64
|
||||
// CHECK: call fast <8 x double> @llvm.log.v8f64
|
||||
simd_flog(a)
|
||||
}
|
||||
|
@ -44,28 +44,28 @@ extern "platform-intrinsic" {
|
||||
// CHECK-LABEL: @log10_32x2
|
||||
#[no_mangle]
|
||||
pub unsafe fn log10_32x2(a: f32x2) -> f32x2 {
|
||||
// CHECK: call <2 x float> @llvm.log10.v2f32
|
||||
// CHECK: call fast <2 x float> @llvm.log10.v2f32
|
||||
simd_flog10(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @log10_32x4
|
||||
#[no_mangle]
|
||||
pub unsafe fn log10_32x4(a: f32x4) -> f32x4 {
|
||||
// CHECK: call <4 x float> @llvm.log10.v4f32
|
||||
// CHECK: call fast <4 x float> @llvm.log10.v4f32
|
||||
simd_flog10(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @log10_32x8
|
||||
#[no_mangle]
|
||||
pub unsafe fn log10_32x8(a: f32x8) -> f32x8 {
|
||||
// CHECK: call <8 x float> @llvm.log10.v8f32
|
||||
// CHECK: call fast <8 x float> @llvm.log10.v8f32
|
||||
simd_flog10(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @log10_32x16
|
||||
#[no_mangle]
|
||||
pub unsafe fn log10_32x16(a: f32x16) -> f32x16 {
|
||||
// CHECK: call <16 x float> @llvm.log10.v16f32
|
||||
// CHECK: call fast <16 x float> @llvm.log10.v16f32
|
||||
simd_flog10(a)
|
||||
}
|
||||
|
||||
@ -85,20 +85,20 @@ pub struct f64x8(pub f64, pub f64, pub f64, pub f64,
|
||||
// CHECK-LABEL: @log10_64x4
|
||||
#[no_mangle]
|
||||
pub unsafe fn log10_64x4(a: f64x4) -> f64x4 {
|
||||
// CHECK: call <4 x double> @llvm.log10.v4f64
|
||||
// CHECK: call fast <4 x double> @llvm.log10.v4f64
|
||||
simd_flog10(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @log10_64x2
|
||||
#[no_mangle]
|
||||
pub unsafe fn log10_64x2(a: f64x2) -> f64x2 {
|
||||
// CHECK: call <2 x double> @llvm.log10.v2f64
|
||||
// CHECK: call fast <2 x double> @llvm.log10.v2f64
|
||||
simd_flog10(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @log10_64x8
|
||||
#[no_mangle]
|
||||
pub unsafe fn log10_64x8(a: f64x8) -> f64x8 {
|
||||
// CHECK: call <8 x double> @llvm.log10.v8f64
|
||||
// CHECK: call fast <8 x double> @llvm.log10.v8f64
|
||||
simd_flog10(a)
|
||||
}
|
||||
|
@ -44,28 +44,28 @@ extern "platform-intrinsic" {
|
||||
// CHECK-LABEL: @log2_32x2
|
||||
#[no_mangle]
|
||||
pub unsafe fn log2_32x2(a: f32x2) -> f32x2 {
|
||||
// CHECK: call <2 x float> @llvm.log2.v2f32
|
||||
// CHECK: call fast <2 x float> @llvm.log2.v2f32
|
||||
simd_flog2(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @log2_32x4
|
||||
#[no_mangle]
|
||||
pub unsafe fn log2_32x4(a: f32x4) -> f32x4 {
|
||||
// CHECK: call <4 x float> @llvm.log2.v4f32
|
||||
// CHECK: call fast <4 x float> @llvm.log2.v4f32
|
||||
simd_flog2(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @log2_32x8
|
||||
#[no_mangle]
|
||||
pub unsafe fn log2_32x8(a: f32x8) -> f32x8 {
|
||||
// CHECK: call <8 x float> @llvm.log2.v8f32
|
||||
// CHECK: call fast <8 x float> @llvm.log2.v8f32
|
||||
simd_flog2(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @log2_32x16
|
||||
#[no_mangle]
|
||||
pub unsafe fn log2_32x16(a: f32x16) -> f32x16 {
|
||||
// CHECK: call <16 x float> @llvm.log2.v16f32
|
||||
// CHECK: call fast <16 x float> @llvm.log2.v16f32
|
||||
simd_flog2(a)
|
||||
}
|
||||
|
||||
@ -85,20 +85,20 @@ pub struct f64x8(pub f64, pub f64, pub f64, pub f64,
|
||||
// CHECK-LABEL: @log2_64x4
|
||||
#[no_mangle]
|
||||
pub unsafe fn log2_64x4(a: f64x4) -> f64x4 {
|
||||
// CHECK: call <4 x double> @llvm.log2.v4f64
|
||||
// CHECK: call fast <4 x double> @llvm.log2.v4f64
|
||||
simd_flog2(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @log2_64x2
|
||||
#[no_mangle]
|
||||
pub unsafe fn log2_64x2(a: f64x2) -> f64x2 {
|
||||
// CHECK: call <2 x double> @llvm.log2.v2f64
|
||||
// CHECK: call fast <2 x double> @llvm.log2.v2f64
|
||||
simd_flog2(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @log2_64x8
|
||||
#[no_mangle]
|
||||
pub unsafe fn log2_64x8(a: f64x8) -> f64x8 {
|
||||
// CHECK: call <8 x double> @llvm.log2.v8f64
|
||||
// CHECK: call fast <8 x double> @llvm.log2.v8f64
|
||||
simd_flog2(a)
|
||||
}
|
||||
|
@ -44,28 +44,28 @@ extern "platform-intrinsic" {
|
||||
// CHECK-LABEL: @fpow_32x2
|
||||
#[no_mangle]
|
||||
pub unsafe fn fpow_32x2(a: f32x2, b: f32x2) -> f32x2 {
|
||||
// CHECK: call <2 x float> @llvm.pow.v2f32
|
||||
// CHECK: call fast <2 x float> @llvm.pow.v2f32
|
||||
simd_fpow(a, b)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @fpow_32x4
|
||||
#[no_mangle]
|
||||
pub unsafe fn fpow_32x4(a: f32x4, b: f32x4) -> f32x4 {
|
||||
// CHECK: call <4 x float> @llvm.pow.v4f32
|
||||
// CHECK: call fast <4 x float> @llvm.pow.v4f32
|
||||
simd_fpow(a, b)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @fpow_32x8
|
||||
#[no_mangle]
|
||||
pub unsafe fn fpow_32x8(a: f32x8, b: f32x8) -> f32x8 {
|
||||
// CHECK: call <8 x float> @llvm.pow.v8f32
|
||||
// CHECK: call fast <8 x float> @llvm.pow.v8f32
|
||||
simd_fpow(a, b)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @fpow_32x16
|
||||
#[no_mangle]
|
||||
pub unsafe fn fpow_32x16(a: f32x16, b: f32x16) -> f32x16 {
|
||||
// CHECK: call <16 x float> @llvm.pow.v16f32
|
||||
// CHECK: call fast <16 x float> @llvm.pow.v16f32
|
||||
simd_fpow(a, b)
|
||||
}
|
||||
|
||||
@ -85,20 +85,20 @@ pub struct f64x8(pub f64, pub f64, pub f64, pub f64,
|
||||
// CHECK-LABEL: @fpow_64x4
|
||||
#[no_mangle]
|
||||
pub unsafe fn fpow_64x4(a: f64x4, b: f64x4) -> f64x4 {
|
||||
// CHECK: call <4 x double> @llvm.pow.v4f64
|
||||
// CHECK: call fast <4 x double> @llvm.pow.v4f64
|
||||
simd_fpow(a, b)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @fpow_64x2
|
||||
#[no_mangle]
|
||||
pub unsafe fn fpow_64x2(a: f64x2, b: f64x2) -> f64x2 {
|
||||
// CHECK: call <2 x double> @llvm.pow.v2f64
|
||||
// CHECK: call fast <2 x double> @llvm.pow.v2f64
|
||||
simd_fpow(a, b)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @fpow_64x8
|
||||
#[no_mangle]
|
||||
pub unsafe fn fpow_64x8(a: f64x8, b: f64x8) -> f64x8 {
|
||||
// CHECK: call <8 x double> @llvm.pow.v8f64
|
||||
// CHECK: call fast <8 x double> @llvm.pow.v8f64
|
||||
simd_fpow(a, b)
|
||||
}
|
||||
|
@ -44,28 +44,28 @@ extern "platform-intrinsic" {
|
||||
// CHECK-LABEL: @fpowi_32x2
|
||||
#[no_mangle]
|
||||
pub unsafe fn fpowi_32x2(a: f32x2, b: i32) -> f32x2 {
|
||||
// CHECK: call <2 x float> @llvm.powi.v2f32
|
||||
// CHECK: call fast <2 x float> @llvm.powi.v2f32
|
||||
simd_fpowi(a, b)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @fpowi_32x4
|
||||
#[no_mangle]
|
||||
pub unsafe fn fpowi_32x4(a: f32x4, b: i32) -> f32x4 {
|
||||
// CHECK: call <4 x float> @llvm.powi.v4f32
|
||||
// CHECK: call fast <4 x float> @llvm.powi.v4f32
|
||||
simd_fpowi(a, b)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @fpowi_32x8
|
||||
#[no_mangle]
|
||||
pub unsafe fn fpowi_32x8(a: f32x8, b: i32) -> f32x8 {
|
||||
// CHECK: call <8 x float> @llvm.powi.v8f32
|
||||
// CHECK: call fast <8 x float> @llvm.powi.v8f32
|
||||
simd_fpowi(a, b)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @fpowi_32x16
|
||||
#[no_mangle]
|
||||
pub unsafe fn fpowi_32x16(a: f32x16, b: i32) -> f32x16 {
|
||||
// CHECK: call <16 x float> @llvm.powi.v16f32
|
||||
// CHECK: call fast <16 x float> @llvm.powi.v16f32
|
||||
simd_fpowi(a, b)
|
||||
}
|
||||
|
||||
@ -85,20 +85,20 @@ pub struct f64x8(pub f64, pub f64, pub f64, pub f64,
|
||||
// CHECK-LABEL: @fpowi_64x4
|
||||
#[no_mangle]
|
||||
pub unsafe fn fpowi_64x4(a: f64x4, b: i32) -> f64x4 {
|
||||
// CHECK: call <4 x double> @llvm.powi.v4f64
|
||||
// CHECK: call fast <4 x double> @llvm.powi.v4f64
|
||||
simd_fpowi(a, b)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @fpowi_64x2
|
||||
#[no_mangle]
|
||||
pub unsafe fn fpowi_64x2(a: f64x2, b: i32) -> f64x2 {
|
||||
// CHECK: call <2 x double> @llvm.powi.v2f64
|
||||
// CHECK: call fast <2 x double> @llvm.powi.v2f64
|
||||
simd_fpowi(a, b)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @fpowi_64x8
|
||||
#[no_mangle]
|
||||
pub unsafe fn fpowi_64x8(a: f64x8, b: i32) -> f64x8 {
|
||||
// CHECK: call <8 x double> @llvm.powi.v8f64
|
||||
// CHECK: call fast <8 x double> @llvm.powi.v8f64
|
||||
simd_fpowi(a, b)
|
||||
}
|
||||
|
@ -44,28 +44,28 @@ extern "platform-intrinsic" {
|
||||
// CHECK-LABEL: @fsin_32x2
|
||||
#[no_mangle]
|
||||
pub unsafe fn fsin_32x2(a: f32x2) -> f32x2 {
|
||||
// CHECK: call <2 x float> @llvm.sin.v2f32
|
||||
// CHECK: call fast <2 x float> @llvm.sin.v2f32
|
||||
simd_fsin(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @fsin_32x4
|
||||
#[no_mangle]
|
||||
pub unsafe fn fsin_32x4(a: f32x4) -> f32x4 {
|
||||
// CHECK: call <4 x float> @llvm.sin.v4f32
|
||||
// CHECK: call fast <4 x float> @llvm.sin.v4f32
|
||||
simd_fsin(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @fsin_32x8
|
||||
#[no_mangle]
|
||||
pub unsafe fn fsin_32x8(a: f32x8) -> f32x8 {
|
||||
// CHECK: call <8 x float> @llvm.sin.v8f32
|
||||
// CHECK: call fast <8 x float> @llvm.sin.v8f32
|
||||
simd_fsin(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @fsin_32x16
|
||||
#[no_mangle]
|
||||
pub unsafe fn fsin_32x16(a: f32x16) -> f32x16 {
|
||||
// CHECK: call <16 x float> @llvm.sin.v16f32
|
||||
// CHECK: call fast <16 x float> @llvm.sin.v16f32
|
||||
simd_fsin(a)
|
||||
}
|
||||
|
||||
@ -85,20 +85,20 @@ pub struct f64x8(pub f64, pub f64, pub f64, pub f64,
|
||||
// CHECK-LABEL: @fsin_64x4
|
||||
#[no_mangle]
|
||||
pub unsafe fn fsin_64x4(a: f64x4) -> f64x4 {
|
||||
// CHECK: call <4 x double> @llvm.sin.v4f64
|
||||
// CHECK: call fast <4 x double> @llvm.sin.v4f64
|
||||
simd_fsin(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @fsin_64x2
|
||||
#[no_mangle]
|
||||
pub unsafe fn fsin_64x2(a: f64x2) -> f64x2 {
|
||||
// CHECK: call <2 x double> @llvm.sin.v2f64
|
||||
// CHECK: call fast <2 x double> @llvm.sin.v2f64
|
||||
simd_fsin(a)
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @fsin_64x8
|
||||
#[no_mangle]
|
||||
pub unsafe fn fsin_64x8(a: f64x8) -> f64x8 {
|
||||
// CHECK: call <8 x double> @llvm.sin.v8f64
|
||||
// CHECK: call fast <8 x double> @llvm.sin.v8f64
|
||||
simd_fsin(a)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user