tcg/optimize: Fix TCG_COND_TST* simplification of setcond2
commita71d9dfbf63db42d6e6ae87fc112d1f5502183bd
authorRichard Henderson <richard.henderson@linaro.org>
Mon, 1 Jul 2024 02:46:23 +0000 (30 19:46 -0700)
committerRichard Henderson <richard.henderson@linaro.org>
Wed, 3 Jul 2024 17:24:12 +0000 (3 10:24 -0700)
treece5609518cbe681da8a843ade73f588af0441655
parente57173085aab2dae3fb8b777ea9a4a252feb78a6
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>
tcg/optimize.c
tests/tcg/x86_64/Makefile.target
tests/tcg/x86_64/test-2413.c [new file with mode: 0644]