summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorReimersS <sebastian.reimers@tum.de>2025-10-30 08:40:46 +0000
committerReimersS <sebastian.reimers@tum.de>2025-10-30 08:40:46 +0000
commit2ea3db93dc11147b3c7f6b96055499ce8dd725e1 (patch)
treeac435d24ba3dcb71b471d40b8e63f1d8a091f58a
parent1cf9db5b9ac52ffb57ed91edc9792b0587009db8 (diff)
downloadfocaccia-qemu-sr/plugin.tar.gz
focaccia-qemu-sr/plugin.zip
Patch to reintroduce issue-2248 sr/plugin
-rw-r--r--issue-2248.patch18
1 files changed, 18 insertions, 0 deletions
diff --git a/issue-2248.patch b/issue-2248.patch
new file mode 100644
index 0000000000..27e40d8db3
--- /dev/null
+++ b/issue-2248.patch
@@ -0,0 +1,18 @@
+diff --git a/tcg/optimize.c b/tcg/optimize.c
+index f922f86a1d..a864331b69 100644
+--- a/tcg/optimize.c
++++ b/tcg/optimize.c
+@@ -2618,8 +2618,11 @@ static bool fold_shift(OptContext *ctx, TCGOp *op)
+          * If the sign bit is known zero, then logical right shift
+          * will not reduce the number of input sign repetitions.
+          */
+-        if (~z_mask & -s_mask) {
+-            return fold_masks_s(ctx, op, s_mask);
++        {
++            uint64_t sign = (s_mask & -s_mask) >> 1;
++            if (!(z_mask & sign)) {
++                return fold_masks_s(ctx, op, s_mask);
++            }
+         }
+         break;
+     default: