diff options
author | Andrew Hsieh <andrewhsieh@google.com> | 2014-06-18 13:00:04 -0700 |
---|---|---|
committer | Pavel Chupin <pavel.v.chupin@intel.com> | 2014-06-19 22:38:42 +0400 |
commit | f190d6284359da8ae8694b2d2e14b01602a959ed (patch) | |
tree | d4e0548e7cec02d60b1082368032e66a1c509a02 /gcc-4.8/gcc/tree-ssa-reassoc.c | |
parent | 4ff2f42147bc128ce38789071d98e55844cd3a5e (diff) | |
download | toolchain_gcc-f190d6284359da8ae8694b2d2e14b01602a959ed.tar.gz toolchain_gcc-f190d6284359da8ae8694b2d2e14b01602a959ed.tar.bz2 toolchain_gcc-f190d6284359da8ae8694b2d2e14b01602a959ed.zip |
Merge GCC 4.8.3
Change-Id: I0abe59f7705b3eccc6b2f123af75b2e30917696a
Diffstat (limited to 'gcc-4.8/gcc/tree-ssa-reassoc.c')
-rw-r--r-- | gcc-4.8/gcc/tree-ssa-reassoc.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc-4.8/gcc/tree-ssa-reassoc.c b/gcc-4.8/gcc/tree-ssa-reassoc.c index a1a9a7319..e724e181c 100644 --- a/gcc-4.8/gcc/tree-ssa-reassoc.c +++ b/gcc-4.8/gcc/tree-ssa-reassoc.c @@ -785,8 +785,7 @@ eliminate_not_pairs (enum tree_code opcode, if (opcode == BIT_AND_EXPR) oe->op = build_zero_cst (TREE_TYPE (oe->op)); else if (opcode == BIT_IOR_EXPR) - oe->op = build_low_bits_mask (TREE_TYPE (oe->op), - TYPE_PRECISION (TREE_TYPE (oe->op))); + oe->op = build_all_ones_cst (TREE_TYPE (oe->op)); reassociate_stats.ops_eliminated += ops->length () - 1; ops->truncate (0); @@ -1980,6 +1979,13 @@ update_range_test (struct range_entry *range, struct range_entry *otherrange, tem = fold_convert_loc (loc, optype, tem); gsi = gsi_for_stmt (stmt); + /* In rare cases range->exp can be equal to lhs of stmt. + In that case we have to insert after the stmt rather then before + it. */ + if (op == range->exp) + tem = force_gimple_operand_gsi (&gsi, tem, true, NULL_TREE, false, + GSI_SAME_STMT); + else tem = force_gimple_operand_gsi (&gsi, tem, true, NULL_TREE, true, GSI_SAME_STMT); |