aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-ssa-strength-reduction.c
diff options
context:
space:
mode:
authorBill Schmidt <wschmidt@linux.ibm.com>2019-01-31 13:53:06 +0000
committerWilliam Schmidt <wschmidt@gcc.gnu.org>2019-01-31 13:53:06 +0000
commitf942ef18b84ff6fd5774a606357e4ebcec120da3 (patch)
treeea8d9d61e47ed8cccc6d197d579399e95932207f /gcc/gimple-ssa-strength-reduction.c
parent3a3f5dd1af1d3007c60ccbabf068a18039c6522c (diff)
downloadgcc-f942ef18b84ff6fd5774a606357e4ebcec120da3.zip
gcc-f942ef18b84ff6fd5774a606357e4ebcec120da3.tar.gz
gcc-f942ef18b84ff6fd5774a606357e4ebcec120da3.tar.bz2
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
Diffstat (limited to 'gcc/gimple-ssa-strength-reduction.c')
-rw-r--r--gcc/gimple-ssa-strength-reduction.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/gimple-ssa-strength-reduction.c b/gcc/gimple-ssa-strength-reduction.c
index 82721a9..937a877 100644
--- a/gcc/gimple-ssa-strength-reduction.c
+++ b/gcc/gimple-ssa-strength-reduction.c
@@ -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);