Commit 217e4393 by Jakub Jelinek Committed by Jakub Jelinek

simplify-rtx.c (simplify_binary_operation_1): Handle the case where both…

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
parent a97ae559
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> 2017-11-22 David Malcolm <dmalcolm@redhat.com>
PR c++/62170 PR c++/62170
...@@ -3566,6 +3566,8 @@ simplify_binary_operation_1 (enum rtx_code code, machine_mode mode, ...@@ -3566,6 +3566,8 @@ simplify_binary_operation_1 (enum rtx_code code, machine_mode mode,
case VEC_SERIES: case VEC_SERIES:
if (op1 == CONST0_RTX (GET_MODE_INNER (mode))) if (op1 == CONST0_RTX (GET_MODE_INNER (mode)))
return gen_vec_duplicate (mode, op0); return gen_vec_duplicate (mode, op0);
if (CONSTANT_P (op0) && CONSTANT_P (op1))
return gen_const_vec_series (mode, op0, op1);
return 0; return 0;
case VEC_SELECT: case VEC_SELECT:
...@@ -6652,6 +6654,9 @@ test_vector_ops_series (machine_mode mode, rtx scalar_reg) ...@@ -6652,6 +6654,9 @@ test_vector_ops_series (machine_mode mode, rtx scalar_reg)
ASSERT_RTX_EQ (series_r_1, ASSERT_RTX_EQ (series_r_1,
simplify_binary_operation (MINUS, mode, duplicate, simplify_binary_operation (MINUS, mode, duplicate,
series_0_m1)); series_0_m1));
ASSERT_RTX_EQ (series_0_m1,
simplify_binary_operation (VEC_SERIES, mode, const0_rtx,
constm1_rtx));
} }
/* Verify some simplifications involving vectors. */ /* Verify some simplifications involving vectors. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment