From 96fce54f18bbc91af97c2b8ce63bde1fbe96644b Mon Sep 17 00:00:00 2001 From: rsandifo Date: Tue, 2 Jan 2018 18:27:42 +0000 Subject: [PATCH] Use CONST_VECTOR_ELT instead of XVECEXP This patch replaces target-independent uses of XVECEXP with uses of CONST_VECTOR_ELT. This kind of replacement isn't necessary for code specific to targets other than AArch64. 2018-01-02 Richard Sandiford gcc/ * simplify-rtx.c (simplify_const_binary_operation): Use CONST_VECTOR_ELT instead of XVECEXP. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@256101 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/simplify-rtx.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 00effd0d15e..90c59764865 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2018-01-02 Richard Sandiford + * simplify-rtx.c (simplify_const_binary_operation): Use + CONST_VECTOR_ELT instead of XVECEXP. + +2018-01-02 Richard Sandiford + * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of the selector elements to be different from the data elements if the selector is a VECTOR_CST. diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index e5cfd3d2bc2..fd6cba7ce02 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -4071,9 +4071,9 @@ simplify_const_binary_operation (enum rtx_code code, machine_mode mode, gcc_assert (op0_n_elts + op1_n_elts == n_elts); for (i = 0; i < op0_n_elts; ++i) - RTVEC_ELT (v, i) = XVECEXP (op0, 0, i); + RTVEC_ELT (v, i) = CONST_VECTOR_ELT (op0, i); for (i = 0; i < op1_n_elts; ++i) - RTVEC_ELT (v, op0_n_elts+i) = XVECEXP (op1, 0, i); + RTVEC_ELT (v, op0_n_elts+i) = CONST_VECTOR_ELT (op1, i); } return gen_rtx_CONST_VECTOR (mode, v); -- 2.11.4.GIT