]> git.ipfire.org Git - thirdparty/qemu.git/commit
tcg/optimize: Fix sign_mask for logical right-shift
authorRichard Henderson <richard.henderson@linaro.org>
Tue, 26 Mar 2024 21:21:38 +0000 (11:21 -1000)
committerMichael Tokarev <mjt@tls.msk.ru>
Sun, 31 Mar 2024 19:14:59 +0000 (22:14 +0300)
commit3cdfd68e4e6586c5c4583fb8cf6cc8074c73b51c
tree1531c181b089260ec4904d76e8a5e284977e4e3f
parentd3e9e0fb29d35bb1a97cf348a99d82b29bae5d86
tcg/optimize: Fix sign_mask for logical right-shift

The 'sign' computation is attempting to locate the sign bit that has
been repeated, so that we can test if that bit is known zero.  That
computation can be zero if there are no known sign repetitions.

Cc: qemu-stable@nongnu.org
Fixes: 93a967fbb57 ("tcg/optimize: Propagate sign info for shifting")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2248
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
(cherry picked from commit 2911e9b95f3bb03783ae5ca3e2494dc3b44a9161)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
tcg/optimize.c
tests/tcg/aarch64/Makefile.target
tests/tcg/aarch64/test-2248.c [new file with mode: 0644]