mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-28 16:11:32 +00:00
Add a comment explaining why we don't use the intrinsics for these.
This commit is contained in:
@ -2692,6 +2692,9 @@ impl FunctionCodeGenerator<CodegenError> for LLVMFunctionCodeGenerator {
|
||||
state.push1(bits);
|
||||
}
|
||||
Operator::F32Min => {
|
||||
// This implements the same logic as LLVM's @llvm.minimum
|
||||
// intrinsic would, but x86 lowering of that intrinsics
|
||||
// encounters a fatal error in LLVM 8 and LLVM 9.
|
||||
let (v1, v2) = state.pop2()?;
|
||||
let v1 = canonicalize_nans(builder, intrinsics, v1);
|
||||
let v2 = canonicalize_nans(builder, intrinsics, v2);
|
||||
@ -2735,6 +2738,9 @@ impl FunctionCodeGenerator<CodegenError> for LLVMFunctionCodeGenerator {
|
||||
state.push1(res);
|
||||
}
|
||||
Operator::F64Min => {
|
||||
// This implements the same logic as LLVM's @llvm.minimum
|
||||
// intrinsic would, but x86 lowering of that intrinsics
|
||||
// encounters a fatal error in LLVM 8 and LLVM 9.
|
||||
let (v1, v2) = state.pop2()?;
|
||||
let v1 = canonicalize_nans(builder, intrinsics, v1);
|
||||
let v2 = canonicalize_nans(builder, intrinsics, v2);
|
||||
@ -2778,6 +2784,9 @@ impl FunctionCodeGenerator<CodegenError> for LLVMFunctionCodeGenerator {
|
||||
state.push1(res);
|
||||
}
|
||||
Operator::F32x4Min => {
|
||||
// This implements the same logic as LLVM's @llvm.minimum
|
||||
// intrinsic would, but x86 lowering of that intrinsics
|
||||
// encounters a fatal error in LLVM 8 and LLVM 9.
|
||||
let (v1, v2) = state.pop2()?;
|
||||
let v1 = builder.build_bitcast(v1, intrinsics.f32x4_ty, "");
|
||||
let v2 = builder.build_bitcast(v2, intrinsics.f32x4_ty, "");
|
||||
@ -2830,6 +2839,9 @@ impl FunctionCodeGenerator<CodegenError> for LLVMFunctionCodeGenerator {
|
||||
state.push1(res);
|
||||
}
|
||||
Operator::F64x2Min => {
|
||||
// This implements the same logic as LLVM's @llvm.minimum
|
||||
// intrinsic would, but x86 lowering of that intrinsics
|
||||
// encounters a fatal error in LLVM 8 and LLVM 9.
|
||||
let (v1, v2) = state.pop2()?;
|
||||
let v1 = builder.build_bitcast(v1, intrinsics.f64x2_ty, "");
|
||||
let v2 = builder.build_bitcast(v2, intrinsics.f64x2_ty, "");
|
||||
@ -2882,6 +2894,9 @@ impl FunctionCodeGenerator<CodegenError> for LLVMFunctionCodeGenerator {
|
||||
state.push1(res);
|
||||
}
|
||||
Operator::F32Max => {
|
||||
// This implements the same logic as LLVM's @llvm.maximum
|
||||
// intrinsic would, but x86 lowering of that intrinsics
|
||||
// encounters a fatal error in LLVM 8 and LLVM 9.
|
||||
let (v1, v2) = state.pop2()?;
|
||||
let v1 = canonicalize_nans(builder, intrinsics, v1);
|
||||
let v2 = canonicalize_nans(builder, intrinsics, v2);
|
||||
@ -2924,6 +2939,9 @@ impl FunctionCodeGenerator<CodegenError> for LLVMFunctionCodeGenerator {
|
||||
state.push1(res);
|
||||
}
|
||||
Operator::F64Max => {
|
||||
// This implements the same logic as LLVM's @llvm.maximum
|
||||
// intrinsic would, but x86 lowering of that intrinsics
|
||||
// encounters a fatal error in LLVM 8 and LLVM 9.
|
||||
let (v1, v2) = state.pop2()?;
|
||||
let v1 = canonicalize_nans(builder, intrinsics, v1);
|
||||
let v2 = canonicalize_nans(builder, intrinsics, v2);
|
||||
@ -2966,6 +2984,9 @@ impl FunctionCodeGenerator<CodegenError> for LLVMFunctionCodeGenerator {
|
||||
state.push1(res);
|
||||
}
|
||||
Operator::F32x4Max => {
|
||||
// This implements the same logic as LLVM's @llvm.maximum
|
||||
// intrinsic would, but x86 lowering of that intrinsics
|
||||
// encounters a fatal error in LLVM 8 and LLVM 9.
|
||||
let (v1, v2) = state.pop2()?;
|
||||
let v1 = builder.build_bitcast(v1, intrinsics.f32x4_ty, "");
|
||||
let v2 = builder.build_bitcast(v2, intrinsics.f32x4_ty, "");
|
||||
@ -3018,6 +3039,9 @@ impl FunctionCodeGenerator<CodegenError> for LLVMFunctionCodeGenerator {
|
||||
state.push1(res);
|
||||
}
|
||||
Operator::F64x2Max => {
|
||||
// This implements the same logic as LLVM's @llvm.maximum
|
||||
// intrinsic would, but x86 lowering of that intrinsics
|
||||
// encounters a fatal error in LLVM 8 and LLVM 9.
|
||||
let (v1, v2) = state.pop2()?;
|
||||
let v1 = builder.build_bitcast(v1, intrinsics.f64x2_ty, "");
|
||||
let v2 = builder.build_bitcast(v2, intrinsics.f64x2_ty, "");
|
||||
|
Reference in New Issue
Block a user