public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/38968] Complex matrix product is not vectorized
Date: Mon, 26 Jan 2009 11:15:00 -0000	[thread overview]
Message-ID: <20090126111524.24296.qmail@sourceware.org> (raw)
In-Reply-To: <bug-38968-12313@http.gcc.gnu.org/bugzilla/>



------- 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


  parent reply	other threads:[~2009-01-26 11:15 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-25 16:52 [Bug middle-end/38968] New: " dominiq at lps dot ens dot fr
2009-01-25 17:33 ` [Bug tree-optimization/38968] " rguenth at gcc dot gnu dot org
2009-01-26 11:15 ` rguenth at gcc dot gnu dot org [this message]
2009-01-26 13:10 ` irar at il dot ibm dot com
2009-01-26 13:25 ` rguenth at gcc dot gnu dot org
2009-01-26 14:21 ` howarth at nitro dot med dot uc dot edu
2009-01-26 14:23 ` rguenther at suse dot de
2009-02-01 10:37 ` dominiq at lps dot ens dot fr
2009-02-01 10:49 ` rguenth at gcc dot gnu dot org
2009-02-01 10:58 ` dominiq at lps dot ens dot fr
2009-02-01 11:11 ` rguenther at suse dot de
2009-03-28 10:05 ` rguenth at gcc dot gnu dot org
2009-03-28 10:06 ` rguenth at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090126111524.24296.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).