diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-05-09 02:03:07 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-05-09 02:03:07 +0000 |
commit | 3a2a3a7f170e42bad418ac9459ca3b2e61db6969 (patch) | |
tree | 367306fb261bfcbd826cba6c30e8a72eef7f3f20 /gcc/loop.c | |
parent | 30e521fa7b772859d4d27a8a5d851bc66dc12a8e (diff) | |
download | gcc-3a2a3a7f170e42bad418ac9459ca3b2e61db6969.tar.gz |
* loop.c (get_condition): Don't combine when either compare is MODE_CC.
* alpha.c (alpha_emit_conditional_branch): New function. Taken from
the body of beq; additionally set the mode of the branch to CCmode for
FP compares and not fast_math.
(alpha_emit_conditional_move): Always use a compare insn for FP
when not fast_math, as well as setting CCmode on the cmov.
* alpha.md (beq, bne, blt, et al): Call alpha_emit_conditional_branch.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@19645 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/loop.c')
-rw-r--r-- | gcc/loop.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/gcc/loop.c b/gcc/loop.c index f63ce33415f..6765b20e61c 100644 --- a/gcc/loop.c +++ b/gcc/loop.c @@ -6978,6 +6978,7 @@ get_condition (jump, earliest) rtx op0, op1; int reverse_code = 0; int did_reverse_condition = 0; + enum machine_mode mode; /* If this is not a standard conditional jump, we can't parse it. */ if (GET_CODE (jump) != JUMP_INSN @@ -6985,6 +6986,7 @@ get_condition (jump, earliest) return 0; code = GET_CODE (XEXP (SET_SRC (PATTERN (jump)), 0)); + mode = GET_MODE (XEXP (SET_SRC (PATTERN (jump)), 0)); op0 = XEXP (XEXP (SET_SRC (PATTERN (jump)), 0), 0); op1 = XEXP (XEXP (SET_SRC (PATTERN (jump)), 0), 1); @@ -7051,6 +7053,13 @@ get_condition (jump, earliest) { enum machine_mode inner_mode = GET_MODE (SET_SRC (set)); + /* ??? We may not combine comparisons done in a CCmode with + comparisons not done in a CCmode. This is to aid targets + like Alpha that have an IEEE compliant EQ instruction, and + a non-IEEE compliant BEQ instruction. The use of CCmode is + actually artificial, simply to prevent the combination, but + should not affect other platforms. */ + if ((GET_CODE (SET_SRC (set)) == COMPARE || (((code == NE || (code == LT @@ -7066,7 +7075,9 @@ get_condition (jump, earliest) && FLOAT_STORE_FLAG_VALUE < 0) #endif )) - && GET_RTX_CLASS (GET_CODE (SET_SRC (set))) == '<'))) + && GET_RTX_CLASS (GET_CODE (SET_SRC (set))) == '<')) + && ((GET_MODE_CLASS (mode) == MODE_CC) + != (GET_MODE_CLASS (inner_mode) == MODE_CC))) x = SET_SRC (set); else if (((code == EQ || (code == GE @@ -7082,7 +7093,9 @@ get_condition (jump, earliest) && FLOAT_STORE_FLAG_VALUE < 0) #endif )) - && GET_RTX_CLASS (GET_CODE (SET_SRC (set))) == '<') + && GET_RTX_CLASS (GET_CODE (SET_SRC (set))) == '<' + && ((GET_MODE_CLASS (mode) == MODE_CC) + != (GET_MODE_CLASS (inner_mode) == MODE_CC))) { /* We might have reversed a LT to get a GE here. But this wasn't actually the comparison of data, so we don't flag that we |