From: Segher Boessenkool Date: Sat, 2 Dec 2017 01:23:41 +0000 (+0100) Subject: rs6000: Set rs6000_cpu correctly (PR43871) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=81094bcb458cd005474156b5e0bc0c7c72387bbc;p=gcc.git rs6000: Set rs6000_cpu correctly (PR43871) We set rs6000_cpu based on tune_index, but it should be cpu_index. This patch fixes it. PR target/43871 * config/rs6000/rs6000.c (rs6000_option_override_internal): Set rs6000_cpu based on cpu_index, not tune_index. From-SVN: r255349 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 11ccbfb91c2..da0c32e9a6d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-12-01 Segher Boessenkool + + PR target/43871 + * config/rs6000/rs6000.c (rs6000_option_override_internal): Set + rs6000_cpu based on cpu_index, not tune_index. + 2017-12-01 Segher Boessenkool * final.c (output_asm_name): Print insn_cost. Shorten output. Print diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 5f5f6d51ef8..2adf406aac7 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -4184,8 +4184,8 @@ rs6000_option_override_internal (bool global_init_p) } } - gcc_assert (tune_index >= 0); - rs6000_cpu = processor_target_table[tune_index].processor; + gcc_assert (cpu_index >= 0); + rs6000_cpu = processor_target_table[cpu_index].processor; if (rs6000_cpu == PROCESSOR_PPCE300C2 || rs6000_cpu == PROCESSOR_PPCE300C3 || rs6000_cpu == PROCESSOR_PPCE500MC || rs6000_cpu == PROCESSOR_PPCE500MC64