Skip to content

Commit 672672b

Browse files
authored
[SelectionDAG] Add SDTCisSameNumEltsAs to more operations. NFC (#162759)
1 parent c25a2c7 commit 672672b

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

llvm/include/llvm/Target/TargetSelectionDAG.td

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,12 @@ def SDTIntShiftOp : SDTypeProfile<1, 2, [ // shl, sra, srl
119119
SDTCisSameAs<0, 1>, SDTCisInt<0>, SDTCisInt<2>, SDTCisSameNumEltsAs<0, 2>
120120
]>;
121121
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>
122+
SDTCisInt<0>, SDTCisSameAs<1, 0>, SDTCisSameAs<2, 0>, SDTCisSameAs<3, 0>,
123+
SDTCisInt<4>, SDTCisSameNumEltsAs<0, 4>
124124
]>;
125125
def 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>,
127+
SDTCisSameNumEltsAs<0, 3>
127128
]>;
128129
def SDTIntSatNoShOp : SDTypeProfile<1, 2, [ // ssat with no shift
129130
SDTCisSameAs<0, 1>, SDTCisInt<2>
@@ -139,7 +140,7 @@ def SDTFPBinOp : SDTypeProfile<1, 2, [ // fadd, fmul, etc.
139140
SDTCisSameAs<0, 1>, SDTCisSameAs<0, 2>, SDTCisFP<0>
140141
]>;
141142
def SDTFPSignOp : SDTypeProfile<1, 2, [ // fcopysign.
142-
SDTCisSameAs<0, 1>, SDTCisFP<0>, SDTCisFP<2>
143+
SDTCisSameAs<0, 1>, SDTCisFP<0>, SDTCisFP<2>, SDTCisSameNumEltsAs<0, 2>
143144
]>;
144145
def SDTFPTernaryOp : SDTypeProfile<1, 3, [ // fmadd, fnmsub, etc.
145146
SDTCisSameAs<0, 1>, SDTCisSameAs<0, 2>, SDTCisSameAs<0, 3>, SDTCisFP<0>
@@ -148,7 +149,7 @@ def SDTIntUnaryOp : SDTypeProfile<1, 1, [ // bitreverse
148149
SDTCisSameAs<0, 1>, SDTCisInt<0>
149150
]>;
150151
def SDTIntBitCountUnaryOp : SDTypeProfile<1, 1, [ // ctlz, cttz
151-
SDTCisInt<0>, SDTCisInt<1>
152+
SDTCisInt<0>, SDTCisInt<1>, SDTCisSameNumEltsAs<0, 1>
152153
]>;
153154
def SDTIntExtendOp : SDTypeProfile<1, 1, [ // sext, zext, anyext
154155
SDTCisInt<0>, SDTCisInt<1>, SDTCisOpSmallerThanOp<1, 0>, SDTCisSameNumEltsAs<0, 1>

0 commit comments

Comments
 (0)