aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/utils.cc
diff options
context:
space:
mode:
authorLi Wei <liwei@loongson.cn>2023-11-28 15:38:37 +0800
committerLulu Cheng <chenglulu@loongson.cn>2023-12-02 16:49:44 +0800
commita68ae55883113c10320b164738eebadaf08df5b0 (patch)
tree52dd9e8eac212b64d630182653e6368d4f076968 /gcc/ada/gcc-interface/utils.cc
parentccc77027576ca7591766557a350b7917a62c8c5f (diff)
downloadgcc-a68ae55883113c10320b164738eebadaf08df5b0.zip
gcc-a68ae55883113c10320b164738eebadaf08df5b0.tar.gz
gcc-a68ae55883113c10320b164738eebadaf08df5b0.tar.bz2
LoongArch: Accelerate optimization of scalar signed/unsigned popcount.
In LoongArch, the vector popcount has corresponding instructions, while the scalar does not. Currently, the scalar popcount is calculated through a loop, and the value of a non-power of two needs to be iterated several times, so the vector popcount instruction is considered for optimization. gcc/ChangeLog: * config/loongarch/loongarch.md (v2di): Used to simplify the following templates. (popcount<mode>2): New. gcc/testsuite/ChangeLog: * gcc.target/loongarch/popcnt.c: New test. * gcc.target/loongarch/popcount.c: New test.
Diffstat (limited to 'gcc/ada/gcc-interface/utils.cc')
0 files changed, 0 insertions, 0 deletions