Commit f942ef18 by Bill Schmidt Committed by William Schmidt

re PR middle-end/89008 (O2 and O1 results differ for simple test)

2018-01-31  Bill Schmidt  <wschmidt@linux.ibm.com>

	PR tree-optimization/89008
	* gimple-ssa-strength-reduction.c (slsr_process_mul): Don't
	process anything of the form X * 0.

From-SVN: r268422
parent 3a3f5dd1
2018-01-31 Bill Schmidt <wschmidt@linux.ibm.com>
PR tree-optimization/89008
* gimple-ssa-strength-reduction.c (slsr_process_mul): Don't
process anything of the form X * 0.
2019-01-31 Richard Biener <rguenther@suse.de>
PR tree-optimization/89135
......
......@@ -1268,7 +1268,7 @@ slsr_process_mul (gimple *gs, tree rhs1, tree rhs2, bool speed)
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment