On Tue, Feb 21, 2017 at 12:35:17PM -0800, Michael Eager wrote: > On 02/21/2017 12:15 PM, Jakub Jelinek wrote: > > On Tue, Feb 21, 2017 at 02:48:15PM +0000, Segher Boessenkool wrote: > > > - /* Shift by zero -- copy regs if necessary. */ > > > + /* Shift by zero -- copy regs. */ > > > if ((GET_CODE (operands[2]) == CONST_INT) && (INTVAL (operands[2]) == > > > 0)) > > > > You could have changed this line to > > if (operands[2] == const0_rtx) > > as well. > > And this would not change the generated code.
Sure, and it doesn't need to be done for GCC7, but would be a nice cleanup for stage1 (e.g. remove redundant parens in the backend, cases like this where because of the uniqueness of CONST_INT values a pointer comparison is enough, or using macros where available (e.g. GET_CODE (operands[2]) == CONST_INT can be written as CONST_INT_P (operands[2]), etc.). Jakub