aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>2017-01-12 16:01:13 +0000
committerWilliam Schmidt <wschmidt@gcc.gnu.org>2017-01-12 16:01:13 +0000
commit661131664980c54b72c6223a53a464f23b8ec0a3 (patch)
tree55da712110b42b89723181d93c414e14d5e20509 /gcc/config
parent4e41b0e67f203cc1249e34a25f4e65d154435163 (diff)
downloadgcc-661131664980c54b72c6223a53a464f23b8ec0a3.zip
gcc-661131664980c54b72c6223a53a464f23b8ec0a3.tar.gz
gcc-661131664980c54b72c6223a53a464f23b8ec0a3.tar.bz2
re PR target/79044 (ICE in insn_is_swappable_p, at config/rs6000/rs6000.c:41191)
[gcc] 2017-01-12 Bill Schmidt <wschmidt@linux.vnet.ibm.com> PR target/79044 * config/rs6000/rs6000.c (insn_is_swappable_p): Mark element-reversing loads and stores as not swappable. [gcc/testsuite] 2017-01-12 Bill Schmidt <wschmidt@linux.vnet.ibm.com> PR target/79044 * gcc.target/powerpc/swaps-p8-26.c: New. From-SVN: r244368
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/rs6000/rs6000.c10
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;