OpcodeDispatcher: Use TestNZ directly for SelectBit

Lets us drop the bitwise select variants, this was the last use.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
This commit is contained in:
Alyssa Rosenzweig committed 2023-11-12 17:32:24 -04:00
1 parent 157f95b08f
commit 472d143021
1 file changed
+4 -3
@@ -842,9 +842,10 @@ OrderedNode *OpDispatchBuilder::SelectBit(OrderedNode *Cmp, bool TrueIsNonzero,
return _And(ResultSize, Cmp, _Constant(1));
}
return _Select(ResultSize, OpSize::i32Bit,
TrueIsNonzero ? CondClassType{COND_ANDNZ} : CondClassType{COND_ANDZ},
Cmp, _Constant(1),
SaveNZCV();
_TestNZ(OpSize::i32Bit, Cmp, _Constant(1));
return _NZCVSelect(ResultSize,
TrueIsNonzero ? CondClassType{COND_NEQ} : CondClassType{COND_EQ},
TrueValue, FalseValue);
}