diff options
author | wschmidt <wschmidt@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-04-17 20:35:59 +0000 |
---|---|---|
committer | wschmidt <wschmidt@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-04-17 20:35:59 +0000 |
commit | 4e3020e35bfd27adfb6edc5d4620c5c52f19556e (patch) | |
tree | 970627ce2f62880f7deef5046a13ee2abb1fef0e /gcc/config/rs6000 | |
parent | 9203b5842b219352fa6fad05f0b049b1bd8d46d0 (diff) |
2015-04-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR target/65787
* config/rs6000/rs6000.c (rtx_is_swappable_p): Remove previous
fix; ensure that a subsequent SH_NONE operand does not overwrite
an existing *special value.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-5-branch@222198 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/rs6000')
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 3b31b122e19..58ea3d106ae 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -34204,17 +34204,6 @@ rtx_is_swappable_p (rtx op, unsigned int *special) else return 0; - case PARALLEL: - /* A vec_extract operation may be wrapped in a PARALLEL with a - clobber, so account for that possibility. */ - if (XVECLEN (op, 0) != 2) - return 0; - - if (GET_CODE (XVECEXP (op, 0, 1)) != CLOBBER) - return 0; - - return rtx_is_swappable_p (XVECEXP (op, 0, 0), special); - case UNSPEC: { /* Various operations are unsafe for this optimization, at least @@ -34296,10 +34285,11 @@ rtx_is_swappable_p (rtx op, unsigned int *special) { unsigned int special_op = SH_NONE; ok &= rtx_is_swappable_p (XEXP (op, i), &special_op); + if (special_op == SH_NONE) + continue; /* Ensure we never have two kinds of special handling for the same insn. */ - if (*special != SH_NONE && special_op != SH_NONE - && *special != special_op) + if (*special != SH_NONE && *special != special_op) return 0; *special = special_op; } @@ -34308,10 +34298,11 @@ rtx_is_swappable_p (rtx op, unsigned int *special) { unsigned int special_op = SH_NONE; ok &= rtx_is_swappable_p (XVECEXP (op, i, j), &special_op); + if (special_op == SH_NONE) + continue; /* Ensure we never have two kinds of special handling for the same insn. */ - if (*special != SH_NONE && special_op != SH_NONE - && *special != special_op) + if (*special != SH_NONE && *special != special_op) return 0; *special = special_op; } |