mirror of git://gcc.gnu.org/git/gcc.git
simplify-rtx.c (simplify_subreg): Use the correct mode when determining whether a SUBREG of a CONCAT refers to...
* simplify-rtx.c (simplify_subreg): Use the correct mode when determining whether a SUBREG of a CONCAT refers to the first or second component. From-SVN: r120101
This commit is contained in:
parent
128ccfb078
commit
a957d77fc3
|
@ -1,3 +1,9 @@
|
||||||
|
2006-12-20 Roger Sayle <roger@eyesopen.com>
|
||||||
|
|
||||||
|
* simplify-rtx.c (simplify_subreg): Use the correct mode when
|
||||||
|
determining whether a SUBREG of a CONCAT refers to the first or
|
||||||
|
second component.
|
||||||
|
|
||||||
2006-12-21 Ben Elliston <bje@au.ibm.com>
|
2006-12-21 Ben Elliston <bje@au.ibm.com>
|
||||||
|
|
||||||
* config/spu/spu.c (spu_builtin_mul_widen_even): Remove unused
|
* config/spu/spu.c (spu_builtin_mul_widen_even): Remove unused
|
||||||
|
|
|
@ -4648,13 +4648,22 @@ simplify_subreg (enum machine_mode outermode, rtx op,
|
||||||
of real and imaginary part. */
|
of real and imaginary part. */
|
||||||
if (GET_CODE (op) == CONCAT)
|
if (GET_CODE (op) == CONCAT)
|
||||||
{
|
{
|
||||||
unsigned int inner_size, final_offset;
|
unsigned int part_size, final_offset;
|
||||||
rtx part, res;
|
rtx part, res;
|
||||||
|
|
||||||
inner_size = GET_MODE_UNIT_SIZE (innermode);
|
part_size = GET_MODE_UNIT_SIZE (GET_MODE (XEXP (op, 0)));
|
||||||
part = byte < inner_size ? XEXP (op, 0) : XEXP (op, 1);
|
if (byte < part_size)
|
||||||
final_offset = byte % inner_size;
|
{
|
||||||
if (final_offset + GET_MODE_SIZE (outermode) > inner_size)
|
part = XEXP (op, 0);
|
||||||
|
final_offset = byte;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
part = XEXP (op, 1);
|
||||||
|
final_offset = byte - part_size;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (final_offset + GET_MODE_SIZE (outermode) > part_size)
|
||||||
return NULL_RTX;
|
return NULL_RTX;
|
||||||
|
|
||||||
res = simplify_subreg (outermode, part, GET_MODE (part), final_offset);
|
res = simplify_subreg (outermode, part, GET_MODE (part), final_offset);
|
||||||
|
|
Loading…
Reference in New Issue