Fix pessimistic DImode handling in combine.c:make_field_assignment
commit0e055986e6a37a1bec9e111c998541f889e5eb02
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 12 Jun 2017 16:06:38 +0000 (12 16:06 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 12 Jun 2017 16:06:38 +0000 (12 16:06 +0000)
tree3ddda6c404d525cc5ed663ea3b8f6470ade31c0c
parentcacbd54ab615677114faf3efbf8c71bbec4d431e
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  <richard.sandiford@linaro.org>

gcc/
* combine.c (make_field_assignment): Check len rather than the mode
precision when calling force_to_mode.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@249128 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/combine.c