[Bug rtl-optimization/53652] *andn* isn't used for vectorization

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jul 19 08:45:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53652

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |segher at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Ran into this again in context of PR91204, there is another case that isn't
matched for a different reason:
int a, b, c[64];

void
foo (void)
{
  int i;
  for (i = 0; i < 64; i++)
    c[i] = ~c[i] & b;
}
In this case the loop has been unrolled and combiner even tries to match
(set (reg:V4SI 137 [ vect__4.8 ])
    (and:V4SI (not:V4SI (mem/c:V4SI (symbol_ref:DI ("c") [flags 0x2]  <var_decl
0x7f4a11107bd0 c>) [1 MEM <vector(4) int> [(int *)&c]+0 S16 A128]))
        (reg:V4SI 132)))
but doesn't match that as memory operand is not allowed in the andnot patterns
(perhaps it should and we should just wait for reload to cure it up).


More information about the Gcc-bugs mailing list