From e9e1d143b5ea00f99191cd0e65c09ee972ebcedb Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Fri, 2 Sep 2011 13:53:32 +0000 Subject: re PR tree-optimization/27460 (Does not vectorize statements with mixed type COND_EXPRs) 2011-09-02 Richard Guenther PR tree-optimization/27460 PR middle-end/29269 * doc/md.texi (vcond): Document. * genopinit.c (optabs): Turn vcond{,u}_optab into a conversion optab with two modes. * optabs.h (enum convert_optab_index): Add COI_vcond, COI_vcondu. (enum direct_optab_index): Remove DOI_vcond, DOI_vcondu. (vcond_optab): Adjust. (vcondu_optab): Likewise. (expand_vec_cond_expr_p): Adjust prototype. * optabs.c (get_vcond_icode): Adjust. (expand_vec_cond_expr_p): Likewise. (expand_vec_cond_expr): Likewise. * tree-vect-stmts.c (vect_is_simple_cond): Return the comparison vector type. (vectorizable_condition): Allow differing types for comparison and result. * config/i386/i386.c (ix86_expand_sse_cmp): Use proper mode for the comparison. * config/i386/sse.md (vcond): Split to vcond, vcond, vcond and vcondu. (vcondv2di): Change to vcondv2di. (vconduv2di): Likewise. * config/arm/neon.md (vcond): Change to vcond*. (vcondu): Likewise. * config/ia64/vect.md (vcond): Likewise. (vcondu): Likewise. (vcondv2sf): Likewise. * config/mips/mips-ps-3d.md (vcondv2sf): Likewise. * config/rs6000/paired.md (vcondv2sf): Likewise. * config/rs6000/vector.md (vcond): Likewise. (vcondu): Likewise. * config/spu/spu.md (vcond): Likewise. (vcondu): Likewise. * gcc.dg/vect/vect-cond-7.c: New testcase. From-SVN: r178480 --- gcc/config/spu/spu.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc/config/spu') diff --git a/gcc/config/spu/spu.md b/gcc/config/spu/spu.md index 5742e0d96c1..676d54e8de0 100644 --- a/gcc/config/spu/spu.md +++ b/gcc/config/spu/spu.md @@ -3874,7 +3874,7 @@ selb\t%0,%4,%0,%3" ;; vector conditional compare patterns -(define_expand "vcond" +(define_expand "vcond" [(set (match_operand:VCMP 0 "spu_reg_operand" "=r") (if_then_else:VCMP (match_operator 3 "comparison_operator" @@ -3891,7 +3891,7 @@ selb\t%0,%4,%0,%3" FAIL; }) -(define_expand "vcondu" +(define_expand "vcondu" [(set (match_operand:VCMPU 0 "spu_reg_operand" "=r") (if_then_else:VCMPU (match_operator 3 "comparison_operator" -- cgit v1.2.1