On 02/07/2025 18:45, Karl Meakin wrote:
This patch series adds support for the CMPBR extension. It includes the
new `+cmpbr` option and rules to generate the new instructions when
lowering conditional branches.

Changelog:
* v8:
   - Support far branches for the `CBB` and `CBH` instructions, and add tests 
for them.
   - Mark the branch in the far branch tests likely, so that the optimizer does
     not invert the condition.
   - Use regex captures for register and label names so that the tests are less 
fragile.
   - Minor formatting fixes.
* v7:
   - Support far branches and add a test for them.
   - Replace `aarch64_cb_short_operand` with `aarch64_reg_or_zero_operand`.
   - Delete the new predicates that aren't needed anymore.
   - Minor formatting and comment fixes.
* v6:
   - Correct the constraint string for immediate operands.
   - Drop the commit for adding `%j` format specifiers. The suffix for
     the `cb` instruction is now calculated by the `cmp_op` code
     attribute.
* v5:
   - Moved Moved patch 10/10 (adding %j ...) before patch 8/10 (rules for
     CMPBR...). Every commit in the series should now produce a correct
     compiler.
   - Reduce excessive diff context by not passing `--function-context` to
     `git format-patch`.
* v4:
   - Added a commit to use HS/LO instead of CS/CC mnemonics.
   - Rewrite the range checks for immediate RHSes in aarch64.cc: CBGE,
     CBHS, CBLE and CBLS have different ranges of allowed immediates than
     the other comparisons.

Karl Meakin (9):
   AArch64: place branch instruction rules together
   AArch64: reformat branch instruction rules
   AArch64: rename branch instruction rules
   AArch64: add constants for branch displacements
   AArch64: make `far_branch` attribute a boolean
   AArch64: recognize `+cmpbr` option
   AArch64: precommit test for CMPBR instructions
   AArch64: rules for CMPBR instructions
   AArch64: make rules for CBZ/TBZ higher priority

  .../aarch64/aarch64-option-extensions.def     |    2 +
  gcc/config/aarch64/aarch64-protos.h           |    2 +
  gcc/config/aarch64/aarch64-simd.md            |    2 +-
  gcc/config/aarch64/aarch64-sme.md             |    2 +-
  gcc/config/aarch64/aarch64.cc                 |   39 +-
  gcc/config/aarch64/aarch64.h                  |    3 +
  gcc/config/aarch64/aarch64.md                 |  570 ++++--
  gcc/config/aarch64/constraints.md             |   18 +
  gcc/config/aarch64/iterators.md               |   30 +
  gcc/doc/invoke.texi                           |    3 +
  gcc/testsuite/gcc.target/aarch64/cmpbr-far.c  |   52 +
  gcc/testsuite/gcc.target/aarch64/cmpbr.c      | 1824 +++++++++++++++++
  gcc/testsuite/gcc.target/aarch64/cmpbr.h      |   16 +
  .../gcc.target/aarch64/sve/mask_store.c       |   28 +
  gcc/testsuite/gcc.target/aarch64/sve/sqlite.c |  205 ++
  gcc/testsuite/lib/target-supports.exp         |   14 +-
  16 files changed, 2586 insertions(+), 224 deletions(-)
  create mode 100644 gcc/testsuite/gcc.target/aarch64/cmpbr-far.c
  create mode 100644 gcc/testsuite/gcc.target/aarch64/cmpbr.c
  create mode 100644 gcc/testsuite/gcc.target/aarch64/cmpbr.h
  create mode 100644 gcc/testsuite/gcc.target/aarch64/sve/mask_store.c
  create mode 100644 gcc/testsuite/gcc.target/aarch64/sve/sqlite.c

--
2.48.1

I accidentally committed some WIP files that shouldn't have been included (cmpbr-far.c, cmpbr.h, mask_store.c, sqlite.c).

Please ignore them. I have removed them in the next revision (v9)

Reply via email to