diff options
Diffstat (limited to 'gcc/config/rs6000')
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 02b521c..5909e27 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -41344,7 +41344,10 @@ insn_is_swappable_p (swap_web_entry *insn_entry, rtx insn, if (GET_CODE (body) == SET) { rtx rhs = SET_SRC (body); - gcc_assert (GET_CODE (rhs) == MEM); + /* Even without a swap, the RHS might be a vec_select for, say, + a byte-reversing load. */ + if (GET_CODE (rhs) != MEM) + return 0; if (GET_CODE (XEXP (rhs, 0)) == AND) return 0; @@ -41361,7 +41364,10 @@ insn_is_swappable_p (swap_web_entry *insn_entry, rtx insn, && GET_CODE (SET_SRC (body)) != UNSPEC) { rtx lhs = SET_DEST (body); - gcc_assert (GET_CODE (lhs) == MEM); + /* Even without a swap, the LHS might be a vec_select for, say, + a byte-reversing store. */ + if (GET_CODE (lhs) != MEM) + return 0; if (GET_CODE (XEXP (lhs, 0)) == AND) return 0; |