combine: Don't call extract_left_shift with count < 0 (PR67483)
authorSegher Boessenkool <segher@kernel.crashing.org>
Fri, 13 May 2016 23:01:40 +0000 (01:01 +0200)
committerSegher Boessenkool <segher@gcc.gnu.org>
Fri, 13 May 2016 23:01:40 +0000 (01:01 +0200)
commit85ca20c9516879edf92356ee5d8a5c567db085a0
tree310b3ae6402e5929bff678da27c70f03f786eb77
parentaa4b467b680f230ab11922d1e29695e1eaba12af
combine: Don't call extract_left_shift with count < 0 (PR67483)

If the compiled program does a shift by a negative amount, combine will
happily work with that, but it shouldn't then do an undefined operation
in GCC itself.  This patch fixes the first case mentioned in the bug
report (I haven't been able to reproduce the second case, on trunk at
least).

PR rtl-optimization/67483
* combine.c (make_compound_operation): Don't call extract_left_shift
with negative shift amounts.

From-SVN: r236232
gcc/ChangeLog
gcc/combine.c