Skip to content

Commit cb5c4a5

Browse files
committed
[X86] lowerV8I16Shuffle - use explicit SmallVector<SDValue, 4> width to avoid MSVC AVX alignment bug
As discussed on Issue llvm#54645 - building llc with /AVX can result in incorrectly aligned structs
1 parent a5a598b commit cb5c4a5

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
@@ -15838,7 +15838,8 @@ static SDValue lowerV8I16Shuffle(const SDLoc &DL, ArrayRef<int> Mask,
1583815838
V1 = extract128BitVector(V1V2, 0, DAG, DL);
1583915839
V2 = extract128BitVector(V1V2, 4, DAG, DL);
1584015840
} else {
15841-
SmallVector<SDValue> DWordClearOps(4, DAG.getConstant(0, DL, MVT::i32));
15841+
SmallVector<SDValue, 4> DWordClearOps(4,
15842+
DAG.getConstant(0, DL, MVT::i32));
1584215843
for (unsigned i = 0; i != 4; i += 1 << (NumEvenDrops - 1))
1584315844
DWordClearOps[i] = DAG.getConstant(0xFFFF, DL, MVT::i32);
1584415845
SDValue DWordClearMask =

0 commit comments

Comments
 (0)