diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2024-06-30 19:46:23 -0700 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2024-07-03 10:24:12 -0700 |
commit | a71d9dfbf63db42d6e6ae87fc112d1f5502183bd (patch) | |
tree | ce5609518cbe681da8a843ade73f588af0441655 /tcg | |
parent | e57173085aab2dae3fb8b777ea9a4a252feb78a6 (diff) | |
download | qemu-a71d9dfbf63db42d6e6ae87fc112d1f5502183bd.zip qemu-a71d9dfbf63db42d6e6ae87fc112d1f5502183bd.tar.gz qemu-a71d9dfbf63db42d6e6ae87fc112d1f5502183bd.tar.bz2 |
tcg/optimize: Fix TCG_COND_TST* simplification of setcond2
Argument ordering for setcond2 is:
output, a_low, a_high, b_low, b_high, cond
The test is supposed to be against b_low, not a_high.
Cc: qemu-stable@nongnu.org
Fixes: ceb9ee06b71 ("tcg/optimize: Handle TCG_COND_TST{EQ,NE}")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2413
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Tested-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20240701024623.1265028-1-richard.henderson@linaro.org>
Diffstat (limited to 'tcg')
-rw-r--r-- | tcg/optimize.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tcg/optimize.c b/tcg/optimize.c index 8886f70..ba16ec2 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -2384,7 +2384,7 @@ static bool fold_setcond2(OptContext *ctx, TCGOp *op) case TCG_COND_TSTEQ: case TCG_COND_TSTNE: - if (arg_is_const_val(op->args[2], 0)) { + if (arg_is_const_val(op->args[3], 0)) { goto do_setcond_high; } if (arg_is_const_val(op->args[4], 0)) { |