From af2e447568c939acf8c55eea529b2ac85c5753a7 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Thu, 28 Dec 2017 20:40:20 +0000 Subject: Use valid_for_const_vector_p instead of CONSTANT_P This patch makes the VEC_SERIES code use valid_for_const_vector_p instead of CONSTANT_P, to match what we already do for VEC_DUPLICATE. This showed up as a failure in gcc.c-torture/execute/pr28982b.c for -m32 on x86_64-linux-gnu after later patches. 2017-12-28 Richard Sandiford gcc/ * emit-rtl.c (gen_const_vec_series): Use valid_for_const_vector_p instead of CONSTANT_P. (gen_vec_series): Likewise. * simplify-rtx.c (simplify_binary_operation_1): Likewise. From-SVN: r256023 --- gcc/simplify-rtx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gcc/simplify-rtx.c') diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index 6b163f9..e5cfd3d 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -3590,7 +3590,8 @@ simplify_binary_operation_1 (enum rtx_code code, machine_mode mode, case VEC_SERIES: if (op1 == CONST0_RTX (GET_MODE_INNER (mode))) return gen_vec_duplicate (mode, op0); - if (CONSTANT_P (op0) && CONSTANT_P (op1)) + if (valid_for_const_vector_p (mode, op0) + && valid_for_const_vector_p (mode, op1)) return gen_const_vec_series (mode, op0, op1); return 0; -- cgit v1.1