K 10 svn:author V 3 dim K 8 svn:date V 27 2021-12-25T12:08:24.347359Z K 7 svn:log V 932 Apply fix for LLVM PR51957 (Miscompilation in Botan's SHA3) Merge commit e27a6db5298f from llvm git (by Jameson Nash): Bad SLPVectorization shufflevector replacement, resulting in write to wrong memory location We see that it might otherwise do: %10 = getelementptr {}**, <2 x {}***> %9, <2 x i32> %11 = bitcast <2 x {}***> %10 to <2 x i64*> ... %27 = extractelement <2 x i64*> %11, i32 0 %28 = bitcast i64* %27 to <2 x i64>* store <2 x i64> %22, <2 x i64>* %28, align 4, !tbaa !2 Which is an out-of-bounds store (the extractelement got offset 10 instead of offset 4 as intended). With the fix, we correctly generate extractelement for i32 1 and generate correct code. Differential Revision: https://reviews.llvm.org/D106613 (cherry picked from commit 397a8ba05313cc3815d219c9d1b2de1372fcb561) Git Hash: 471c6e3367a11d2d8a9bf49ca98faa1a452f77ac Git Author: dim@FreeBSD.org END