public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Add missing check for BUILT_IN_MD (PR 91444)
@ 2019-08-15 10:40 Richard Sandiford
  0 siblings, 0 replies; only message in thread
From: Richard Sandiford @ 2019-08-15 10:40 UTC (permalink / raw)
  To: gcc-patches

In this PR we were passing an ordinary non-built-in function to
targetm.vectorize.builtin_md_vectorized_function, which is only
supposed to handle BUILT_IN_MD.

Tested on aarch64-linux-gnu and spot-checked on powerpc64el-linux-gnu.
Applied as obvious (r274524).

Richard


2019-08-15  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
	PR middle-end/91444
	* tree-vect-stmts.c (vectorizable_call): Check that the function
	is a BUILT_IN_MD function before passing it to
	targetm.vectorize.builtin_md_vectorized_function.

Index: gcc/tree-vect-stmts.c
===================================================================
--- gcc/tree-vect-stmts.c	2019-08-05 17:46:43.029559672 +0100
+++ gcc/tree-vect-stmts.c	2019-08-15 10:22:47.468694552 +0100
@@ -3376,7 +3376,7 @@ vectorizable_call (stmt_vec_info stmt_in
       if (cfn != CFN_LAST)
 	fndecl = targetm.vectorize.builtin_vectorized_function
 	  (cfn, vectype_out, vectype_in);
-      else if (callee)
+      else if (callee && fndecl_built_in_p (callee, BUILT_IN_MD))
 	fndecl = targetm.vectorize.builtin_md_vectorized_function
 	  (callee, vectype_out, vectype_in);
     }

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

only message in thread, other threads:[~2019-08-15  9:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-15 10:40 Add missing check for BUILT_IN_MD (PR 91444) Richard Sandiford

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