@@ -120,10 +120,10 @@ def SDTIntShiftOp : SDTypeProfile<1, 2, [ // shl, sra, srl
120120]>;
121121def SDTIntShiftPairOp : SDTypeProfile<2, 3, [ // shl_parts, sra_parts, srl_parts
122122 SDTCisInt<0>, SDTCisSameAs<1, 0>,
123- SDTCisSameAs<2, 0>, SDTCisSameAs<3, 0>, SDTCisInt<4>
123+ SDTCisSameAs<2, 0>, SDTCisSameAs<3, 0>, SDTCisInt<4>, SDTCisSameNumEltsAs<0, 4>
124124]>;
125125def SDTIntShiftDOp: SDTypeProfile<1, 3, [ // fshl, fshr
126- SDTCisSameAs<0, 1>, SDTCisSameAs<0, 2>, SDTCisInt<0>, SDTCisInt<3>
126+ SDTCisSameAs<0, 1>, SDTCisSameAs<0, 2>, SDTCisInt<0>, SDTCisInt<3>, SDTCisSameNumEltsAs<0, 3>
127127]>;
128128def SDTIntSatNoShOp : SDTypeProfile<1, 2, [ // ssat with no shift
129129 SDTCisSameAs<0, 1>, SDTCisInt<2>
@@ -139,7 +139,7 @@ def SDTFPBinOp : SDTypeProfile<1, 2, [ // fadd, fmul, etc.
139139 SDTCisSameAs<0, 1>, SDTCisSameAs<0, 2>, SDTCisFP<0>
140140]>;
141141def SDTFPSignOp : SDTypeProfile<1, 2, [ // fcopysign.
142- SDTCisSameAs<0, 1>, SDTCisFP<0>, SDTCisFP<2>
142+ SDTCisSameAs<0, 1>, SDTCisFP<0>, SDTCisFP<2>, SDTCisSameNumEltsAs<0, 2>
143143]>;
144144def SDTFPTernaryOp : SDTypeProfile<1, 3, [ // fmadd, fnmsub, etc.
145145 SDTCisSameAs<0, 1>, SDTCisSameAs<0, 2>, SDTCisSameAs<0, 3>, SDTCisFP<0>
@@ -148,7 +148,7 @@ def SDTIntUnaryOp : SDTypeProfile<1, 1, [ // bitreverse
148148 SDTCisSameAs<0, 1>, SDTCisInt<0>
149149]>;
150150def SDTIntBitCountUnaryOp : SDTypeProfile<1, 1, [ // ctlz, cttz
151- SDTCisInt<0>, SDTCisInt<1>
151+ SDTCisInt<0>, SDTCisInt<1>, SDTCisSameNumEltsAs<0, 1>
152152]>;
153153def SDTIntExtendOp : SDTypeProfile<1, 1, [ // sext, zext, anyext
154154 SDTCisInt<0>, SDTCisInt<1>, SDTCisOpSmallerThanOp<1, 0>, SDTCisSameNumEltsAs<0, 1>
0 commit comments