mirror of
https://github.com/FEX-Emu/FEX.git
synced 2025-02-12 18:39:18 +00:00
ConstProp: drop select folding
no instcountci changes. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
This commit is contained in:
parent
259e1b75a4
commit
ec3b72e17e
@ -907,23 +907,6 @@ bool ConstProp::ConstantPropagation(IREmitter* IREmit, const IRListView& Current
|
||||
}
|
||||
break;
|
||||
}
|
||||
case OP_SELECT: {
|
||||
auto Op = IROp->C<IR::IROp_Select>();
|
||||
uint64_t Constant1 {};
|
||||
uint64_t Constant2 {};
|
||||
|
||||
if (IREmit->IsValueConstant(IROp->Args[0], &Constant1) && IREmit->IsValueConstant(IROp->Args[1], &Constant2) && Op->Cond == COND_EQ) {
|
||||
|
||||
Constant1 &= getMask(IROp);
|
||||
Constant2 &= getMask(IROp);
|
||||
|
||||
bool is_true = Constant1 == Constant2;
|
||||
|
||||
IREmit->ReplaceAllUsesWith(CodeNode, CurrentIR.GetNode(IROp->Args[is_true ? 2 : 3]));
|
||||
Changed = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
default: break;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user