public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-8959] tree-optimization/107956 - ICE with NULL call LHS
@ 2022-12-05  8:14 Richard Biener
  0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2022-12-05  8:14 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:16debfadbd759f9933b4a62029661f01188ad928

commit r12-8959-g16debfadbd759f9933b4a62029661f01188ad928
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.
    
    (cherry picked from commit 5c11d748564c7ce3b096e87ad350fcddd493e45e)

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 217bdfd7045..6c157b93eb1 100644
--- a/gcc/tree-vect-patterns.cc
+++ b/gcc/tree-vect-patterns.cc
@@ -4603,6 +4603,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));
 	}

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-12-05  8:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-05  8:14 [gcc r12-8959] tree-optimization/107956 - ICE with NULL call LHS Richard Biener

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