[PATCH 1/2] Auto-generate maybe_fold_and/or_comparisons from match.pd
Martin Liška
mliska@suse.cz
Tue Sep 10 07:40:00 GMT 2019
On 9/9/19 3:55 PM, Richard Biener wrote:
> On Mon, 9 Sep 2019, Martin Liška wrote:
>
>> On 9/9/19 3:42 PM, Richard Biener wrote:
>>> There is no newly created GIMPLE?
>>
>> Hm, I thought from the beginning that maybe_fold_comparisons_from_match_pd
>> can come up with new temporary expressions that need to be inserted into
>> GIMPLE stream? But that's probably handled in ifcombine with:
>>
>> t = force_gimple_operand_gsi_1 (&gsi, t, is_gimple_condexpr, NULL, true,
>> GSI_SAME_STMT);
>> ?
>
> No, that case is done when forcing short-circuiting when there was no
> simplification. When there was a simplification we do
>
> if (result_inv)
> t = fold_build1 (TRUTH_NOT_EXPR, TREE_TYPE (t), t);
> t = canonicalize_cond_expr_cond (t);
> if (!t)
> return false;
>
> so when it is not a condition suitable for direct replacement into
>
> gimple_cond_set_condition_from_tree (inner_cond, t);
>
> we fail.
>
> Richard.
>
I see, so I'm sending updated tested patch.
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Auto-generate-maybe_fold_and-or_comparisons-from-mat.patch
Type: text/x-patch
Size: 24556 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20190910/ef86e72b/attachment.bin>
More information about the Gcc-patches
mailing list