aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/class.cc
diff options
context:
space:
mode:
authorLin Sinan <sinan.lin@linux.alibaba.com>2023-03-05 16:09:50 +0800
committerKito Cheng <kito.cheng@sifive.com>2023-03-05 16:59:16 +0800
commit602cfc746e9e0447221896a3d93608c6db3a89e5 (patch)
tree4dabfecbd076403b5e8c639b06f750a2f1cbb766 /gcc/fortran/class.cc
parent9debb240a4b1a711c0648fd9e4385dbde5ad45fd (diff)
downloadgcc-602cfc746e9e0447221896a3d93608c6db3a89e5.zip
gcc-602cfc746e9e0447221896a3d93608c6db3a89e5.tar.gz
gcc-602cfc746e9e0447221896a3d93608c6db3a89e5.tar.bz2
RISC-V: Allow const0_rtx operand in max/min
Optimize cases that use max[u]/min[u] against a zero constant. E.g., the case int f(int x) { return x >= 0 ? x : 0; } the current asm output in rv64gc_zba_zbb li rtmp,0 max a0,a0,rtmp could be optimized into max a0,a0,zero gcc/ChangeLog: * config/riscv/bitmanip.md: allow 0 constant in max/min pattern. gcc/testsuite/ChangeLog: * gcc.target/riscv/zbb-min-max-03.c: New test.
Diffstat (limited to 'gcc/fortran/class.cc')
0 files changed, 0 insertions, 0 deletions