summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom de Vries <tom@codesourcery.com>2013-01-15 17:24:55 +0000
committerTom de Vries <vries@gcc.gnu.org>2013-01-15 17:24:55 +0000
commita78a8cc4083cc10a6316f099a03a954e7468f835 (patch)
treecc0cfe6c76b1e2daaa2ad1e877b17d21aff36a1e
parent0e80383ffb72168e9609e2be58649ff641150677 (diff)
downloadgcc-a78a8cc4083cc10a6316f099a03a954e7468f835.tar.gz
re PR target/55876 (internal compiler error: in gen_rtx_SUBREG, at emit-rtl.c:776)
2013-01-15 Tom de Vries <tom@codesourcery.com> PR target/55876 * optabs.c (widen_operand): Use gen_lowpart instead of gen_rtx_SUBREG. Update comment. From-SVN: r195212
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/optabs.c4
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 75efa7a216d..d0efc8a0cae 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2013-01-15 Tom de Vries <tom@codesourcery.com>
+
+ PR target/55876
+ * optabs.c (widen_operand): Use gen_lowpart instead of gen_rtx_SUBREG.
+ Update comment.
+
2013-01-15 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/pr55153
diff --git a/gcc/optabs.c b/gcc/optabs.c
index 35b61c1ff00..e637a1e9caf 100644
--- a/gcc/optabs.c
+++ b/gcc/optabs.c
@@ -325,10 +325,10 @@ widen_operand (rtx op, enum machine_mode mode, enum machine_mode oldmode,
&& SUBREG_PROMOTED_UNSIGNED_P (op) == unsignedp))
return convert_modes (mode, oldmode, op, unsignedp);
- /* If MODE is no wider than a single word, we return a paradoxical
+ /* If MODE is no wider than a single word, we return a lowpart or paradoxical
SUBREG. */
if (GET_MODE_SIZE (mode) <= UNITS_PER_WORD)
- return gen_rtx_SUBREG (mode, force_reg (GET_MODE (op), op), 0);
+ return gen_lowpart (mode, force_reg (GET_MODE (op), op));
/* Otherwise, get an object of MODE, clobber it, and set the low-order
part to OP. */