diff options
author | Xi Ruoyao <xry111@xry111.site> | 2024-02-25 20:44:34 +0800 |
---|---|---|
committer | Xi Ruoyao <xry111@xry111.site> | 2024-02-29 14:48:18 +0800 |
commit | aab1c5dcd23f014f39b127f74aecd04913945a7f (patch) | |
tree | 947c8edc3cebee9760d227ecc9f00d36fd456af2 /gcc/function.h | |
parent | c556ea076dcbfe2a3059dd0ad2e06a0b1d1fa89b (diff) | |
download | gcc-aab1c5dcd23f014f39b127f74aecd04913945a7f.zip gcc-aab1c5dcd23f014f39b127f74aecd04913945a7f.tar.gz gcc-aab1c5dcd23f014f39b127f74aecd04913945a7f.tar.bz2 |
LoongArch: Remove unneeded sign extension after crc/crcc instructions
The specification of crc/crcc instructions is clear that the output is
sign-extended to GRLEN. Add a define_insn to tell the compiler this
fact and allow it to remove the unneeded sign extension on crc/crcc
output. As crc/crcc instructions are usually used in a tight loop,
this should produce a significant performance gain.
gcc/ChangeLog:
* config/loongarch/loongarch.md
(loongarch_<crc>_w_<size>_w_extended): New define_insn.
gcc/testsuite/ChangeLog:
* gcc.target/loongarch/crc-sext.c: New test;
Diffstat (limited to 'gcc/function.h')
0 files changed, 0 insertions, 0 deletions