Created attachment 19165 [details] test case Test case attached. To reproduce: % llc < slp_test.ll | clang -x assembler - -o slp_test.good && ./slp_test.good minidx = 5 % opt < slp_test.ll -passes=slp-vectorizer | llc | clang -x assembler - -o slp_test.bad && ./slp_test.bad minidx = 6 <Abort> I'm going to revert for now.
Reverted in r313409 while the miscompile is investigated. I did look somewhat carefully and for the life of me I can't see why this is miscompiling. =/
I'm guessing but this might have been fixed by rL347759