aboutsummaryrefslogtreecommitdiff
path: root/libcpp/init.cc
diff options
context:
space:
mode:
authorJivan Hakobyan <jivanhakobyan9@gmail.com>2023-04-28 09:09:45 -0600
committerJeff Law <jlaw@ventanamicro>2023-04-28 09:09:45 -0600
commit1966741378d5f456d0245960fa09074b6320b4d6 (patch)
treef1d916f91ce27b53335612a37c392878da90432b /libcpp/init.cc
parentdb7e7776b0f5ac2a0e803b197f7b2b8a35f14d8a (diff)
downloadgcc-1966741378d5f456d0245960fa09074b6320b4d6.zip
gcc-1966741378d5f456d0245960fa09074b6320b4d6.tar.gz
gcc-1966741378d5f456d0245960fa09074b6320b4d6.tar.bz2
RISC-V: Eliminate redundant zero extension of minu/maxu operands
RV64 the following code: unsigned Min(unsigned a, unsigned b) { return a < b ? a : b; } Compiles to: Min: zext.w a1,a1 zext.w a0,a0 minu a0,a1,a0 sext.w a0,a0 ret This patch removes unnecessary zero extensions of minu/maxu operands. gcc/ChangeLog: * config/riscv/bitmanip.md: Added expanders for minu/maxu instructions gcc/testsuite/ChangeLog: * gcc.target/riscv/zbb-min-max-02.c: Updated scanning check. * gcc.target/riscv/zbb-min-max-03.c: New tests.
Diffstat (limited to 'libcpp/init.cc')
0 files changed, 0 insertions, 0 deletions