From e701e0b9e8c74e5e93764556a447ea334e4e9389 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Mon, 12 Jun 2017 16:06:38 +0000 Subject: [PATCH] Fix pessimistic DImode handling in combine.c:make_field_assignment The make_field_assignment code: src = force_to_mode (src, mode, GET_MODE_PRECISION (mode) >= HOST_BITS_PER_WIDE_INT ? HOST_WIDE_INT_M1U : (HOST_WIDE_INT_1U << len) - 1, 0); would ignore the field length len for DImode, even though DImode can be handled using HWIs. I think the code should be testing len instead. 2017-06-12 Richard Sandiford gcc/ * combine.c (make_field_assignment): Check len rather than the mode precision when calling force_to_mode. From-SVN: r249128 --- gcc/ChangeLog | 5 +++++ gcc/combine.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d4f4dee2714..cc5435d54a6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-06-12 Richard Sandiford + + * combine.c (make_field_assignment): Check len rather than the mode + precision when calling force_to_mode. + 2017-06-12 Georg-Johann Lay Support multilibs and devices that see flash in RAM address range. diff --git a/gcc/combine.c b/gcc/combine.c index 39ef3c6ecb8..2d49bc2233c 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -9634,7 +9634,7 @@ make_field_assignment (rtx x) other, pos), dest); src = force_to_mode (src, mode, - GET_MODE_PRECISION (mode) >= HOST_BITS_PER_WIDE_INT + len >= HOST_BITS_PER_WIDE_INT ? HOST_WIDE_INT_M1U : (HOST_WIDE_INT_1U << len) - 1, 0); -- 2.30.2