diff options
author | Takayuki 'January June' Suwa <jjsuwa_sys3175@yahoo.co.jp> | 2022-06-14 01:28:43 +0900 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2022-06-13 17:25:48 -0700 |
commit | 077438933cf94f00cc5edf974338c11ba4bf7a39 (patch) | |
tree | 3aaa6644fecdbe2930ae77cfe889f41fa938acc1 /gcc/tree-vect-patterns.cc | |
parent | 70ce04ca353bb0cda8321b91a77c2477e26d339b (diff) | |
download | gcc-077438933cf94f00cc5edf974338c11ba4bf7a39.zip gcc-077438933cf94f00cc5edf974338c11ba4bf7a39.tar.gz gcc-077438933cf94f00cc5edf974338c11ba4bf7a39.tar.bz2 |
xtensa: Optimize bitwise AND operation with some specific forms of constants
This patch offers several insn-and-split patterns for bitwise AND with
register and constant that can be represented as:
i. 1's least significant N bits and the others 0's (17 <= N <= 31)
ii. 1's most significant N bits and the others 0's (12 <= N <= 31)
iii. M 1's sequence of bits and trailing N 0's bits, that cannot fit into a
"MOVI Ax, simm12" instruction (1 <= M <= 16, 1 <= N <= 30)
And also offers shortcuts for conditional branch if each of the abovementioned
operations is (not) equal to zero.
gcc/ChangeLog:
* config/xtensa/predicates.md (shifted_mask_operand):
New predicate.
* config/xtensa/xtensa.md (*andsi3_const_pow2_minus_one):
New insn-and-split pattern.
(*andsi3_const_negative_pow2, *andsi3_const_shifted_mask,
*masktrue_const_pow2_minus_one, *masktrue_const_negative_pow2,
*masktrue_const_shifted_mask): Ditto.
Diffstat (limited to 'gcc/tree-vect-patterns.cc')
0 files changed, 0 insertions, 0 deletions