diff options
author | Xi Ruoyao <xry111@xry111.site> | 2024-06-09 14:43:48 +0800 |
---|---|---|
committer | Xi Ruoyao <xry111@xry111.site> | 2024-06-12 20:38:41 +0800 |
commit | d0da347a1dd6e57cb0e0c55fd654d81dde545cf8 (patch) | |
tree | 300ab3ffe38b3d59909f105a498750978d094e9d /gcc/tree-vect-loop.cc | |
parent | 53c703888eb51314f762c8998dc9215871b12722 (diff) | |
download | gcc-d0da347a1dd6e57cb0e0c55fd654d81dde545cf8.zip gcc-d0da347a1dd6e57cb0e0c55fd654d81dde545cf8.tar.gz gcc-d0da347a1dd6e57cb0e0c55fd654d81dde545cf8.tar.bz2 |
LoongArch: Use bstrins for "value & (-1u << const)"
A move/bstrins pair is as fast as a (addi.w|lu12i.w|lu32i.d|lu52i.d)/and
pair, and twice fast as a srli/slli pair. When the src reg and the dst
reg happens to be the same, the move instruction can be optimized away.
gcc/ChangeLog:
* config/loongarch/predicates.md (high_bitmask_operand): New
predicate.
* config/loongarch/constraints.md (Yy): New constriant.
* config/loongarch/loongarch.md (and<mode>3_align): New
define_insn_and_split.
gcc/testsuite/ChangeLog:
* gcc.target/loongarch/bstrins-1.c: New test.
* gcc.target/loongarch/bstrins-2.c: New test.
Diffstat (limited to 'gcc/tree-vect-loop.cc')
0 files changed, 0 insertions, 0 deletions