diff options
author | Kewen Lin <linkw@linux.ibm.com> | 2022-10-20 04:07:05 -0500 |
---|---|---|
committer | Kewen Lin <linkw@linux.ibm.com> | 2022-10-20 04:07:05 -0500 |
commit | 5d6e834ecf212e7fc6f585b154af224d2e38c749 (patch) | |
tree | 8a23370287fca9406da255f2286fef241f3dc0f8 /gcc/c/gimple-parser.cc | |
parent | a2e28389354495a532eb4b7124106b21236f4f72 (diff) | |
download | gcc-5d6e834ecf212e7fc6f585b154af224d2e38c749.zip gcc-5d6e834ecf212e7fc6f585b154af224d2e38c749.tar.gz gcc-5d6e834ecf212e7fc6f585b154af224d2e38c749.tar.bz2 |
vect: Simplify first for shifted value generation [PR107240]
As PR107240 shows, when both the value to be shifted and the
count used for shifting are constants, it can be simplified
to one constant value, and doesn't actually require to check
if the current target supports vector shift operations or not.
This patch uses a canonical way proposed by Richi to generate
the shifted value, if it can be simplified, the shift operation
would be gone, otherwise it's the same as before.
It can help to fix the failures of vect-bitfield-write-{2,3}.c
on Power.
PR tree-optimization/107240
2022-10-20 Richard Biener <rguenther@suse.de>
gcc/ChangeLog:
* tree-vect-patterns.cc (vect_recog_bit_insert_pattern): Attempt to
simplify shifted value first.
Diffstat (limited to 'gcc/c/gimple-parser.cc')
0 files changed, 0 insertions, 0 deletions