aboutsummaryrefslogtreecommitdiff
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2012-04-16 09:25:14 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2012-04-16 09:25:14 +0000
commit2515d916454a145367d8924a00d4468647ed30cd (patch)
tree49b6bc580d6294485fb21f111c49282f11b8efdd /gcc/fold-const.c
parent42ff605a7b16220b75a640ff22a32f4acd62802e (diff)
downloadgcc-2515d916454a145367d8924a00d4468647ed30cd.zip
gcc-2515d916454a145367d8924a00d4468647ed30cd.tar.gz
gcc-2515d916454a145367d8924a00d4468647ed30cd.tar.bz2
re PR tree-optimization/52975 (Ofast produces not optimized code for vectorized "converted if")
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. From-SVN: r186488
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 dcd64a0..8aceb73 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