-
- Downloads
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.
Please register or sign in to comment