aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vector-builder.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@linaro.org>2017-12-07 18:41:13 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2017-12-07 18:41:13 +0000
commit059c18abcb9c88bb5a85eb3ce468ffa7252da230 (patch)
treeb17857f981feeaf586dbb8d29c15e3b8ae09de91 /gcc/tree-vector-builder.c
parent5ebaa4774fb6de458422c660ae11f1c3b7d96262 (diff)
downloadgcc-059c18abcb9c88bb5a85eb3ce468ffa7252da230.zip
gcc-059c18abcb9c88bb5a85eb3ce468ffa7252da230.tar.gz
gcc-059c18abcb9c88bb5a85eb3ce468ffa7252da230.tar.bz2
Use tree_vector_builder::new_unary_operation for folding
This patch makes fold-const.c operate directly on the VECTOR_CST encoding when folding an operation that has a single VECTOR_CST input. 2017-12-07 Richard Sandiford <richard.sandiford@linaro.org> gcc/ * fold-const.c (fold_negate_expr_1): Use tree_vector_builder and new_unary_operation, operating only on the encoded elements. (const_unop): Likewise. (exact_inverse): Likewise. (distributes_over_addition_p): New function. (const_binop): Use tree_vector_builder and new_unary_operation for combinations of VECTOR_CST and INTEGER_CST. Operate only on the encoded elements unless the encoding is strided and the operation does not distribute over addition. (fold_convert_const): Use tree_vector_builder and new_unary_operation. Operate only on the encoded elements for truncating integer conversions, or for non-stepped encodings. From-SVN: r255476
Diffstat (limited to 'gcc/tree-vector-builder.c')
0 files changed, 0 insertions, 0 deletions