[PATCH] Remove another bunch of dead assignment.

Jeff Law law@redhat.com
Tue Jul 2 23:06:00 GMT 2019


On 7/1/19 4:28 AM, Martin Liška wrote:
> On 6/27/19 7:24 PM, Richard Sandiford wrote:
>> Martin Liška <mliska@suse.cz> writes:
>>> diff --git a/gcc/config/i386/i386-expand.c b/gcc/config/i386/i386-expand.c
>>> index d50b811d863..1bd251ea8e2 100644
>>> --- a/gcc/config/i386/i386-expand.c
>>> +++ b/gcc/config/i386/i386-expand.c
>>> @@ -19780,8 +19780,7 @@ ix86_expand_sse2_mulvxdi3 (rtx op0, rtx op1, rtx op2)
>>>        emit_insn (gen_vec_widen_umult_even_v4si (t5, 
>>>  					gen_lowpart (V4SImode, op1),
>>>  					gen_lowpart (V4SImode, op2)));
>>> -      op0 = expand_binop (mode, add_optab, t5, t4, op0, 1, OPTAB_DIRECT);
>>> -
>>> +      expand_binop (mode, add_optab, t5, t4, op0, 1, OPTAB_DIRECT);
>>>      }
>>>    else
>>>      {
>> This means that nothing uses the expanded value.  It looks like the
>> call was meant to be force_expand_binop instead, so that the expansion
>> always goes to op0.
> You are right. The same function is called in the else branch of the condition.
> 
> I'm sending updated version of the patch.
> 
> Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
> 
> Ready to be installed?
> Thanks,
> Martin
> 
>> Richard
>>
> 
> 0001-Remove-another-bunch-of-dead-assignment.patch
> 
> From aecb58d06336baeaa86942424c3314c6020dd754 Mon Sep 17 00:00:00 2001
> From: Martin Liska <mliska@suse.cz>
> Date: Thu, 27 Jun 2019 13:39:24 +0200
> Subject: [PATCH] Remove another bunch of dead assignment.
> 
> gcc/ChangeLog:
> 
> 2019-06-27  Martin Liska  <mliska@suse.cz>
> 
> 	* lra-eliminations.c (eliminate_regs_in_insn): Remove
> 	dead assignemts.
> 	* reg-stack.c (check_asm_stack_operands): Likewise.
> 	* tree-ssa-structalias.c (create_function_info_for): Likewise.
> 	* tree-vect-generic.c (expand_vector_operations_1): Likewise.
> 	* config/i386/i386-expand.c (ix86_expand_sse2_mulvxdi3): Use
> 	force_expand_binop.
> 
> gcc/c-family/ChangeLog:
> 
> 2019-06-27  Martin Liska  <mliska@suse.cz>
> 
> 	* c-common.c (try_to_locate_new_include_insertion_point): Remove
> 	dead assignemts.
> 
> gcc/cp/ChangeLog:
> 
> 2019-06-27  Martin Liska  <mliska@suse.cz>
> 
> 	* call.c (build_new_op_1): Remove
> 	dead assignemts.
> 	* typeck.c (cp_build_binary_op): Likewise.
> 
> gcc/fortran/ChangeLog:
> 
> 2019-06-27  Martin Liska  <mliska@suse.cz>
> 
> 	* check.c (gfc_check_c_funloc): Remove
> 	dead assignemts.
> 	* decl.c (variable_decl): Likewise.
> 	* resolve.c (resolve_typebound_function): Likewise.
> 	* simplify.c (gfc_simplify_matmul): Likewise.
> 	(gfc_simplify_scan): Likewise.
> 	* trans-array.c (gfc_could_be_alias): Likewise.
> 	* trans-common.c (add_equivalences): Likewise.
> 	* trans-expr.c (trans_class_vptr_len_assignment): Likewise.
> 	(gfc_trans_array_constructor_copy): Likewise.
> 	(gfc_trans_assignment_1): Likewise.
> 	* trans-intrinsic.c (conv_intrinsic_atomic_op): Likewise.
> 	* trans-openmp.c (gfc_omp_finish_clause): Likewise.
> 	* trans-types.c (gfc_get_array_descriptor_base): Likewise.
> 	* trans.c (gfc_build_final_call): Likewise.
> 
> libcpp/ChangeLog:
> 
> 2019-06-27  Martin Liska  <mliska@suse.cz>
> 
> 	* line-map.c (linemap_get_expansion_filename): Remove
> 	dead assignemts.
> 	* mkdeps.c (make_write): Likewise.
OK
jeff



More information about the Gcc-patches mailing list