On Mon, Mar 07, 2016 at 12:26:10PM +0100, Tom de Vries wrote:
> OK for stage4 trunk if bootstrap and reg-test succeeds?

Ok, with a minor nits.

> 2016-03-07  Tom de Vries  <t...@codesourcery.com>
> 
>       PR tree-optimization/70116
>       * tree-ssa-tail-merge.c (merge_stmts_p): New function, factored out
>       of ...
>       (find_duplicate): ... here.  Move merge_stmts_p test to after
>       gimple_equal_p test.
>       (merge_stmts_p): Return false for ubsan/asan internal functions with
>       different gimple_location.

Listing the same function twice is weird, and for a single line short test
copied from elsewhere, especially if it originally was used twice and now
just once, I think it is not worth mentioning.  I'd just write:
(merge_stmts_p): New function.
(find_duplicate): Use it.  Don't test is_tm_ending here.

> +     case IFN_UBSAN_NULL:
> +     case IFN_UBSAN_BOUNDS:
> +     case IFN_UBSAN_VPTR:
> +     case IFN_UBSAN_CHECK_ADD:
> +     case IFN_UBSAN_CHECK_SUB:
> +     case IFN_UBSAN_CHECK_MUL:
> +     case IFN_UBSAN_OBJECT_SIZE:
> +     case IFN_ASAN_CHECK:

This deserves a comment, you should mention what has been mentioned in the
thread, that for these internal functions gimple_location is like another
artificial parameter, or explain what it would mean if it attempted to merge
these stmts with different locations.
> +       return gimple_location (stmt1) == gimple_location (stmt2);

        Jakub

Reply via email to