summaryrefslogtreecommitdiff
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2012-04-16 09:25:14 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2012-04-16 09:25:14 +0000
commit360b78f31baa63e9111d172577e181730ce80c1c (patch)
tree49b6bc580d6294485fb21f111c49282f11b8efdd /gcc/fold-const.c
parenta1b989062952288c270231c2c5c5fe1808ab01e8 (diff)
downloadgcc-360b78f31baa63e9111d172577e181730ce80c1c.tar.gz
2012-04-16 Richard Guenther <rguenther@suse.de>
PR tree-optimization/52975 * tree-ssa-forwprop.c (combine_cond_exprs): New function. (ssa_forward_propagate_and_combine): Call it for COND_EXPRs and VEC_COND_EXPRs. Also combine into VEC_COND_EXPRs condition. * fold-const.c (operand_equal_p): Handle TARGET_MEM_REF. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186488 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r--gcc/fold-const.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index dcd64a08a1b..8aceb733e7d 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -2562,6 +2562,14 @@ operand_equal_p (const_tree arg0, const_tree arg1, unsigned int flags)
case IMAGPART_EXPR:
return OP_SAME (0);
+ case TARGET_MEM_REF:
+ /* Require equal extra operands and then fall thru to MEM_REF
+ handling of the two common operands. */
+ if (!OP_SAME_WITH_NULL (2)
+ || !OP_SAME_WITH_NULL (3)
+ || !OP_SAME_WITH_NULL (4))
+ return 0;
+ /* Fallthru. */
case MEM_REF:
/* Require equal access sizes, and similar pointer types.
We can have incomplete types for array references of