[PATCH][4.6] Fix PR43152

Richard Guenther rguenther@suse.de
Wed Mar 3 13:08:00 GMT 2010


This fixes one tiny piece of missing vectorization target infrastructure
for AVX.  It would be nice if the target maintainers could go over the
vectorizer specific patterns and extend them according to AVX.

Queued for 4.6, ok?

Thanks,
Richard.

2010-03-03  Richard Guenther  <rguenther@suse.de>

	PR target/43152
	* config/i386/sse.md (vcond<mode>): Handle AVX modes as well.

Index: trunk/gcc/config/i386/sse.md
===================================================================
*** trunk.orig/gcc/config/i386/sse.md	2010-02-23 17:07:10.000000000 +0100
--- trunk/gcc/config/i386/sse.md	2010-02-23 17:10:03.000000000 +0100
***************
*** 1538,1551 ****
     (set_attr "mode" "<MODE>")])
  
  (define_expand "vcond<mode>"
!   [(set (match_operand:SSEMODEF2P 0 "register_operand" "")
!         (if_then_else:SSEMODEF2P
            (match_operator 3 ""
!             [(match_operand:SSEMODEF2P 4 "nonimmediate_operand" "")
!              (match_operand:SSEMODEF2P 5 "nonimmediate_operand" "")])
!           (match_operand:SSEMODEF2P 1 "general_operand" "")
!           (match_operand:SSEMODEF2P 2 "general_operand" "")))]
!   "SSE_VEC_FLOAT_MODE_P (<MODE>mode)"
  {
    bool ok = ix86_expand_fp_vcond (operands);
    gcc_assert (ok);
--- 1538,1552 ----
     (set_attr "mode" "<MODE>")])
  
  (define_expand "vcond<mode>"
!   [(set (match_operand:AVXMODEF2P 0 "register_operand" "")
!         (if_then_else:AVXMODEF2P
            (match_operator 3 ""
!             [(match_operand:AVXMODEF2P 4 "nonimmediate_operand" "")
!              (match_operand:AVXMODEF2P 5 "nonimmediate_operand" "")])
!           (match_operand:AVXMODEF2P 1 "general_operand" "")
!           (match_operand:AVXMODEF2P 2 "general_operand" "")))]
!   "(SSE_VEC_FLOAT_MODE_P (<MODE>mode)
!     || AVX_VEC_FLOAT_MODE_P (<MODE>mode))"
  {
    bool ok = ix86_expand_fp_vcond (operands);
    gcc_assert (ok);



More information about the Gcc-patches mailing list