aboutsummaryrefslogtreecommitdiff
path: root/gcc/combine.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2016-11-15 17:54:20 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2016-11-15 17:54:20 +0000
commit89e64bc0305f36a4abe486ce07cbee7c13a6dc81 (patch)
tree7865fe77f868e75b75fafceb52188b5e90e535e6 /gcc/combine.c
parent8e4d2ca469ec10fca86fe7e0b3b2a4c9d0371419 (diff)
downloadgcc-89e64bc0305f36a4abe486ce07cbee7c13a6dc81.zip
gcc-89e64bc0305f36a4abe486ce07cbee7c13a6dc81.tar.gz
gcc-89e64bc0305f36a4abe486ce07cbee7c13a6dc81.tar.bz2
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). gcc/ 2016-11-15 Richard Sandiford <richard.sandiford@arm.com> Alan Hayward <alan.hayward@arm.com> David Sherwood <david.sherwood@arm.com> * rtlanal.c (num_sign_bit_copies1): Calculate bitwidth after handling VOIDmode. Co-Authored-By: Alan Hayward <alan.hayward@arm.com> Co-Authored-By: David Sherwood <david.sherwood@arm.com> From-SVN: r242440
Diffstat (limited to 'gcc/combine.c')
0 files changed, 0 insertions, 0 deletions