public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/51356] [4.7 Regression] FAIL: gfortran.dg/anyallcount_1.f90  -O3  (internal compiler error) on powerpc-apple-darwin9 with -m32
Date: Wed, 30 Nov 2011 18:19:00 -0000	[thread overview]
Message-ID: <bug-51356-4-lwE1mo7KMd@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-51356-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-11-30 17:28:47 UTC ---
Created attachment 25956
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25956
gcc47-pr51356.patch

The problem is that PowerPC returns a TImode vector from
get_vectype_for_scalar_type of DImode boolean/integer type.
vect_recog_bool_pattern sees a store of a DImode boolean, attempts to optimize
it but doesn't just create the pattern stmts etc., but also already changes
DR_STMT.  Later on in vect_pattern_recog_1
if (VECTOR_MODE_P (TYPE_MODE (type_in)))
is unfortunately not true (while type_in is a vector, it doesn't have vector
mode) and thus the caller thinks type_in is a scalar type, but
get_vectype_for_scalar_type on it fails, therefore vect_mark_pattern_stmts
isn't called, yet DR_STMT has been already adjusted.

This patch fixes it by giving up in that case already in
vect_recog_bool_pattern.  Alternative would be to check for VECTOR_TYPE in
vect_pattern_recog_1 instead of testing for vector mode?  Not sure how useful
that would be though, I doubt we could actually vectorize it anyway.


  parent reply	other threads:[~2011-11-30 17:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-30 15:24 [Bug tree-optimization/51356] New: " dominiq at lps dot ens.fr
2011-11-30 17:29 ` [Bug tree-optimization/51356] " jakub at gcc dot gnu.org
2011-11-30 18:19 ` jakub at gcc dot gnu.org [this message]
2011-12-01  8:32 ` iains at gcc dot gnu.org
2011-12-01 14:57 ` dominiq at lps dot ens.fr
2011-12-01 19:15 ` jakub at gcc dot gnu.org
2011-12-01 19:18 ` jakub at gcc dot gnu.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=bug-51356-4-lwE1mo7KMd@http.gcc.gnu.org/bugzilla/ \
    --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).