aboutsummaryrefslogtreecommitdiff
path: root/tcg
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2021-08-24 11:08:21 -0700
committerRichard Henderson <richard.henderson@linaro.org>2021-10-27 17:11:22 -0700
commit404a148d891bf18fc564fa94b00970bbc2c0feec (patch)
treecbe5f639b19f0fd3d16acc405d7f754764ca3bd4 /tcg
parent137f1f4429965d9a702fae9fc89f2604449a24d3 (diff)
tcg/optimize: Use a boolean to avoid a mass of continues
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>
Diffstat (limited to 'tcg')
-rw-r--r--tcg/optimize.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/tcg/optimize.c b/tcg/optimize.c
index 368457f4a2..699476e2f1 100644
--- a/tcg/optimize.c
+++ b/tcg/optimize.c
@@ -713,6 +713,7 @@ void tcg_optimize(TCGContext *s)
uint64_t z_mask, partmask, affected, tmp;
TCGOpcode opc = op->opc;
const TCGOpDef *def;
+ bool done = false;
/* Calls are special. */
if (opc == INDEX_op_call) {
@@ -1212,8 +1213,8 @@ void tcg_optimize(TCGContext *s)
allocator where needed and possible. Also detect copies. */
switch (opc) {
CASE_OP_32_64_VEC(mov):
- tcg_opt_gen_mov(&ctx, op, op->args[0], op->args[1]);
- continue;
+ done = tcg_opt_gen_mov(&ctx, op, op->args[0], op->args[1]);
+ break;
case INDEX_op_dup_vec:
if (arg_is_const(op->args[1])) {
@@ -1602,7 +1603,9 @@ void tcg_optimize(TCGContext *s)
break;
}
- finish_folding(&ctx, op);
+ if (!done) {
+ finish_folding(&ctx, op);
+ }
/* Eliminate duplicate and redundant fence instructions. */
if (ctx.prev_mb) {