diff options
author | davem <davem@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-04 20:25:59 +0000 |
---|---|---|
committer | davem <davem@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-04 20:25:59 +0000 |
commit | 8b9506fe7db5f4157760f2317b16cae1f7353d2a (patch) | |
tree | b00e8e391633ace5af1d48f9f8a269da78231dd8 /gcc/config | |
parent | 041dc85d3a03d129e9c98f88b5a03cfd4e422b3b (diff) | |
download | gcc-8b9506fe7db5f4157760f2317b16cae1f7353d2a.tar.gz |
Fix sparc regression due to recent movcc pattern changes.
PR target/49965
* config/sparc/sparc.c (sparc_expand_conditional_move): Handle the
fact that sparc_emit_float_lib_cmp modifies the comparison in
operands[1].
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180982 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/sparc/sparc.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index b57a1584097..0daa53d795d 100644 --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -11509,12 +11509,16 @@ sparc_expand_conditional_move (enum machine_mode mode, rtx *operands) rtx cc_reg, dst, cmp; cmp = operands[1]; - cmp_mode = GET_MODE (XEXP (cmp, 0)); - if (cmp_mode == DImode && !TARGET_ARCH64) + if (GET_MODE (XEXP (cmp, 0)) == DImode && !TARGET_ARCH64) return false; - dst = operands[0]; + if (GET_MODE (XEXP (cmp, 0)) == TFmode && !TARGET_HARD_QUAD) + cmp = sparc_emit_float_lib_cmp (XEXP (cmp, 0), XEXP (cmp, 1), rc); + + cmp_mode = GET_MODE (XEXP (cmp, 0)); + rc = GET_CODE (cmp); + dst = operands[0]; if (! rtx_equal_p (operands[2], dst) && ! rtx_equal_p (operands[3], dst)) { @@ -11533,9 +11537,6 @@ sparc_expand_conditional_move (enum machine_mode mode, rtx *operands) rc = reverse_condition (rc); } - if (cmp_mode == TFmode && !TARGET_HARD_QUAD) - cmp = sparc_emit_float_lib_cmp (XEXP (cmp, 0), XEXP (cmp, 1), rc); - if (XEXP (cmp, 1) == const0_rtx && GET_CODE (XEXP (cmp, 0)) == REG && cmp_mode == DImode |