Message ID | 67bd1180-5dc0-0ed2-9e94-8c67a61d0159@linux.ibm.com |
---|---|
State | New |
Headers | show |
Series | [committed] Fix SLSR portion of PR89008 | expand |
Index: gcc/gimple-ssa-strength-reduction.c =================================================================== --- gcc/gimple-ssa-strength-reduction.c (revision 268411) +++ gcc/gimple-ssa-strength-reduction.c (working copy) @@ -1268,7 +1268,7 @@ slsr_process_mul (gimple *gs, tree rhs1, tree rhs2 c->next_interp = c2->cand_num; c2->first_interp = c->cand_num; } - else if (TREE_CODE (rhs2) == INTEGER_CST) + else if (TREE_CODE (rhs2) == INTEGER_CST && !integer_zerop (rhs2)) { /* Record an interpretation for the multiply-immediate. */ c = create_mul_imm_cand (gs, rhs1, rhs2, speed);