aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-forwprop.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2013-11-23 15:21:46 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2013-11-23 15:21:46 +0100
commite07ded7bf92a813f96e6932cca384a83a089f720 (patch)
tree3588f3e5d92d09b275560f857be2669c3ba82fcb /gcc/tree-ssa-forwprop.c
parentb84acf541bfbc444da9cad9cee0d17c1746b240a (diff)
downloadgcc-e07ded7bf92a813f96e6932cca384a83a089f720.zip
gcc-e07ded7bf92a813f96e6932cca384a83a089f720.tar.gz
gcc-e07ded7bf92a813f96e6932cca384a83a089f720.tar.bz2
re PR tree-optimization/59154 (internal compiler error: tree check: expected ssa_name, have integer_cst)
PR tree-optimization/59154 * tree-ssa-reassoc.c (maybe_optimize_range_tests): When changing rhs1 of a cast and new_op is invariant, fold_convert it. * tree-ssa-forwprop.c (ssa_forward_propagate_and_combine): Only call simplify_conversion_from_bitmask if rhs1 is a SSA_NAME. From-SVN: r205307
Diffstat (limited to 'gcc/tree-ssa-forwprop.c')
-rw-r--r--gcc/tree-ssa-forwprop.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c
index d5d3bb8..6e6d115 100644
--- a/gcc/tree-ssa-forwprop.c
+++ b/gcc/tree-ssa-forwprop.c
@@ -3548,7 +3548,8 @@ ssa_forward_propagate_and_combine (void)
{
tree outer_type = TREE_TYPE (gimple_assign_lhs (stmt));
tree inner_type = TREE_TYPE (gimple_assign_rhs1 (stmt));
- if (INTEGRAL_TYPE_P (outer_type)
+ if (TREE_CODE (gimple_assign_rhs1 (stmt)) == SSA_NAME
+ && INTEGRAL_TYPE_P (outer_type)
&& INTEGRAL_TYPE_P (inner_type)
&& (TYPE_PRECISION (outer_type)
<= TYPE_PRECISION (inner_type)))