This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/38968] Complex matrix product is not vectorized



------- Comment #2 from rguenth at gcc dot gnu dot org  2009-01-26 11:15 -------
This happens because ivcanon introduces an induction variable that counts
from 2000 to 1.  This "confuses" data-ref analysis and we get

        base_address: a_24(D)
        offset from base address: (<unnamed-signed:64>)
((<unnamed-unsigned:64>) pretmp.28_148 * 16000)
        constant offset from base address: -15996
        step: 8
        aligned to: 128
        base_object: IMAGPART_EXPR <(*a_24(D))[0]>
        symbol tag: SMT.12

notice the negative constant offset from base address.  This in turn
confuses the vectorizer alignment analysis - but only because the alignment
of the base object is known.  We hit (with misalign == -15996, alignment == 16)

  /* Modulo alignment.  */
  misalign = size_binop (TRUNC_MOD_EXPR, misalign, alignment);

  if (!host_integerp (misalign, 1))
    {
      /* Negative or overflowed misalignment value.  */
      if (vect_print_dump_info (REPORT_DETAILS))
        fprintf (vect_dump, "unexpected misalign value");
      return false;
    }

and the modulo is -12.

Now, I wonder why we do not just use alignment + misalign in that case.

I have a patch.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |rguenth at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2009-01-25 17:33:10         |2009-01-26 11:15:23
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38968


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]