aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-array.cc
diff options
context:
space:
mode:
authorGuo Jie <guojie@loongson.cn>2024-12-30 10:39:13 +0800
committerLulu Cheng <chenglulu@loongson.cn>2025-01-02 11:24:42 +0800
commitd55d40afd42a280c80729b538e3cce994f20961d (patch)
treec8c87f15773d2796dec43f6815345b3c22bcc98a /gcc/fortran/trans-array.cc
parentea7476516dbd600b09ab1f05f4ed977c1cc7bb95 (diff)
downloadgcc-d55d40afd42a280c80729b538e3cce994f20961d.zip
gcc-d55d40afd42a280c80729b538e3cce994f20961d.tar.gz
gcc-d55d40afd42a280c80729b538e3cce994f20961d.tar.bz2
LoongArch: Optimize for conditional move operations
The optimization example is as follows. From: if (condition) dest += 1 << 16; To: dest += (condition ? 1 : 0) << 16; It does not use maskeqz and masknez, thus reducing the number of instructions. gcc/ChangeLog: * config/loongarch/loongarch.cc (loongarch_expand_conditional_move): Add some optimization implementations based on noce_try_cmove_arith. gcc/testsuite/ChangeLog: * gcc.target/loongarch/conditional-move-opt-1.c: New test. * gcc.target/loongarch/conditional-move-opt-2.c: New test.
Diffstat (limited to 'gcc/fortran/trans-array.cc')
0 files changed, 0 insertions, 0 deletions