Skip to content

Commit a619f31

Browse files
committed
[X86] combineConcatVectorOps - add missing VT/Subtarget checks for MOV*DUP concatenation folds.
1 parent c35092c commit a619f31

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58012,7 +58012,8 @@ static SDValue combineConcatVectorOps(const SDLoc &DL, MVT VT,
5801258012
case X86ISD::MOVDDUP:
5801358013
case X86ISD::MOVSHDUP:
5801458014
case X86ISD::MOVSLDUP: {
58015-
if (!IsSplat)
58015+
if (!IsSplat && (VT.is256BitVector() ||
58016+
(VT.is512BitVector() && Subtarget.useAVX512Regs())))
5801658017
return DAG.getNode(Op0.getOpcode(), DL, VT,
5801758018
ConcatSubOperand(VT, Ops, 0));
5801858019
break;

0 commit comments

Comments
 (0)