Abs may only change the sign bit, it can't change whether a value is a canonical nan or not.

This commit is contained in:
Nick Lewycky 2019-08-12 18:08:39 -07:00
parent c30a64a973
commit 9af01a4afb

View File

@ -2769,8 +2769,7 @@ impl FunctionCodeGenerator<CodegenError> for LLVMFunctionCodeGenerator {
.unwrap(); .unwrap();
state.push1(StackEntry { state.push1(StackEntry {
value: res, value: res,
no_f32_ncnan: entry.no_f32_ncnan, ..entry
no_f64_ncnan: false,
}); });
} }
Operator::F64Abs => { Operator::F64Abs => {
@ -2782,8 +2781,7 @@ impl FunctionCodeGenerator<CodegenError> for LLVMFunctionCodeGenerator {
.unwrap(); .unwrap();
state.push1(StackEntry { state.push1(StackEntry {
value: res, value: res,
no_f32_ncnan: false, ..entry
no_f64_ncnan: entry.no_f64_ncnan,
}); });
} }
Operator::F32x4Abs => { Operator::F32x4Abs => {