This is the mail archive of the gcc-cvs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

r242081 - /branches/ARM/sve-branch/gcc/rtlanal.c


Author: rsandifo
Date: Fri Nov 11 16:56:35 2016
New Revision: 242081

URL: https://gcc.gnu.org/viewcvs?rev=242081&root=gcc&view=rev
Log:
Move misplaced assignment in num_sign_bit_copies1

The old assignment to bitwidth was before we handled VOIDmode with:

  if (mode == VOIDmode)
    mode = GET_MODE (x);

so when VOIDmode was specified we would always use:

  if (bitwidth < GET_MODE_PRECISION (GET_MODE (x)))
    {
      num0 = cached_num_sign_bit_copies (x, GET_MODE (x),
                                         known_x, known_mode, known_ret);
      return MAX (1,
                  num0 - (int) (GET_MODE_PRECISION (GET_MODE (x)) - bitwidth));
    }

For a zero bitwidth this always returns 1 (which is the most
pessimistic result).

Modified:
    branches/ARM/sve-branch/gcc/rtlanal.c


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]