From: Alan Modra Date: Thu, 18 Jun 2015 10:49:55 +0000 (+0930) Subject: [RS6000] rs6000_rtx_costs for PLUS/MINUS constant X-Git-Tag: basepoints/gcc-12~4837 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=34cd84890422f79c37cbcbcc594028bb852bcc67;p=thirdparty%2Fgcc.git [RS6000] rs6000_rtx_costs for PLUS/MINUS constant These functions do behave a little differently for SImode, so the mode should be passed. * config/rs6000/rs6000.c (rs6000_rtx_costs): Pass mode to reg_or_add_cint_operand and reg_or_sub_cint_operand. --- diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 5f4e2927a212..375fff59928a 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -21176,9 +21176,9 @@ rs6000_rtx_costs (rtx x, machine_mode mode, int outer_code, return true; } else if ((outer_code == PLUS - && reg_or_add_cint_operand (x, VOIDmode)) + && reg_or_add_cint_operand (x, mode)) || (outer_code == MINUS - && reg_or_sub_cint_operand (x, VOIDmode)) + && reg_or_sub_cint_operand (x, mode)) || ((outer_code == SET || outer_code == IOR || outer_code == XOR)