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) <case VEC_SERIES>:
	Handle the case where both arguments are using gen_const_vec_series.

From-SVN: r255079
This commit is contained in:
Jakub Jelinek 2017-11-22 21:48:38 +01:00 committed by Jakub Jelinek
parent a97ae55991
commit 217e4393f7
2 changed files with 10 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2017-11-22 Jakub Jelinek <jakub@redhat.com>
* simplify-rtx.c (simplify_binary_operation_1) <case VEC_SERIES>:
Handle the case where both arguments are using gen_const_vec_series.
2017-11-22 David Malcolm <dmalcolm@redhat.com>
PR c++/62170

View file

@ -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. */