diff options
author | Jakub Jelinek <jakub@redhat.com> | 2023-04-18 11:01:47 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2023-04-18 11:01:47 +0200 |
commit | 2349e69125335d4c8c5e43cf3643844519d154c3 (patch) | |
tree | bff999304803056bbc2d8174fa1a95715438ec3e /gcc/value-range.h | |
parent | 6e552ec218a04dac046066e2608202ba90d66f11 (diff) | |
download | gcc-2349e69125335d4c8c5e43cf3643844519d154c3.zip gcc-2349e69125335d4c8c5e43cf3643844519d154c3.tar.gz gcc-2349e69125335d4c8c5e43cf3643844519d154c3.tar.bz2 |
match.pd: Improve fneg/fadd optimization [PR109240]
match.pd has mostly for AArch64 an optimization in which it optimizes
certain forms of __builtin_shuffle of x + y and x - y vectors into
fneg using twice as wide element type so that every other sign is changed,
followed by fadd.
The following patch extends that optimization, so that it can handle
other forms as well, using the same fneg but fsub instead of fadd.
As the plus is commutative and minus is not and I want to handle
vec_perm with plus minus and minus plus order preferrably in one
pattern, I had to do the matching operand checks by hand.
2023-04-18 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/109240
* match.pd (fneg/fadd): Rewrite such that it handles both plus as
first vec_perm operand and minus as second using fneg/fadd and
minus as first vec_perm operand and plus as second using fneg/fsub.
* gcc.target/aarch64/simd/addsub_2.c: New test.
* gcc.target/aarch64/sve/addsub_2.c: New test.
Diffstat (limited to 'gcc/value-range.h')
0 files changed, 0 insertions, 0 deletions