diff options
author | Richard Biener <rguenther@suse.de> | 2024-01-11 14:00:33 +0100 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2024-01-11 15:08:03 +0100 |
commit | ec345df53556ec581590347f71c3d9ff3cdbca76 (patch) | |
tree | 760152168f93e40db7231a262e06a61cfee31131 /gcc/tree-vect-loop.cc | |
parent | 897b95a12b7fe549ec2cb8ef3a3f0e4fbabf9737 (diff) | |
download | gcc-ec345df53556ec581590347f71c3d9ff3cdbca76.zip gcc-ec345df53556ec581590347f71c3d9ff3cdbca76.tar.gz gcc-ec345df53556ec581590347f71c3d9ff3cdbca76.tar.bz2 |
tree-optimization/112505 - bit-precision induction vectorization
Vectorization of bit-precision inductions isn't implemented but we
don't check this, instead we ICE during transform.
PR tree-optimization/112505
* tree-vect-loop.cc (vectorizable_induction): Reject
bit-precision induction.
* gcc.dg/vect/pr112505.c: New testcase.
Diffstat (limited to 'gcc/tree-vect-loop.cc')
-rw-r--r-- | gcc/tree-vect-loop.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc index 1bdad0f..38bd826 100644 --- a/gcc/tree-vect-loop.cc +++ b/gcc/tree-vect-loop.cc @@ -10037,6 +10037,15 @@ vectorizable_induction (loop_vec_info loop_vinfo, step_expr = STMT_VINFO_LOOP_PHI_EVOLUTION_PART (stmt_info); gcc_assert (step_expr != NULL_TREE); + if (INTEGRAL_TYPE_P (TREE_TYPE (step_expr)) + && !type_has_mode_precision_p (TREE_TYPE (step_expr))) + { + if (dump_enabled_p ()) + dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, + "bit-precision induction vectorization not " + "supported.\n"); + return false; + } tree step_vectype = get_same_sized_vectype (TREE_TYPE (step_expr), vectype); /* Check for backend support of PLUS/MINUS_EXPR. */ |