public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Richard Biener <rguenth@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r13-4489] tree-optimization/107956 - ICE with NULL call LHS
Date: Mon,  5 Dec 2022 08:12:40 +0000 (GMT)	[thread overview]
Message-ID: <20221205081240.07084389366A@sourceware.org> (raw)

https://gcc.gnu.org/g:5c11d748564c7ce3b096e87ad350fcddd493e45e

commit r13-4489-g5c11d748564c7ce3b096e87ad350fcddd493e45e
Author: Andrew Pinski <pinskia@gmail.com>
Date:   Mon Dec 5 09:09:52 2022 +0100

    tree-optimization/107956 - ICE with NULL call LHS
    
    The following adds a missing check for a NULL call LHS in the
    vector pattern recognizer.
    
            PR tree-optimization/107956
            * tree-vect-patterns.cc (vect_recog_mask_conversion_pattern):
            Check for NULL LHS on masked loads.

Diff:
---
 gcc/tree-vect-patterns.cc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gcc/tree-vect-patterns.cc b/gcc/tree-vect-patterns.cc
index f6c34bb3263..d9fdb24ee62 100644
--- a/gcc/tree-vect-patterns.cc
+++ b/gcc/tree-vect-patterns.cc
@@ -4964,6 +4964,8 @@ vect_recog_mask_conversion_pattern (vec_info *vinfo,
       else
 	{
 	  lhs = gimple_call_lhs (last_stmt);
+	  if (!lhs)
+	    return NULL;
 	  vectype1 = get_vectype_for_scalar_type (vinfo, TREE_TYPE (lhs));
 	}

                 reply	other threads:[~2022-12-05  8:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20221205081240.07084389366A@sourceware.org \
    --to=rguenth@gcc.gnu.org \
    --cc=gcc-cvs@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).