From: Jakub Jelinek Date: Wed, 22 Nov 2017 20:48:38 +0000 (+0100) Subject: simplify-rtx.c (simplify_binary_operation_1): Handle the case where both arguments... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=217e4393f7540b4f32c4eafbe3ffeceeb063eb30;p=gcc.git simplify-rtx.c (simplify_binary_operation_1): Handle the case where both arguments are using gen_const_vec_series. * simplify-rtx.c (simplify_binary_operation_1) : Handle the case where both arguments are using gen_const_vec_series. From-SVN: r255079 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c9793ece18d..2bb7a540f73 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-11-22 Jakub Jelinek + + * simplify-rtx.c (simplify_binary_operation_1) : + Handle the case where both arguments are using gen_const_vec_series. + 2017-11-22 David Malcolm PR c++/62170 diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index 36a2e370293..806c3099923 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -3566,6 +3566,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)) + return gen_const_vec_series (mode, op0, op1); return 0; case VEC_SELECT: @@ -6652,6 +6654,9 @@ test_vector_ops_series (machine_mode mode, rtx scalar_reg) ASSERT_RTX_EQ (series_r_1, simplify_binary_operation (MINUS, mode, duplicate, series_0_m1)); + ASSERT_RTX_EQ (series_0_m1, + simplify_binary_operation (VEC_SERIES, mode, const0_rtx, + constm1_rtx)); } /* Verify some simplifications involving vectors. */