Move all existing strchr and strrchr folding from builtins.c to gimple-fold.c.
authorWilco Dijkstra <wdijkstr@arm.com>
Wed, 5 Oct 2016 12:31:05 +0000 (12:31 +0000)
committerWilco Dijkstra <wilco@gcc.gnu.org>
Wed, 5 Oct 2016 12:31:05 +0000 (12:31 +0000)
commit71dea1dd60888030f3130f16933becdf597538ab
tree2e5b327406e5695e411f9f03cf0000a0eb1aafa8
parent92805612f4e0cdd33e10282eaf2cc0369bca3293
Move all existing strchr and strrchr folding from builtins.c to gimple-fold.c.

    gcc/
        * builtins.c (fold_builtin_strchr): Remove function.
        (fold_builtin_strrchr): Likewise.
        (fold_builtin2): Remove strchr, index, strrchr, rindex cases.
        * gimple-fold.c (target_char_cst_p): New function.
        (gimple_fold_builtin_strchr) Add more foldings.
        (gimple_fold_builtin): Add index, strrchr, rindex cases.

From-SVN: r240782
gcc/ChangeLog
gcc/builtins.c
gcc/gimple-fold.c