re PR tree-optimization/64946 ([AArch64] gcc.target/aarch64/vect-abs-compile.c -...
authorKugan Vivekanandarajah <kuganv@linaro.org>
Sat, 16 Jun 2018 21:34:29 +0000 (21:34 +0000)
committerKugan Vivekanandarajah <kugan@gcc.gnu.org>
Sat, 16 Jun 2018 21:34:29 +0000 (21:34 +0000)
commite197e64ee8ab8e46de9069a8d951bed720a0fd67
tree5081fb715fc1d3e50ca8082c529445c5361e4c5d
parentee79110cfd00fb7422cb461f63bfbd39637c1962
re PR tree-optimization/64946 ([AArch64] gcc.target/aarch64/vect-abs-compile.c - "abs" vectorization fails for char/short types)

gcc/ChangeLog:

2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>

PR middle-end/64946
* cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
* config/i386/i386.c (ix86_add_stmt_cost): Likewise.
* dojump.c (do_jump): Likewise.
* expr.c (expand_expr_real_2): Check operand type's sign.
* fold-const.c (const_unop): Handle ABSU_EXPR.
(fold_abs_const): Likewise.
* gimple-pretty-print.c (dump_unary_rhs): Likewise.
* gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
(strip_sign_op_1): Likesise.
* match.pd: Add new pattern to generate ABSU_EXPR.
* optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
* tree-cfg.c (verify_gimple_assign_unary): Likewise.
* tree-eh.c (operation_could_trap_helper_p): Likewise.
* tree-inline.c (estimate_operator_cost): Likewise.
* tree-pretty-print.c (dump_generic_node): Likewise.
* tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
* tree.def (ABSU_EXPR): New.

gcc/c-family/ChangeLog:

2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>

* c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.

gcc/c/ChangeLog:

2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>

* c-typeck.c (build_unary_op): Handle ABSU_EXPR;
* gimple-parser.c (c_parser_gimple_statement): Likewise.
(c_parser_gimple_unary_expression): Likewise.

gcc/cp/ChangeLog:

2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>

* constexpr.c (potential_constant_expression_1): Handle ABSU_EXPR.
* cp-gimplify.c (cp_fold): Likewise.

gcc/testsuite/ChangeLog:

2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>

PR middle-end/64946
* gcc.dg/absu.c: New test.
* gcc.dg/gimplefe-29.c: New test.
* gcc.target/aarch64/pr64946.c: New test.

From-SVN: r261681
28 files changed:
gcc/ChangeLog
gcc/c-family/ChangeLog
gcc/c-family/c-common.c
gcc/c/ChangeLog
gcc/c/c-typeck.c
gcc/c/gimple-parser.c
gcc/cfgexpand.c
gcc/config/i386/i386.c
gcc/cp/ChangeLog
gcc/cp/constexpr.c
gcc/cp/cp-gimplify.c
gcc/dojump.c
gcc/expr.c
gcc/fold-const.c
gcc/gimple-pretty-print.c
gcc/gimple-ssa-backprop.c
gcc/match.pd
gcc/optabs-tree.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/absu.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/gimplefe-29.c [new file with mode: 0644]
gcc/testsuite/gcc.target/aarch64/pr64946.c [new file with mode: 0644]
gcc/tree-cfg.c
gcc/tree-eh.c
gcc/tree-inline.c
gcc/tree-pretty-print.c
gcc/tree-vect-patterns.c
gcc/tree.def