diff options
-rw-r--r-- | tcg/optimize.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tcg/optimize.c b/tcg/optimize.c index f8b0709157..7ac63c9231 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -1624,7 +1624,11 @@ static bool fold_qemu_st(OptContext *ctx, TCGOp *op) static bool fold_remainder(OptContext *ctx, TCGOp *op) { - return fold_const2(ctx, op); + if (fold_const2(ctx, op) || + fold_xx_to_i(ctx, op, 0)) { + return true; + } + return false; } static bool fold_setcond(OptContext *ctx, TCGOp *op) |