This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][11/n] Merge from match-and-simplify, bit patterns from forwprop
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Richard Biener <rguenther at suse dot de>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 8 Nov 2014 18:31:35 -0800
- Subject: Re: [PATCH][11/n] Merge from match-and-simplify, bit patterns from forwprop
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot LSU dot 2 dot 11 dot 1411060952430 dot 27850 at zhemvz dot fhfr dot qr>
On Thu, Nov 6, 2014 at 12:55 AM, Richard Biener <rguenther@suse.de> wrote:
>
> This merges patterns implementing the bitwise patterns from
> tree-ssa-forwprop.c. I've removed duplicate functionality from
> fold-const.c as I found them, some may be still lurking in the
> depths.
>
> This also fixes a bug in genmatch which made user-defined predicates
> matching anything, thus
>
> (match foo
> @0
> (if ...
>
> not work (that is: ignored).
>
> Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk.
>
> Richard.
>
> 2014-11-06 Richard Biener <rguenther@suse.de>
>
> * match.pd: Implement bitwise binary and unary simplifications
> from tree-ssa-forwprop.c.
> * fold-const.c (fold_unary_loc): Remove them here.
> (fold_binary_loc): Likewise.
> * tree-ssa-forwprop.c (simplify_not_neg_expr): Remove.
> (truth_valued_ssa_name): Likewise.
> (lookup_logical_inverted_value): Likewise.
> (simplify_bitwise_binary_1): Likewise.
> (hoist_conversion_for_bitop_p): Likewise.
> (simplify_bitwise_binary_boolean): Likewise.
> (simplify_bitwise_binary): Likewise.
> (pass_forwprop::execute): Remove calls to simplify_not_neg_expr
> and simplify_bitwise_binary.
> * genmatch.c (dt_node::append_true_op): Use safe_as_a for parent.
> (decision_tree::insert): Also insert non-expressions.
>
> * gcc.dg/tree-ssa/forwprop-28.c: Adjust scanning for the
> desired transform.
>
This caused:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63787
H.J.