summaryrefslogtreecommitdiff
path: root/gcc/combine.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2009-01-13 22:36:06 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2009-01-13 22:36:06 +0000
commitcac5cd08b4afc23d194bc034f67bed94243c605a (patch)
tree4718c31eaf240b0488be6f53ac949577827b42bc /gcc/combine.c
parent309ef6b4e133c27a243b988da0eaad5235f092e5 (diff)
downloadgcc-cac5cd08b4afc23d194bc034f67bed94243c605a.tar.gz
PR rtl-optimization/38774
* combine.c (simplify_set): When undoing cc_use change, don't do PUT_CODE on the newly created comparison, but instead put back the old comparison. * gcc.dg/torture/pr38774.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@143355 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/combine.c')
-rw-r--r--gcc/combine.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index 82bf9f5e115..3aca075aae1 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -5706,6 +5706,7 @@ simplify_set (rtx x)
{
int other_changed_previously = other_changed;
unsigned HOST_WIDE_INT mask;
+ rtx old_cc_use = *cc_use;
SUBST (*cc_use, gen_rtx_fmt_ee (new_code, GET_MODE (*cc_use),
dest, const0_rtx));
@@ -5728,7 +5729,7 @@ simplify_set (rtx x)
if ((recog_for_combine (&pat, other_insn, &note) < 0
&& ! check_asm_operands (pat)))
{
- PUT_CODE (*cc_use, old_code);
+ *cc_use = old_cc_use;
other_changed = 0;
op0 = simplify_gen_binary (XOR, GET_MODE (op0),