[RTL-ifcvt] PR rtl-optimization/68841: Make sure one basic block doesn't clobber...
commitae8718b5b852a1e6852a9fe283848df4b0db6e3e
authorktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 11 Jan 2016 12:13:50 +0000 (11 12:13 +0000)
committerktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 11 Jan 2016 12:13:50 +0000 (11 12:13 +0000)
tree590458ee63e277d05bcf8da716d1961107023f90
parent07d36511d061fdfe41d79d66f56285ef919c079a
[RTL-ifcvt] PR rtl-optimization/68841: Make sure one basic block doesn't clobber CC reg usage of the other

        PR rtl-optimization/68841
        * ifcvt.c (struct noce_if_info): Add orig_x field.
        (bbs_ok_for_cmove_arith): Add to_rename parameter.
        Don't record conflicts on to_rename if it's present.
        Allow memory destinations in sets.
        (noce_try_cmove_arith): Call bbs_ok_for_cmove_arith even on simple
        blocks, passing orig_x to the checks.
        (noce_process_if_block): Set if_info->orig_x appropriately.

        * gcc.dg/pr68841.c: New test.
        * gcc.c-torture/execute/pr68841.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@232223 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/ifcvt.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/pr68841.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr68841.c [new file with mode: 0644]