diff options
author | Martin Liska <mliska@suse.cz> | 2019-06-27 13:22:36 +0200 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2019-06-27 11:22:36 +0000 |
commit | ef874db611879d5004e1d834543e55d31f2bfe1c (patch) | |
tree | 5acb8e41e88dfb0425ffef3d4f96e0dbaf9601eb /gcc | |
parent | d2d604d83edb86ce3f492d03900fb29dea97725d (diff) | |
download | gcc-ef874db611879d5004e1d834543e55d31f2bfe1c.zip gcc-ef874db611879d5004e1d834543e55d31f2bfe1c.tar.gz gcc-ef874db611879d5004e1d834543e55d31f2bfe1c.tar.bz2 |
Fix various issues seen with clang-static-analyzer.
2019-06-27 Martin Liska <mliska@suse.cz>
PR tree-optimization/90974
PR rtl-optimization/90975
PR rtl-optimization/90976
PR target/91016
PR tree-optimization/91017
* config/i386/i386-expand.c (ix86_expand_rounddf_32): Remove
unused tmp.
* lra.c (lra_set_insn_recog_data): Remove a leftover from
initial commit of IRA.
* optabs.c (expand_twoval_binop): Use xop0 and xop1 instead
of op0 and op1.
* tree-vect-loop.c (vect_create_epilog_for_reduction):
Remove unused mode1.
* tree-vect-stmts.c (vectorizable_call): Remove dead assignment
to new_stmt_info.
From-SVN: r272746
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 18 | ||||
-rw-r--r-- | gcc/config/i386/i386-expand.c | 5 | ||||
-rw-r--r-- | gcc/lra.c | 8 | ||||
-rw-r--r-- | gcc/optabs.c | 4 | ||||
-rw-r--r-- | gcc/tree-vect-loop.c | 1 | ||||
-rw-r--r-- | gcc/tree-vect-stmts.c | 6 |
6 files changed, 26 insertions, 16 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 73c0be0..f536afb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,21 @@ +2019-06-27 Martin Liska <mliska@suse.cz> + + PR tree-optimization/90974 + PR rtl-optimization/90975 + PR rtl-optimization/90976 + PR target/91016 + PR tree-optimization/91017 + * config/i386/i386-expand.c (ix86_expand_rounddf_32): Remove + unused tmp. + * lra.c (lra_set_insn_recog_data): Remove a leftover from + initial commit of IRA. + * optabs.c (expand_twoval_binop): Use xop0 and xop1 instead + of op0 and op1. + * tree-vect-loop.c (vect_create_epilog_for_reduction): + Remove unused mode1. + * tree-vect-stmts.c (vectorizable_call): Remove dead assignment + to new_stmt_info. + 2019-06-27 Jakub Jelinek <jakub@redhat.com> PR target/90991 diff --git a/gcc/config/i386/i386-expand.c b/gcc/config/i386/i386-expand.c index d50b811..8a4955f 100644 --- a/gcc/config/i386/i386-expand.c +++ b/gcc/config/i386/i386-expand.c @@ -16052,14 +16052,13 @@ ix86_expand_rounddf_32 (rtx operand0, rtx operand1) 0, OPTAB_DIRECT); /* Compensate. */ - tmp = gen_reg_rtx (mode); /* xa2 = xa2 - (dxa > 0.5 ? 1 : 0) */ tmp = ix86_expand_sse_compare_mask (UNGT, dxa, half, false); - emit_insn (gen_rtx_SET (tmp, gen_rtx_AND (mode, one, tmp))); + emit_insn (gen_rtx_SET (tmp, gen_rtx_AND (mode, tmp, one))); xa2 = expand_simple_binop (mode, MINUS, xa2, tmp, NULL_RTX, 0, OPTAB_DIRECT); /* xa2 = xa2 + (dxa <= -0.5 ? 1 : 0) */ tmp = ix86_expand_sse_compare_mask (UNGE, mhalf, dxa, false); - emit_insn (gen_rtx_SET (tmp, gen_rtx_AND (mode, one, tmp))); + emit_insn (gen_rtx_SET (tmp, gen_rtx_AND (mode, tmp, one))); xa2 = expand_simple_binop (mode, PLUS, xa2, tmp, NULL_RTX, 0, OPTAB_DIRECT); /* res = copysign (xa2, operand1) */ @@ -1029,12 +1029,8 @@ lra_set_insn_recog_data (rtx_insn *insn) data->operand_loc, constraints, operand_mode, NULL); if (nop > 0) - { - const char *p = recog_data.constraints[0]; - - for (p = constraints[0]; *p; p++) - nalt += *p == ','; - } + for (const char *p =constraints[0]; *p; p++) + nalt += *p == ','; data->insn_static_data = insn_static_data = get_static_insn_data (-1, nop, 0, nalt); for (i = 0; i < nop; i++) diff --git a/gcc/optabs.c b/gcc/optabs.c index 5a718e7..18ca737 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -2095,8 +2095,8 @@ expand_twoval_binop (optab binoptab, rtx op0, rtx op1, rtx targ0, rtx targ1, xop1 = avoid_expensive_constant (mode1, binoptab, 1, xop1, unsignedp); create_fixed_operand (&ops[0], targ0); - create_convert_operand_from (&ops[1], op0, mode, unsignedp); - create_convert_operand_from (&ops[2], op1, mode, unsignedp); + create_convert_operand_from (&ops[1], xop0, mode, unsignedp); + create_convert_operand_from (&ops[2], xop1, mode, unsignedp); create_fixed_operand (&ops[3], targ1); if (maybe_expand_insn (icode, 4, ops)) return 1; diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index 95c2d82..5176474 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -5427,7 +5427,6 @@ vect_create_epilog_for_reduction (vec<tree> vect_defs, dump_printf_loc (MSG_NOTE, vect_location, "Reduce using vector shifts\n"); - mode1 = TYPE_MODE (vectype1); vec_dest = vect_create_destination_var (scalar_dest, vectype1); for (elt_offset = nelements / 2; elt_offset >= 1; diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index 47da295..415ac0c 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -3483,8 +3483,7 @@ vectorizable_call (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, = gimple_build_call_internal_vec (ifn, vargs); gimple_call_set_lhs (call, half_res); gimple_call_set_nothrow (call, true); - new_stmt_info - = vect_finish_stmt_generation (stmt_info, call, gsi); + vect_finish_stmt_generation (stmt_info, call, gsi); if ((i & 1) == 0) { prev_res = half_res; @@ -3583,8 +3582,7 @@ vectorizable_call (stmt_vec_info stmt_info, gimple_stmt_iterator *gsi, gcall *call = gimple_build_call_internal_vec (ifn, vargs); gimple_call_set_lhs (call, half_res); gimple_call_set_nothrow (call, true); - new_stmt_info - = vect_finish_stmt_generation (stmt_info, call, gsi); + vect_finish_stmt_generation (stmt_info, call, gsi); if ((j & 1) == 0) { prev_res = half_res; |