Add TypedSelect support to Singlepass + LLVM

Missed this in the reftypes PR
This commit is contained in:
Mark McCaskey
2021-04-28 09:58:19 -07:00
parent 626fb5ca5e
commit c634cdcc2e
2 changed files with 6 additions and 2 deletions

View File

@ -2022,7 +2022,9 @@ impl<'ctx, 'a> LLVMFunctionCodeGenerator<'ctx, 'a> {
} }
} }
Operator::Select => { // `TypedSelect` must be used for extern refs so ref counting should
// be done with TypedSelect. But otherwise they're the same.
Operator::TypedSelect { .. } | Operator::Select => {
let ((v1, i1), (v2, i2), (cond, _)) = self.state.pop3_extra()?; let ((v1, i1), (v2, i2), (cond, _)) = self.state.pop3_extra()?;
// We don't bother canonicalizing 'cond' here because we only // We don't bother canonicalizing 'cond' here because we only
// compare it to zero, and that's invariant under // compare it to zero, and that's invariant under

View File

@ -5525,7 +5525,9 @@ impl<'a> FuncGen<'a> {
} }
} }
} }
Operator::Select => { // `TypedSelect` must be used for extern refs so ref counting should
// be done with TypedSelect. But otherwise they're the same.
Operator::TypedSelect { .. } | Operator::Select => {
let cond = self.pop_value_released(); let cond = self.pop_value_released();
let v_b = self.pop_value_released(); let v_b = self.pop_value_released();
let v_a = self.pop_value_released(); let v_a = self.pop_value_released();