aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.h
diff options
context:
space:
mode:
authorXi Ruoyao <xry111@xry111.site>2024-02-25 20:44:34 +0800
committerXi Ruoyao <xry111@xry111.site>2024-02-29 14:48:18 +0800
commitaab1c5dcd23f014f39b127f74aecd04913945a7f (patch)
tree947c8edc3cebee9760d227ecc9f00d36fd456af2 /gcc/function.h
parentc556ea076dcbfe2a3059dd0ad2e06a0b1d1fa89b (diff)
downloadgcc-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