mirror of https://github.com/xemu-project/xemu.git
tcg/optimize: Use fold_xx_to_i for orc
Recognize the constant function for or-complement. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Luis Pires <luis.pires@eldorado.org.br> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
faa2e10045
commit
4e858d96aa
|
@ -1586,6 +1586,7 @@ static bool fold_or(OptContext *ctx, TCGOp *op)
|
||||||
static bool fold_orc(OptContext *ctx, TCGOp *op)
|
static bool fold_orc(OptContext *ctx, TCGOp *op)
|
||||||
{
|
{
|
||||||
if (fold_const2(ctx, op) ||
|
if (fold_const2(ctx, op) ||
|
||||||
|
fold_xx_to_i(ctx, op, -1) ||
|
||||||
fold_xi_to_x(ctx, op, -1) ||
|
fold_xi_to_x(ctx, op, -1) ||
|
||||||
fold_ix_to_not(ctx, op, 0)) {
|
fold_ix_to_not(ctx, op, 0)) {
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue