public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ktkachov at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/64829] [ARM] ICE at -O3 in vect_get_vec_def_for_stmt_copy
Date: Wed, 28 Jan 2015 14:21:00 -0000	[thread overview]
Message-ID: <bug-64829-4-TqePatZCNi@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-64829-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #7 from ktkachov at gcc dot gnu.org ---

> 
> Index: gcc/tree-vect-patterns.c
> ===================================================================
> --- gcc/tree-vect-patterns.c    (revision 220205)
> +++ gcc/tree-vect-patterns.c    (working copy)
> @@ -1732,9 +1732,11 @@ vect_recog_widen_shift_pattern (vec<gimp
>    if (TREE_CODE (oprnd0) != SSA_NAME || TREE_CODE (oprnd1) != INTEGER_CST)
>      return NULL;
>  
> -  /* Check operand 0: it has to be defined by a type promotion.  */
> -  if (!type_conversion_p (oprnd0, last_stmt, false, &half_type0, &def_stmt0,
> -                          &promotion)
> +  /* Check operand 0: it has to be defined by a type promotion and it
> +     should be only used by the shift.  */
> +  if (!has_single_use (oprnd0)
> +      || !type_conversion_p (oprnd0, last_stmt, false, &half_type0,
> &def_stmt0,
> +                            &promotion)
>        || !promotion)
>       return NULL;

That fixes the ICE in the testcase for me.
I'll give it a test on arm-none-eabi and an arm bootstrap


  parent reply	other threads:[~2015-01-28 14:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-28  9:54 [Bug target/64829] New: " clyon at gcc dot gnu.org
2015-01-28  9:56 ` [Bug target/64829] " clyon at gcc dot gnu.org
2015-01-28 10:14 ` ktkachov at gcc dot gnu.org
2015-01-28 12:20 ` [Bug tree-optimization/64829] " rguenth at gcc dot gnu.org
2015-01-28 14:06 ` rguenth at gcc dot gnu.org
2015-01-28 14:21 ` ktkachov at gcc dot gnu.org [this message]
2015-01-30  9:23 ` rguenth at gcc dot gnu.org
2015-01-30  9:27 ` rguenth 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-64829-4-TqePatZCNi@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).