Commit Graph

9 Commits

Author SHA1 Message Date
Roland Paterson-Jones
434cf5fdc4 idup(Ins **, Ins *, ulong) -> idup(Blk *, Ins *, ulong)
Always used this way and factors setting b->nins.
Makes b->ins vector contract more obvious.
2025-03-14 09:47:05 +01:00
Quentin Carbonneaux
7de34d3454 no mul->shl as it confuses address matching
Additionally, the strength-reduction
for small powers of two is handled
by amd64/emit.c now.
2024-06-19 10:58:17 +02:00
Quentin Carbonneaux
96f18be71d simplify 8*x as well as x*8 2024-06-18 16:59:42 +02:00
Quentin Carbonneaux
0631bc4fec prevent bogus simplifications 2024-06-17 13:24:22 +02:00
Quentin Carbonneaux
e7ebdc8fb6 qbe has its own magic 2024-06-17 13:17:39 +02:00
Roland Paterson-Jones
7a19de5cf4 Simplify int mul/udiv/urem of 2^N into shl/shr/and.
Passes the "standard" test suite.

(cproc bootstrap, hare[c] make test, roland units, linpack/coremark run)

However linpack benchmark is now notably slower. Coremark is ~2% faster.

As noticed before, linmark timing is dubious, and maybe my cheap (AMD) laptop
prefers mul to shl.
2024-06-16 21:42:17 +02:00
Quentin Carbonneaux
26c1c30b7d new blit instruction 2022-12-14 23:18:26 +01:00
Quentin Carbonneaux
2c2db15995 do sign/zero extensions removal in copy.c 2017-02-25 15:14:12 -05:00
Quentin Carbonneaux
df61decee5 start a new simplification pass 2017-02-24 15:52:56 -05:00