[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 20/39] tcg/aarch64: Generate CBNZ for TSTNE of UINT32_MAX
From: |
Richard Henderson |
Subject: |
[PULL 20/39] tcg/aarch64: Generate CBNZ for TSTNE of UINT32_MAX |
Date: |
Mon, 5 Feb 2024 07:40:33 +1000 |
... and the inverse, CBZ for TSTEQ.
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
tcg/aarch64/tcg-target.c.inc | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tcg/aarch64/tcg-target.c.inc b/tcg/aarch64/tcg-target.c.inc
index 36fc46ae93..dec8ecc1b6 100644
--- a/tcg/aarch64/tcg-target.c.inc
+++ b/tcg/aarch64/tcg-target.c.inc
@@ -1463,6 +1463,12 @@ static void tcg_out_brcond(TCGContext *s, TCGType ext,
TCGCond c, TCGArg a,
break;
case TCG_COND_TSTEQ:
case TCG_COND_TSTNE:
+ /* tst xN,0xffffffff; b.ne L -> cbnz wN,L */
+ if (b_const && b == UINT32_MAX) {
+ ext = TCG_TYPE_I32;
+ need_cmp = false;
+ break;
+ }
/* tst xN,1<<B; b.ne L -> tbnz xN,B,L */
if (b_const && is_power_of_2(b)) {
tbit = ctz64(b);
--
2.34.1
- [PULL 09/39] target/alpha: Use TCG_COND_TST{EQ,NE} for BLB{C,S}, (continued)
- [PULL 09/39] target/alpha: Use TCG_COND_TST{EQ,NE} for BLB{C,S}, Richard Henderson, 2024/02/04
- [PULL 11/39] target/alpha: Use TCG_COND_TSTNE for gen_fold_mzero, Richard Henderson, 2024/02/04
- [PULL 10/39] target/alpha: Use TCG_COND_TST{EQ,NE} for CMOVLB{C,S}, Richard Henderson, 2024/02/04
- [PULL 12/39] target/m68k: Use TCG_COND_TST{EQ,NE} in gen_fcc_cond, Richard Henderson, 2024/02/04
- [PULL 13/39] target/sparc: Use TCG_COND_TSTEQ in gen_op_mulscc, Richard Henderson, 2024/02/04
- [PULL 14/39] target/s390x: Use TCG_COND_TSTNE for CC_OP_{TM,ICM}, Richard Henderson, 2024/02/04
- [PULL 16/39] tcg: Add TCGConst argument to tcg_target_const_match, Richard Henderson, 2024/02/04
- [PULL 17/39] tcg/aarch64: Support TCG_COND_TST{EQ,NE}, Richard Henderson, 2024/02/04
- [PULL 18/39] tcg/aarch64: Massage tcg_out_brcond(), Richard Henderson, 2024/02/04
- [PULL 19/39] tcg/aarch64: Generate TBZ, TBNZ, Richard Henderson, 2024/02/04
- [PULL 20/39] tcg/aarch64: Generate CBNZ for TSTNE of UINT32_MAX,
Richard Henderson <=
- [PULL 21/39] tcg/arm: Split out tcg_out_cmp(), Richard Henderson, 2024/02/04
- [PULL 15/39] target/s390x: Improve general case of disas_jcc, Richard Henderson, 2024/02/04
- [PULL 22/39] tcg/arm: Support TCG_COND_TST{EQ,NE}, Richard Henderson, 2024/02/04
- [PULL 23/39] tcg/i386: Pass x86 condition codes to tcg_out_cmov, Richard Henderson, 2024/02/04
- [PULL 24/39] tcg/i386: Move tcg_cond_to_jcc[] into tcg_out_cmp, Richard Henderson, 2024/02/04
- [PULL 26/39] tcg/i386: Improve TSTNE/TESTEQ vs powers of two, Richard Henderson, 2024/02/04
- [PULL 30/39] tcg/sparc64: Support TCG_COND_TST{EQ,NE}, Richard Henderson, 2024/02/04
- [PULL 31/39] tcg/ppc: Sink tcg_to_bc usage into tcg_out_bc, Richard Henderson, 2024/02/04
- [PULL 27/39] tcg/i386: Use TEST r,r to test 8/16/32 bits, Richard Henderson, 2024/02/04
- [PULL 25/39] tcg/i386: Support TCG_COND_TST{EQ,NE}, Richard Henderson, 2024/02/04