aboutsummaryrefslogtreecommitdiff
path: root/contrib/gcc-changelog/git_email.py
diff options
context:
space:
mode:
authorXi Ruoyao <xry111@xry111.site>2023-09-05 19:42:30 +0800
committerXi Ruoyao <xry111@xry111.site>2023-09-07 15:53:25 +0800
commit5b857e87201335148f23ec7134cf7fbf97c04c72 (patch)
tree84206204a94fa7a479dced08c34df28705cf8dc5 /contrib/gcc-changelog/git_email.py
parentb1ca841b8972e546570553df3e61326c86135404 (diff)
downloadgcc-5b857e87201335148f23ec7134cf7fbf97c04c72.zip
gcc-5b857e87201335148f23ec7134cf7fbf97c04c72.tar.gz
gcc-5b857e87201335148f23ec7134cf7fbf97c04c72.tar.bz2
LoongArch: Use bstrins instruction for (a & ~mask) and (a & mask) | (b & ~mask) [PR111252]
If mask is a constant with value ((1 << N) - 1) << M we can perform this optimization. gcc/ChangeLog: PR target/111252 * config/loongarch/loongarch-protos.h (loongarch_pre_reload_split): Declare new function. (loongarch_use_bstrins_for_ior_with_mask): Likewise. * config/loongarch/loongarch.cc (loongarch_pre_reload_split): Implement. (loongarch_use_bstrins_for_ior_with_mask): Likewise. * config/loongarch/predicates.md (ins_zero_bitmask_operand): New predicate. * config/loongarch/loongarch.md (bstrins_<mode>_for_mask): New define_insn_and_split. (bstrins_<mode>_for_ior_mask): Likewise. (define_peephole2): Further optimize code sequence produced by bstrins_<mode>_for_ior_mask if possible. gcc/testsuite/ChangeLog: * g++.target/loongarch/bstrins-compile.C: New test. * g++.target/loongarch/bstrins-run.C: New test.
Diffstat (limited to 'contrib/gcc-changelog/git_email.py')
0 files changed, 0 insertions, 0 deletions