r278154 - in /branches/gcc-9-branch/gcc: Change...

draganm@gcc.gnu.org draganm@gcc.gnu.org
Wed Nov 13 19:20:00 GMT 2019


Author: draganm
Date: Wed Nov 13 19:20:15 2019
New Revision: 278154

URL: https://gcc.gnu.org/viewcvs?rev=278154&root=gcc&view=rev
Log:
Sanitize the constant argument for rotr<mode>3

This was dormant for quite some time, but it started happening for me
on gcc.c-torture/compile/pr65153.c sometime after r276645 for -mabi=32 linux runs.

The pattern accepts any SMALL_OPERAND constant value while it asserts during the final
that the value is in the mode size range. I this case it happens that combine_and_move_insns
during ira makes a pattern with negative "shift count" which fails at final stage.

This simple fix just truncates the constant operand to mode size the same as shift patterns.

gcc/ChangeLog:

2019-11-13  Dragan Mladjenovic  <dmladjenovic@wavecomp.com>

	Backport from mainline
	* config/mips/mips.md (rotr<mode>3): Sanitize the constant argument
	instead of asserting its value.

Modified:
    branches/gcc-9-branch/gcc/ChangeLog
    branches/gcc-9-branch/gcc/config/mips/mips.md



More information about the Gcc-cvs mailing list