diff options
| author | Richard Henderson <richard.henderson@linaro.org> | 2025-01-07 20:25:14 -0800 |
|---|---|---|
| committer | Richard Henderson <richard.henderson@linaro.org> | 2025-04-28 13:40:16 -0700 |
| commit | cd9acd2049a385e54314d58f35b4bfce7c031d55 (patch) | |
| tree | a99f2f1bec143a9f080cb1205318ef153d3fd8cf /tcg/optimize.c | |
| parent | 967e7ccd9c5c6a5a2cc5d7a101cd24acced22749 (diff) | |
| download | focaccia-qemu-cd9acd2049a385e54314d58f35b4bfce7c031d55.tar.gz focaccia-qemu-cd9acd2049a385e54314d58f35b4bfce7c031d55.zip | |
tcg: Merge INDEX_op_remu_{i32,i64}
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'tcg/optimize.c')
| -rw-r--r-- | tcg/optimize.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tcg/optimize.c b/tcg/optimize.c index 01ec365175..69f9ba1555 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -575,9 +575,10 @@ static uint64_t do_constant_folding_2(TCGOpcode op, TCGType type, } return (int64_t)x % ((int64_t)y ? : 1); - case INDEX_op_remu_i32: - return (uint32_t)x % ((uint32_t)y ? : 1); - case INDEX_op_remu_i64: + case INDEX_op_remu: + if (type == TCG_TYPE_I32) { + return (uint32_t)x % ((uint32_t)y ? : 1); + } return (uint64_t)x % ((uint64_t)y ? : 1); default: @@ -3024,7 +3025,7 @@ void tcg_optimize(TCGContext *s) done = fold_qemu_st(&ctx, op); break; case INDEX_op_rems: - CASE_OP_32_64(remu): + case INDEX_op_remu: done = fold_remainder(&ctx, op); break; CASE_OP_32_64(rotl): |