From: Eric Botcazou Date: Tue, 17 Oct 2017 20:28:33 +0000 (+0000) Subject: visium.c (visium_select_cc_mode): Return CCmode for any RTX present on the RHS of... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=34311c5ee64df8dd6dbdaa6141adfe16534c1349;p=gcc.git visium.c (visium_select_cc_mode): Return CCmode for any RTX present on the RHS of a SET. * config/visium/visium.c (visium_select_cc_mode): Return CCmode for any RTX present on the RHS of a SET. * compare-elim.c (try_eliminate_compare): Restore comment. From-SVN: r253830 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f7de68489c8..20b7b3f6e97 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-10-17 Eric Botcazou + + * config/visium/visium.c (visium_select_cc_mode): Return CCmode for + any RTX present on the RHS of a SET. + * compare-elim.c (try_eliminate_compare): Restore comment. + 2017-10-17 Jakub Jelinek * langhooks.h (struct lang_hooks): Document that tree_size langhook diff --git a/gcc/compare-elim.c b/gcc/compare-elim.c index 794a452f98b..086fbc76f01 100644 --- a/gcc/compare-elim.c +++ b/gcc/compare-elim.c @@ -729,6 +729,7 @@ try_eliminate_compare (struct comparison *cmp) if (try_merge_compare (cmp)) return true; + /* We must have found an interesting "clobber" preceding the compare. */ if (cmp->prev_clobber == NULL) return false; diff --git a/gcc/config/visium/visium.c b/gcc/config/visium/visium.c index 381d432778d..3311dd2a349 100644 --- a/gcc/config/visium/visium.c +++ b/gcc/config/visium/visium.c @@ -2938,12 +2938,6 @@ visium_select_cc_mode (enum rtx_code code, rtx op0, rtx op1) /* This is a btst, the result is in C instead of Z. */ return CCCmode; - case CONST_INT: - /* This is a degenerate case, typically an uninitialized variable. */ - gcc_assert (op0 == constm1_rtx); - - /* ... fall through ... */ - case REG: case AND: case IOR: @@ -2960,6 +2954,17 @@ visium_select_cc_mode (enum rtx_code code, rtx op0, rtx op1) when applied to a comparison with zero. */ return CCmode; + /* ??? Cater to the junk RTXes sent by try_merge_compare. */ + case ASM_OPERANDS: + case CALL: + case CONST_INT: + case LO_SUM: + case HIGH: + case MEM: + case UNSPEC: + case ZERO_EXTEND: + return CCmode; + default: gcc_unreachable (); }