On Sat, Jun 11, 2022 at 11:43 PM Takayuki 'January June' Suwa <jjsuwa_sys3...@yahoo.co.jp> wrote: > > In Xtensa ISA, there is no single machine instruction that calculates unary > bitwise negation, but a few similar fused instructions are exist: > > "BALL Ax, Ay, label" // if ((~Ax & Ay) == 0) goto label; > "BNALL Ax, Ay, label" // if ((~Ax & Ay) != 0) goto label; > > These instructions have never been emitted before, but it seems no > reason not > to make use of them. > > gcc/ChangeLog: > > * config/xtensa/xtensa.md (*masktrue_bitcmpl): New insn pattern. > > gcc/testsuite/ChangeLog: > > * gcc.target/xtensa/BALL-BNALL.c: New. > --- > gcc/config/xtensa/xtensa.md | 21 +++++++++++++ > gcc/testsuite/gcc.target/xtensa/BALL-BNALL.c | 33 ++++++++++++++++++++ > 2 files changed, 54 insertions(+) > create mode 100644 gcc/testsuite/gcc.target/xtensa/BALL-BNALL.c
Regtested for target=xtensa-linux-uclibc, no new regressions. Committed to master. -- Thanks. -- Max