public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] tree-optimization/107956 - ICE with NULL call LHS
@ 2022-12-05  8:11 rguenther
  0 siblings, 0 replies; only message in thread
From: rguenther @ 2022-12-05  8:11 UTC (permalink / raw)
  To: gcc-patches

The following adds a missing check for a NULL call LHS in the
vector pattern recognizer.

Pushed as obvious.

	PR tree-optimization/107956
	* tree-vect-patterns.cc (vect_recog_mask_conversion_pattern):
	Check for NULL LHS on masked loads.
---
 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));
 	}
 
-- 
2.35.3

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

only message in thread, other threads:[~2022-12-05  8:11 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:11 [PATCH] tree-optimization/107956 - ICE with NULL call LHS rguenther

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