aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/spu
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2009-03-12 14:00:21 +0000
committerUlrich Weigand <uweigand@gcc.gnu.org>2009-03-12 14:00:21 +0000
commit4caab5ba578a8aba8b704d0ce052de812cda1d9b (patch)
tree1446ff6b7f0c54a9ead36b744a4de5a8d8a61941 /gcc/config/spu
parentfec7f2457f1a5171b62dcffb486994f945150d8f (diff)
downloadgcc-4caab5ba578a8aba8b704d0ce052de812cda1d9b.zip
gcc-4caab5ba578a8aba8b704d0ce052de812cda1d9b.tar.gz
gcc-4caab5ba578a8aba8b704d0ce052de812cda1d9b.tar.bz2
re PR target/39181 (complex int arguments cause ICE)
PR target/39181 * config/spu/spu.c (spu_expand_mov): Handle invalid subregs of non-integer mode as well. From-SVN: r144811
Diffstat (limited to 'gcc/config/spu')
-rw-r--r--gcc/config/spu/spu.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/gcc/config/spu/spu.c b/gcc/config/spu/spu.c
index c2fbb331b..6e0001b 100644
--- a/gcc/config/spu/spu.c
+++ b/gcc/config/spu/spu.c
@@ -4114,17 +4114,16 @@ spu_expand_mov (rtx * ops, enum machine_mode mode)
if (GET_CODE (ops[1]) == SUBREG && !valid_subreg (ops[1]))
{
rtx from = SUBREG_REG (ops[1]);
- enum machine_mode imode = GET_MODE (from);
+ enum machine_mode imode = int_mode_for_mode (GET_MODE (from));
gcc_assert (GET_MODE_CLASS (mode) == MODE_INT
&& GET_MODE_CLASS (imode) == MODE_INT
&& subreg_lowpart_p (ops[1]));
if (GET_MODE_SIZE (imode) < 4)
- {
- from = gen_rtx_SUBREG (SImode, from, 0);
- imode = SImode;
- }
+ imode = SImode;
+ if (imode != GET_MODE (from))
+ from = gen_rtx_SUBREG (imode, from, 0);
if (GET_MODE_SIZE (mode) < GET_MODE_SIZE (imode))
{