aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/gfortran.map
diff options
context:
space:
mode:
authorJeff Law <jlaw@ventanamicro.com>2024-10-07 11:49:21 -0600
committerJeff Law <jlaw@ventanamicro.com>2024-10-07 11:51:52 -0600
commita2a956cf26e645bfddbc0b743b97472e298c7a8c (patch)
tree24acaa09c10e467f4c6923864c949721e30e0a53 /libgfortran/gfortran.map
parent9a17e6d03c6ed53e3b2dfd2c3ff9b1066ffa97b9 (diff)
downloadgcc-a2a956cf26e645bfddbc0b743b97472e298c7a8c.zip
gcc-a2a956cf26e645bfddbc0b743b97472e298c7a8c.tar.gz
gcc-a2a956cf26e645bfddbc0b743b97472e298c7a8c.tar.bz2
[RISC-V] Add splitters to restore condops generation after recent phiopt changes
V2: Fix typo in ChangeLog. Remove now extraneous comment in cset-sext.c. Throttle back branch cost to 1 in various tests -- Andrew P's recent improvements to phiopt regressed on the riscv testsuite. Essentially the new code presented to the RTL optimizers is straightline code rather than branchy for the CE pass to analyze and optimize. In the absence of conditional move support or sfb, the new code would be better. Unfortunately the presented form isn't a great fit for xventanacondops, zicond or xtheadcondmov. The net is the resulting code is actually slightly worse than before. Essentially sne+czero turned into sne+sne+and. Thankfully, combine is presented with (and (ne (op1) (const_int 0)) (ne (op2) (const_int 0))) As the RHS of a set. We can use a 3->2 splitter to guide combine on how to profitably rewrite the sequence in a form suitable for condops. Just splitting that would be enough to fix the regression, but I'm fairly confident that other cases need to be handled and would have regressed had the testsuite been more thorough. One arm of the AND is going to turn into an sCC instruction. We have a variety of those that we support. The codes vary as do the allowed operands of the sCC. That produces a set of new splitters to handle those cases. The other arm is going to turn into a czero (or similar) instruction. That one can be generalized to eq/ne. So another set for that generalization. We can remove a couple of XFAILs in the rv32 space as it's behaving much more like rv64 at this point. For SFB targets it's unclear if the new code is better or worse. In both cases it's a 3 instruction sequence. So I just adjusted the test. If the new code is worse for SFB, someone with an understanding of the tradeoffs for an SFB target will need to make adjustments. Tested in my tester on rv64gcv and rv32gc. Will wait for the pre-commit testers to render their verdict before moving forward. gcc/ * config/riscv/iterators.md (scc_0): New code iterator. * config/riscv/zicond.md: New splitters to improve code generated for cases like (and (scc) (scc)) for zicond, xventanacondops, xtheadcondmov. gcc/testsuite/ * gcc.target/riscv/cset-sext-sfb.c: Turn off ssa-phiopt. * gcc.target/riscv/cset-sext-thead.c: Do not check CE output anymore. * gcc.target/riscv/cset-sext-ventana.c: Similarly. Adjust branch cost. * gcc.target/riscv/cset-sext-zicond.c: Similarly. * gcc.target/riscv/cset-sext.c: Similarly. No longer allow "neg" in asm output.
Diffstat (limited to 'libgfortran/gfortran.map')
0 files changed, 0 insertions, 0 deletions