On Tue, 2020-04-21 at 13:41 +0100, Richard Sandiford wrote: > Alan Modra via Gcc-patches <gcc-patches@gcc.gnu.org> writes: > > I believe set_rtx_cost is meant to handle a SET, not a PLUS as is > > passed in these two locations. Using the proper function for a PLUS > > doesn't make a huge difference: the only arg change to rtx_cost of any > > consequence is outer_code of SET rather than INSN. A mode of > > word_mode rather than VOIDmode makes no difference at all since the > > mode is taken from the PLUS. An opno of 1 rather than 4 also doesn't > > change anything since the only backend that does anything with opno > > (besides pass it back to a recursive rtx_cost call) is nios2, and > > there "opno == 0" is the only use of opno. > > > > Bootstrapped and regression tested powerpc64le-linux and x86_64-linux. > > OK for next stage1? > > Yes, thanks. > > Richard > > > * tree-ssa-reassoc.c (optimize_range_tests_to_bit_test): Replace > > set_rtx_cost with set_src_cost. > > * tree-switch-conversion.c (bit_test_cluster::emit): Likewise. Pushed to the trunk.
jeff > >