aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2019-08-15 09:23:06 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2019-08-15 09:23:06 +0000
commiteb2211e35713796c5899939d983d9e8c6d037e60 (patch)
treed261860976df9e6e19568c432c5df066059cac81
parent5c38705dbde776f68bf1f99a71657d0e21b772a5 (diff)
downloadgcc-eb2211e35713796c5899939d983d9e8c6d037e60.zip
gcc-eb2211e35713796c5899939d983d9e8c6d037e60.tar.gz
gcc-eb2211e35713796c5899939d983d9e8c6d037e60.tar.bz2
Add missing check for BUILT_IN_MD (PR 91444)
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. 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. From-SVN: r274524
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/tree-vect-stmts.c2
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 12c8dcd..ae7d49c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,12 @@
2019-08-15 Richard Sandiford <richard.sandiford@arm.com>
+ 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.
+
+2019-08-15 Richard Sandiford <richard.sandiford@arm.com>
+
* config/aarch64/aarch64-protos.h (aarch64_sve_mode_p): Declare.
* config/aarch64/aarch64.c (aarch64_sve_mode_p): New function.
(aarch64_select_early_remat_modes): Use it.
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index 1e2dfe5..dd9d45a 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -3376,7 +3376,7 @@ vectorizable_call (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi,
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);
}