Skip to content

Commit e0f6bc6

Browse files
committed
[SelectionDAG] Add SDTCisSameNumEltsAs to SDTIntShiftOp.
Shift amount may have a different scalar size than the result, but they should have the same number of elements or they should both be scalar. Stacked on llvm#162754
1 parent 9955249 commit e0f6bc6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/include/llvm/Target/TargetSelectionDAG.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def SDTIntBinOp : SDTypeProfile<1, 2, [ // add, and, or, xor, udiv, etc.
116116
SDTCisSameAs<0, 1>, SDTCisSameAs<0, 2>, SDTCisInt<0>
117117
]>;
118118
def SDTIntShiftOp : SDTypeProfile<1, 2, [ // shl, sra, srl
119-
SDTCisSameAs<0, 1>, SDTCisInt<0>, SDTCisInt<2>
119+
SDTCisSameAs<0, 1>, SDTCisInt<0>, SDTCisInt<2>, SDTCisSameNumEltsAs<0, 2>
120120
]>;
121121
def SDTIntShiftPairOp : SDTypeProfile<2, 3, [ // shl_parts, sra_parts, srl_parts
122122
SDTCisInt<0>, SDTCisSameAs<1, 0>,

0 commit comments

Comments
 (0)