This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Add SSE4.1 support


On Fri, Apr 20, 2007 at 03:20:06PM -0700, Richard Henderson wrote:
> On Fri, Apr 20, 2007 at 02:48:40PM -0700, H. J. Lu wrote:
> > I tried and couldn't get it to work. Any help is appreciated.
> 
> What?!?  You can't figure out how to emit the same insns
> that I was emitting before?!?

The old one is

(define_expand "umaxv8hi3"
  [(set (match_operand:V8HI 0 "register_operand" "=x")
        (us_minus:V8HI (match_operand:V8HI 1 "register_operand" "0") 
                       (match_operand:V8HI 2 "nonimmediate_operand" "xm")))
   (set (match_dup 3)
        (plus:V8HI (match_dup 0) (match_dup 2)))]
  "TARGET_SSE2"

The new one is

(define_expand "umaxv8hi3"
  [(set (match_operand:V8HI 0 "register_operand" "")
        (umax:V8HI (match_operand:V8HI 1 "nonimmediate_operand" "")
                   (match_operand:V8HI 2 "nonimmediate_operand" "")))]
  "TARGET_SSE4_1"

I am not able to generate 2 different templates with the same name,
umaxv8hi3, depending on TARGET_SSE4_1 or TARGET_SSE2.



H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]