From b55005e5c08868c88ab7109464066f5da36bdf37 Mon Sep 17 00:00:00 2001 From: lemon Date: Wed, 12 Nov 2025 18:46:39 +0100 Subject: fold: clamp int to 32bits when required --- ir/fold.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ir/fold.c b/ir/fold.c index bfd78ff..6baafe8 100644 --- a/ir/fold.c +++ b/ir/fold.c @@ -50,6 +50,7 @@ foldint(enum op op, enum irclass k, union ref lr, union ref rr) case Ougte: x = l.u >= r.u; break; default: assert(0); } + if (!w) x = (uint)x; return mkintcon(k, x); } -- cgit v1.2.3