Fix bug in I32x4TruncSatF64x2SZero

We need to use LEF64, not LEF32, when dealing with f64s
This commit is contained in:
Mark McCaskey
2021-05-11 14:47:44 -07:00
parent 20297858ed
commit 88d2ac9626
2 changed files with 2 additions and 7 deletions

View File

@ -6612,11 +6612,11 @@ impl<'ctx, 'a> LLVMFunctionCodeGenerator<'ctx, 'a> {
let ((min, max), (cmp_min, cmp_max)) = match o {
Operator::I32x4TruncSatF64x2SZero => (
(std::i32::MIN as u64, std::i32::MAX as u64),
(LEF32_GEQ_I32_MIN, GEF32_LEQ_I32_MAX),
(LEF64_GEQ_I32_MIN, GEF64_LEQ_I32_MAX),
),
Operator::I32x4TruncSatF64x2UZero => (
(std::u32::MIN as u64, std::u32::MAX as u64),
(LEF32_GEQ_U32_MIN, GEF32_LEQ_U32_MAX),
(LEF64_GEQ_U32_MIN, GEF64_LEQ_U32_MAX),
),
_ => unreachable!("Unhandled internal variant"),
};