diff options
author | Tamar Christina <tamar.christina@arm.com> | 2021-11-10 15:58:15 +0000 |
---|---|---|
committer | Tamar Christina <tamar.christina@arm.com> | 2021-11-10 15:58:15 +0000 |
commit | 8ed62c929c7c44627f41627e085e15d77b2e6ed4 (patch) | |
tree | 42dc3f70824bc9c9643bdbcb9826d1857972a15b /gcc/tree-vectorizer.h | |
parent | eaec20fde587e0695b100dcba5ff56944c3ae8c0 (diff) | |
download | gcc-8ed62c929c7c44627f41627e085e15d77b2e6ed4.zip gcc-8ed62c929c7c44627f41627e085e15d77b2e6ed4.tar.gz gcc-8ed62c929c7c44627f41627e085e15d77b2e6ed4.tar.bz2 |
middle-end: Add an RPO pass after successful vectorization
Following my current SVE predicate optimization series a problem has presented
itself in that the way vector masks are generated for masked operations relies
on CSE to share masks efficiently.
The issue however is that masking is done using the & operand and & is
associative and so reassoc decides to reassociate the masked operations.
This makes CSE then unable to CSE an unmasked and a masked operation leading to
duplicate operations being performed.
To counter this we want to add an RPO pass over the vectorized loop body when
vectorization succeeds. This makes it then no longer reliant on the RTL level
CSE.
I have not added a testcase for this as it requires the changes in my patch
series, however the entire series relies on this patch to work so all the
tests there cover it.
gcc/ChangeLog:
* tree-vectorizer.c (vectorize_loops): Do local CSE through RPVN upon
successful vectorization.
Diffstat (limited to 'gcc/tree-vectorizer.h')
0 files changed, 0 insertions, 0 deletions