aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-patterns.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2019-10-21 06:40:41 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2019-10-21 06:40:41 +0000
commita5c3185a503fbdbc1bf05efe8ab9d12850a211c1 (patch)
tree383672aa374f933c27f605ea79951260df11ca8e /gcc/tree-vect-patterns.c
parentda157e2ee9e12348df78246ee33b244b7cc334df (diff)
downloadgcc-a5c3185a503fbdbc1bf05efe8ab9d12850a211c1.zip
gcc-a5c3185a503fbdbc1bf05efe8ab9d12850a211c1.tar.gz
gcc-a5c3185a503fbdbc1bf05efe8ab9d12850a211c1.tar.bz2
Pass a vec_info to vect_supportable_shift
2019-10-21 Richard Sandiford <richard.sandiford@arm.com> gcc/ * tree-vectorizer.h (vect_supportable_shift): Take a vec_info. * tree-vect-stmts.c (vect_supportable_shift): Likewise. * tree-vect-patterns.c (vect_synth_mult_by_constant): Update call accordingly. From-SVN: r277224
Diffstat (limited to 'gcc/tree-vect-patterns.c')
-rw-r--r--gcc/tree-vect-patterns.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-vect-patterns.c b/gcc/tree-vect-patterns.c
index 5387563..4faa6e7 100644
--- a/gcc/tree-vect-patterns.c
+++ b/gcc/tree-vect-patterns.c
@@ -2720,6 +2720,7 @@ static gimple *
vect_synth_mult_by_constant (tree op, tree val,
stmt_vec_info stmt_vinfo)
{
+ vec_info *vinfo = stmt_vinfo->vinfo;
tree itype = TREE_TYPE (op);
machine_mode mode = TYPE_MODE (itype);
struct algorithm alg;
@@ -2738,7 +2739,7 @@ vect_synth_mult_by_constant (tree op, tree val,
/* Targets that don't support vector shifts but support vector additions
can synthesize shifts that way. */
- bool synth_shift_p = !vect_supportable_shift (LSHIFT_EXPR, multtype);
+ bool synth_shift_p = !vect_supportable_shift (vinfo, LSHIFT_EXPR, multtype);
HOST_WIDE_INT hwval = tree_to_shwi (val);
/* Use MAX_COST here as we don't want to limit the sequence on rtx costs.