https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68841
--- Comment #9 from ktkachov at gcc dot gnu.org --- Author: ktkachov Date: Mon Jan 11 12:13:50 2016 New Revision: 232223 URL: https://gcc.gnu.org/viewcvs?rev=232223&root=gcc&view=rev Log: [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. Added: trunk/gcc/testsuite/gcc.c-torture/execute/pr68841.c trunk/gcc/testsuite/gcc.dg/pr68841.c Modified: trunk/gcc/ChangeLog trunk/gcc/ifcvt.c trunk/gcc/testsuite/ChangeLog