Address review feedback from Mark.

Fix a bug in Operator::Select and add a comment to explain the intention.

Use derived default for ExtraInfo.

Make ExtraInfo associated functions const.

Turn two asserts into debug_asserts.
This commit is contained in:
Nick Lewycky
2019-11-26 12:15:26 -08:00
parent d3fabe576b
commit ff73c5d71b
3 changed files with 27 additions and 19 deletions

View File

@ -1740,7 +1740,11 @@ impl FunctionCodeGenerator<CodegenError> for LLVMFunctionCodeGenerator {
// We don't bother canonicalizing 'cond' here because we only
// compare it to zero, and that's invariant under
// canonicalization.
let (v1, v2) = if i1.has_pending_f32_nan() != i1.has_pending_f32_nan()
// If the pending bits of v1 and v2 are the same, we can pass
// them along to the result. Otherwise, apply pending
// canonicalizations now.
let (v1, v2) = if i1.has_pending_f32_nan() != i2.has_pending_f32_nan()
|| i1.has_pending_f64_nan() != i2.has_pending_f64_nan()
{
(