Skip to content

Commit d7168bc

Browse files
committed
[SelectionDAG] Add SDTCisSameNumEltsAs to more operations. NFC
1 parent 37aa347 commit d7168bc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

llvm/include/llvm/Target/TargetSelectionDAG.td

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,10 @@ def SDTIntShiftOp : SDTypeProfile<1, 2, [ // shl, sra, srl
120120
]>;
121121
def 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
]>;
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>, SDTCisSameNumEltsAs<0, 3>
127127
]>;
128128
def 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
]>;
141141
def 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
]>;
144144
def 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
]>;
150150
def SDTIntBitCountUnaryOp : SDTypeProfile<1, 1, [ // ctlz, cttz
151-
SDTCisInt<0>, SDTCisInt<1>
151+
SDTCisInt<0>, SDTCisInt<1>, SDTCisSameNumEltsAs<0, 1>
152152
]>;
153153
def SDTIntExtendOp : SDTypeProfile<1, 1, [ // sext, zext, anyext
154154
SDTCisInt<0>, SDTCisInt<1>, SDTCisOpSmallerThanOp<1, 0>, SDTCisSameNumEltsAs<0, 1>

0 commit comments

Comments
 (0)