Skip to content

Commit ec13fed

Browse files
RKSimontstellar
authored andcommitted
[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 (cherry picked from commit cb5c4a5)
1 parent aaf0c92 commit ec13fed

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
@@ -15796,7 +15796,8 @@ static SDValue lowerV8I16Shuffle(const SDLoc &DL, ArrayRef<int> Mask,
1579615796
V1 = extract128BitVector(V1V2, 0, DAG, DL);
1579715797
V2 = extract128BitVector(V1V2, 4, DAG, DL);
1579815798
} else {
15799-
SmallVector<SDValue> DWordClearOps(4, DAG.getConstant(0, DL, MVT::i32));
15799+
SmallVector<SDValue, 4> DWordClearOps(4,
15800+
DAG.getConstant(0, DL, MVT::i32));
1580015801
for (unsigned i = 0; i != 4; i += 1 << (NumEvenDrops - 1))
1580115802
DWordClearOps[i] = DAG.getConstant(0xFFFF, DL, MVT::i32);
1580215803
SDValue DWordClearMask =

0 commit comments

Comments
 (0)