@@ -118,6 +118,10 @@ def SDTIntBinOp : SDTypeProfile<1, 2, [ // add, and, or, xor, udiv, etc.
118118def SDTIntShiftOp : SDTypeProfile<1, 2, [ // shl, sra, srl
119119 SDTCisSameAs<0, 1>, SDTCisInt<0>, SDTCisInt<2>
120120]>;
121+ def SDTIntShiftPairOp : SDTypeProfile<2, 3, [ // shl_parts, sra_parts, srl_parts
122+ SDTCisInt<0>, SDTCisSameAs<1, 0>,
123+ SDTCisSameAs<2, 0>, SDTCisSameAs<3, 0>, SDTCisInt<4>
124+ ]>;
121125def SDTIntShiftDOp: SDTypeProfile<1, 3, [ // fshl, fshr
122126 SDTCisSameAs<0, 1>, SDTCisSameAs<0, 2>, SDTCisInt<0>, SDTCisInt<3>
123127]>;
@@ -422,6 +426,9 @@ def sra : SDNode<"ISD::SRA" , SDTIntShiftOp>;
422426def shl : SDNode<"ISD::SHL" , SDTIntShiftOp>;
423427def rotl : SDNode<"ISD::ROTL" , SDTIntShiftOp>;
424428def rotr : SDNode<"ISD::ROTR" , SDTIntShiftOp>;
429+ def shl_parts : SDNode<"ISD::SHL_PARTS" , SDTIntShiftPairOp>;
430+ def sra_parts : SDNode<"ISD::SRA_PARTS" , SDTIntShiftPairOp>;
431+ def srl_parts : SDNode<"ISD::SRL_PARTS" , SDTIntShiftPairOp>;
425432def fshl : SDNode<"ISD::FSHL" , SDTIntShiftDOp>;
426433def fshr : SDNode<"ISD::FSHR" , SDTIntShiftDOp>;
427434def and : SDNode<"ISD::AND" , SDTIntBinOp,
0 commit comments