Supercedes: 20231025185956.72677-1-pbonzini@redhat.com
("tcg: allow a target to request canonicalization of SUBI to ADDI")
Based-on: 20231025072707.833943-1-richard.henderson@linaro.org
("tcg: Introduce TCG_COND_TST{EQ,NE}")
There a couple of optimize.c routines introduced which I use here.
The final NOTFORMERGE patch suggests that I've caught all of the
cases, but I certainly wouldn't want to merge the assert without
a lot more testing.
r~
Richard Henderson (4):
tcg: Canonicalize subi to addi during opcode generation
tcg/optimize: Canonicalize subi to addi during optimization
tcg/optimize: Canonicalize sub2 with constants to add2
NOTFORMERGE tcg/i386: Assert sub of immediate has been folded
tcg/optimize.c | 35 +++++++++++++++++++++++++---
tcg/tcg-op.c | 25 +++++++-------------
tcg/tcg.c | 49 ++++++++++++++++++++++++++-------------
tcg/i386/tcg-target.c.inc | 13 ++++++++---
4 files changed, 84 insertions(+), 38 deletions(-)