This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/82434] -fstore-merging does not work reliably.


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82434

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Fri Oct  6 09:39:07 2017
New Revision: 253483

URL: https://gcc.gnu.org/viewcvs?rev=253483&root=gcc&view=rev
Log:
        PR tree-optimization/82434
        * fold-const.h (can_native_encode_type_p,
        can_native_encode_string_p): Remove.
        * fold-const.c (native_encode_int): Formatting fixes.  If ptr is NULL,
        don't encode anything, just return what would be otherwise returned.
        (native_encode_fixed, native_encode_complex, native_encode_vector):
        Likewise.
        (native_encode_string): Likewise.  Inline by hand
        can_native_encode_string_p.
        (can_native_encode_type_p): Remove.
        (can_native_encode_string_p): Remove.
        * tree-vect-stmts.c (vectorizable_store): Instead of testing just
        STRING_CSTs using can_native_encode_string_p, test all
        CONSTANT_CLASS_P values using native_encode_expr with NULL ptr.
        * gimple-ssa-store-merging.c (encode_tree_to_bitpos): Remove last
        argument from native_encode_expr.
        (rhs_valid_for_store_merging_p): Use native_encode_expr with NULL ptr.
        (pass_store_merging::execute): Don't unnecessarily look for 3 stmts,
        but just 2.

        * gcc.dg/store_merging_9.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/store_merging_9.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/fold-const.c
    trunk/gcc/fold-const.h
    trunk/gcc/gimple-ssa-store-merging.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-vect-stmts.c

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]