diff options
author | Jeff Law <jlaw@ventanamicro.com> | 2025-02-11 16:55:03 -0700 |
---|---|---|
committer | Jeff Law <jlaw@ventanamicro.com> | 2025-02-11 16:55:03 -0700 |
commit | 71f6540fc54036cc8f71db497cc22816f794549a (patch) | |
tree | 527830c4fdbc5dd5cd37bdddc48ef7a123333cb7 /libgo/go/net/mail | |
parent | 556248d7d2cf557423993eb68f6a55ae6bda0cee (diff) | |
download | gcc-71f6540fc54036cc8f71db497cc22816f794549a.zip gcc-71f6540fc54036cc8f71db497cc22816f794549a.tar.gz gcc-71f6540fc54036cc8f71db497cc22816f794549a.tar.bz2 |
[PR target/115478] Accept ADD, IOR or XOR when combining objects with no bits in common
So the change to prefer ADD over IOR for combining two objects with no bits in
common is (IMHO) generally good. It has some minor fallout.
In particular the aarch64 port (and I suspect others) have patterns that
recognize IOR, but not PLUS or XOR for these cases and thus tests which
expected to optimize with IOR are no longer optimizing.
Roger suggested using a code iterator for this purpose. Richard S. suggested a
new match operator to cover those cases.
I really like the match operator idea, but as Richard S. notes in the PR it
would require either not validating the "no bits in common", which dramatically
reduces the utility IMHO or we'd need some work to allow consistent results
without polluting the nonzero bits cache.
So this patch goes back to Roger's idea of just using a match iterator in the
aarch64 backend (and presumably anywhere else we see this popping up).
Bootstrapped and regression tested on aarch64-linux-gnu where it fixes
bitint-args.c (as expected).
PR target/115478
gcc/
* config/aarch64/iterators.md (any_or_plus): New code iterator.
* config/aarch64/aarch64.md (extr<mode>5_insn): Use any_or_plus.
(extr<mode>5_insn_alt, extrsi5_insn_uxtw): Likewise.
(extrsi5_insn_uxtw_alt, extrsi5_insn_di): Likewise.
gcc/testsuite/
* gcc.target/aarch64/bitint-args.c: Update expected output.
Diffstat (limited to 'libgo/go/net/mail')
0 files changed, 0 insertions, 0 deletions