[PATCH] Rename CONVERT_RNDSAT td name to better match it
Ahmed Bougacha
ahmed.bougacha at gmail.com
Wed Jan 14 15:15:48 PST 2015
So.. I've been wondering about this for a while: these (and the
associated ISD opcode) don't seem to be referenced by any target, and
the comment says the opcode is pretty much deprecated. Maybe we should
just remove them completely?
- Ahmed
On Wed, Jan 14, 2015 at 11:59 PM, Matt Arsenault
<Matthew.Arsenault at amd.com> wrote:
> I want to define an instruction called cvt, which was
> surprisingly already taken by this. This node is not supposed
> to be directly used, and has a somewhat surprising name. Rename it
> to make it more obvious what it is, and more appropriate for
> a private node.
>
> http://reviews.llvm.org/D6980
>
> Files:
> include/llvm/Target/TargetSelectionDAG.td
>
> Index: include/llvm/Target/TargetSelectionDAG.td
> ===================================================================
> --- include/llvm/Target/TargetSelectionDAG.td
> +++ include/llvm/Target/TargetSelectionDAG.td
> @@ -509,7 +509,7 @@
> SDTypeProfile<1, -1, [SDTCisPtrTy<1>]>, []>;
>
> // Do not use cvt directly. Use cvt forms below
> -def cvt : SDNode<"ISD::CONVERT_RNDSAT", SDTConvertOp>;
> +def convert_rndsat : SDNode<"ISD::CONVERT_RNDSAT", SDTConvertOp>;
>
> def SDT_assertext : SDTypeProfile<1, 1,
> [SDTCisInt<0>, SDTCisInt<1>, SDTCisSameAs<1, 0>]>;
> @@ -976,47 +976,47 @@
> // Selection DAG CONVERT_RNDSAT patterns
>
> def cvtff : PatFrag<(ops node:$val, node:$dty, node:$sty, node:$rd, node:$sat),
> - (cvt node:$val, node:$dty, node:$sty, node:$rd, node:$sat), [{
> + (convert_rndsat node:$val, node:$dty, node:$sty, node:$rd, node:$sat), [{
> return cast<CvtRndSatSDNode>(N)->getCvtCode() == ISD::CVT_FF;
> }]>;
>
> def cvtss : PatFrag<(ops node:$val, node:$dty, node:$sty, node:$rd, node:$sat),
> - (cvt node:$val, node:$dty, node:$sty, node:$rd, node:$sat), [{
> + (convert_rndsat node:$val, node:$dty, node:$sty, node:$rd, node:$sat), [{
> return cast<CvtRndSatSDNode>(N)->getCvtCode() == ISD::CVT_SS;
> }]>;
>
> def cvtsu : PatFrag<(ops node:$val, node:$dty, node:$sty, node:$rd, node:$sat),
> - (cvt node:$val, node:$dty, node:$sty, node:$rd, node:$sat), [{
> + (convert_rndsat node:$val, node:$dty, node:$sty, node:$rd, node:$sat), [{
> return cast<CvtRndSatSDNode>(N)->getCvtCode() == ISD::CVT_SU;
> }]>;
>
> def cvtus : PatFrag<(ops node:$val, node:$dty, node:$sty, node:$rd, node:$sat),
> - (cvt node:$val, node:$dty, node:$sty, node:$rd, node:$sat), [{
> + (convert_rndsat node:$val, node:$dty, node:$sty, node:$rd, node:$sat), [{
> return cast<CvtRndSatSDNode>(N)->getCvtCode() == ISD::CVT_US;
> }]>;
>
> def cvtuu : PatFrag<(ops node:$val, node:$dty, node:$sty, node:$rd, node:$sat),
> - (cvt node:$val, node:$dty, node:$sty, node:$rd, node:$sat), [{
> + (convert_rndsat node:$val, node:$dty, node:$sty, node:$rd, node:$sat), [{
> return cast<CvtRndSatSDNode>(N)->getCvtCode() == ISD::CVT_UU;
> }]>;
>
> def cvtsf : PatFrag<(ops node:$val, node:$dty, node:$sty, node:$rd, node:$sat),
> - (cvt node:$val, node:$dty, node:$sty, node:$rd, node:$sat), [{
> + (convert_rndsat node:$val, node:$dty, node:$sty, node:$rd, node:$sat), [{
> return cast<CvtRndSatSDNode>(N)->getCvtCode() == ISD::CVT_SF;
> }]>;
>
> def cvtuf : PatFrag<(ops node:$val, node:$dty, node:$sty, node:$rd, node:$sat),
> - (cvt node:$val, node:$dty, node:$sty, node:$rd, node:$sat), [{
> + (convert_rndsat node:$val, node:$dty, node:$sty, node:$rd, node:$sat), [{
> return cast<CvtRndSatSDNode>(N)->getCvtCode() == ISD::CVT_UF;
> }]>;
>
> def cvtfs : PatFrag<(ops node:$val, node:$dty, node:$sty, node:$rd, node:$sat),
> - (cvt node:$val, node:$dty, node:$sty, node:$rd, node:$sat), [{
> + (convert_rndsat node:$val, node:$dty, node:$sty, node:$rd, node:$sat), [{
> return cast<CvtRndSatSDNode>(N)->getCvtCode() == ISD::CVT_FS;
> }]>;
>
> def cvtfu : PatFrag<(ops node:$val, node:$dty, node:$sty, node:$rd, node:$sat),
> - (cvt node:$val, node:$dty, node:$sty, node:$rd, node:$sat), [{
> + (convert_rndsat node:$val, node:$dty, node:$sty, node:$rd, node:$sat), [{
> return cast<CvtRndSatSDNode>(N)->getCvtCode() == ISD::CVT_FU;
> }]>;
>
> EMAIL PREFERENCES
> http://reviews.llvm.org/settings/panel/emailpreferences/
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
More information about the llvm-commits
mailing list