[PATCH] [hexagon] remove sxth after max with two halfword operands

Jyotsna Verma jverma at codeaurora.org
Mon Feb 4 10:03:14 PST 2013


Please move them to the appropriate HexagonIntrinsics[V3/V4].td file.
HexagonIntrinsicsOpt.td is not the right place for these patterns.

Thanks,
Jyotsna 

--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by
The Linux Foundation


> -----Original Message-----
> From: iajbar at codeaurora.org [mailto:iajbar at codeaurora.org]
> Sent: Monday, February 04, 2013 11:47 AM
> To: Jyotsna Verma
> Cc: 'Ikhlas Ajbar'; llvm-commits at cs.uiuc.edu; adasgupt at codeaurora.org
> Subject: RE: [PATCH] [hexagon] remove sxth after max with two halfword
> operands
> 
> I put these intrinsics in Hexagon.td because they take an intrinsic and an
SD
> node. Maybe I should move them to HexagonIntrinsicsOpt.td and include it
> after the instruction and intrinsics td files.
> 
> Thanks,
> Ikhlas
> 
> 
> > Also, is there a reason for defining these intrinsics in Hexagon.td
> > instead of HexagonIntrinsics.td?
> >
> > +//===----------------------------------------------------------------
> > +------
> > ===//
> > +// DAG to DAG optimizations: this section needs to be after including
> > +// HexagonInstrInfo.td and HexagonIntrinsics.td.
> > +//===----------------------------------------------------------------
> > +------
> > ===//
> > +
> > +class sextMinMaxIntrinsic<Intrinsic Op, InstHexagon Inst> :
> > +  Pat<(i32 (sext_inreg (i32 (Op (i32 PositiveHalfWord:$a),
> > +                                (i32 PositiveHalfWord:$b))),
> > +                       i16)),
> > +      (i32 (Inst (i32 IntRegs:$a), (i32 IntRegs:$b)))>;
> > +
> > +
> > +def : sextMinMaxIntrinsic<int_hexagon_A2_max, HEXAGON_A2_max>;
> def :
> > +sextMinMaxIntrinsic<int_hexagon_A2_maxu, HEXAGON_A2_maxu>; def
> :
> > +sextMinMaxIntrinsic<int_hexagon_A2_min, HEXAGON_A2_min>; def :
> > +sextMinMaxIntrinsic<int_hexagon_A2_minu, HEXAGON_A2_minu>;
> >
> > -Jyotsna
> > --
> > Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
> > hosted by The Linux Foundation
> >
> >
> >> -----Original Message-----
> >> From: Ikhlas Ajbar [mailto:iajbar at codeaurora.org]
> >> Sent: Tuesday, January 29, 2013 9:55 PM
> >> To: llvm-commits at cs.uiuc.edu
> >> Cc: iajbar at codeaurora.org; jverma at codeaurora.org;
> >> adasgupt at codeaurora.org
> >> Subject: [PATCH] [hexagon] remove sxth after max with two halfword
> >> operands
> >>
> >> Hello,
> >>
> >> The attached patch improves the way min and max instructions are
> >> generated to recognize more patterns. In particular, this patch was
> >> needed to remove a sign extend halfword "sxth" after a max with two
> >> halfword
> >> operands: testcases attached.
> >>
> >> Tested on x86-linux with make check. Could you please review the patch?
> >>
> >> Thanks,
> >> Ikhlas
> >
> >
> 





More information about the llvm-commits mailing list