aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/dump-parse-tree.cc
diff options
context:
space:
mode:
authorXi Ruoyao <xry111@xry111.site>2025-01-13 13:11:38 -0700
committerJeff Law <jlaw@ventanamicro.com>2025-01-13 13:11:38 -0700
commita9ebf249063d2e8f6e8813fc954276766ad3a2fe (patch)
tree7b7d0c085540f261299c00e6b02b18be39909547 /gcc/fortran/dump-parse-tree.cc
parenta52812a65cc10ef604100162c7c97ad7f4b37214 (diff)
downloadgcc-a9ebf249063d2e8f6e8813fc954276766ad3a2fe.zip
gcc-a9ebf249063d2e8f6e8813fc954276766ad3a2fe.tar.gz
gcc-a9ebf249063d2e8f6e8813fc954276766ad3a2fe.tar.bz2
RISC-V: Remove zba check in bitwise and ashift reassociation [PR 115921]
The test case long test (long x, long y) { return ((x | 0x1ff) << 3) + y; } is now compiled (-O2 -march=rv64g_zba) to li a4,4096 slliw a5,a0,3 addi a4,a4,-8 or a5,a5,a4 addw a0,a5,a1 ret Despite this check was originally intended to use zba better, now removing it actually enables the use of zba for this test case (thanks to late combine): ori a5,a0,511 sh3add a0,a5,a1 ret Obviously, bitmanip.md does not cover (any_or (ashift (reg) (imm123)) imm) at all, and even for and it just seems more natural splitting to (ashift (and (reg) (imm')) (imm123)) first, then let late combine to combine the outer ashift and the plus. I've not found any test case regressed by the removal. And "make check-gcc RUNTESTFLAGS=riscv.exp='zba-*.c'" also reports no failure. gcc/ChangeLog: PR target/115921 * config/riscv/riscv.md (<optab>_shift_reverse): Remove check for TARGET_ZBA. gcc/testsuite/ChangeLog: PR target/115921 * gcc.target/riscv/zba-shNadd-08.c: New test.
Diffstat (limited to 'gcc/fortran/dump-parse-tree.cc')
0 files changed, 0 insertions, 0 deletions