aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-stmts.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2020-09-09 12:05:55 +0200
committerRichard Biener <rguenther@suse.de>2020-09-09 13:12:27 +0200
commitdb918db2c305adf8ba727a5981a684c19de1510e (patch)
tree6d190ab13a33e107aec4966aa9eec1a5f54a6cd1 /gcc/tree-vect-stmts.c
parentcbc12c582462c720adccef5097b3162cc77c37a2 (diff)
downloadgcc-db918db2c305adf8ba727a5981a684c19de1510e.zip
gcc-db918db2c305adf8ba727a5981a684c19de1510e.tar.gz
gcc-db918db2c305adf8ba727a5981a684c19de1510e.tar.bz2
enable live comparison vectorization
This removes a check preventing vectorization of live results of vectorized comparisons. I tested it with AVX512 mask registers (inspecting assembly) and traditional vector masks. 2020-09-09 Richard Biener <rguenther@suse.de> * tree-vect-stmts.c (vectorizable_comparison): Allow STMT_VINFO_LIVE_P stmts. * gcc.dg/vect/vect-live-6.c: New testcase.
Diffstat (limited to 'gcc/tree-vect-stmts.c')
-rw-r--r--gcc/tree-vect-stmts.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index e069f87..191957c 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -10319,14 +10319,6 @@ vectorizable_comparison (vec_info *vinfo,
if (STMT_VINFO_DEF_TYPE (stmt_info) != vect_internal_def)
return false;
- if (loop_vinfo && STMT_VINFO_LIVE_P (stmt_info))
- {
- if (dump_enabled_p ())
- dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
- "value used after loop.\n");
- return false;
- }
-
gassign *stmt = dyn_cast <gassign *> (stmt_info->stmt);
if (!stmt)
return false;