From a85cf8e99049f4db8b5868b5df5ef201a9a7b2cb Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Mon, 23 Oct 2017 09:32:31 +0000 Subject: [PATCH] Use scalar_mode in expand_shift_1 Since this function handles scalar and vector shifts: machine_mode scalar_mode = mode; if (VECTOR_MODE_P (mode)) scalar_mode = GET_MODE_INNER (mode); is equivalent to: scalar_mode = GET_MODE_INNER (mode); 2017-10-23 Richard Sandiford Alan Hayward David Sherwood gcc/ * expmed.c (expand_shift_1): Use scalar_mode for scalar_mode. Co-Authored-By: Alan Hayward Co-Authored-By: David Sherwood From-SVN: r253999 --- gcc/ChangeLog | 6 ++++++ gcc/expmed.c | 4 +--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 28052db569f..ced594f68da 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-10-23 Richard Sandiford + Alan Hayward + David Sherwood + + * expmed.c (expand_shift_1): Use scalar_mode for scalar_mode. + 2017-10-23 Richard Biener PR tree-optimization/82129 diff --git a/gcc/expmed.c b/gcc/expmed.c index 27f5ae45d27..eeb25d3bf26 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -2337,12 +2337,10 @@ expand_shift_1 (enum tree_code code, machine_mode mode, rtx shifted, optab lrotate_optab = rotl_optab; optab rrotate_optab = rotr_optab; machine_mode op1_mode; - machine_mode scalar_mode = mode; + scalar_mode scalar_mode = GET_MODE_INNER (mode); int attempt; bool speed = optimize_insn_for_speed_p (); - if (VECTOR_MODE_P (mode)) - scalar_mode = GET_MODE_INNER (mode); op1 = amount; op1_mode = GET_MODE (op1); -- 2.30.2