[X86][AVX] Ensure broadcast loads respect dependencies
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 2 Oct 2016 15:59:15 +0000 (15:59 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 2 Oct 2016 15:59:15 +0000 (15:59 +0000)
commit03afbe783d64d55ee8ef4b69cde96f1e2ce7183e
tree10e6a8fcffef5148e829f5ec69b5831c202c30f6
parent6b582bf91f134f95bd5100beb03db9464769f1ef
[X86][AVX] Ensure broadcast loads respect dependencies

To allow broadcast loads of a non-zero'th vector element, lowerVectorShuffleAsBroadcast can replace a load with a new load with an adjusted address, but unfortunately we weren't ensuring that the new load respected the same dependencies.

This patch adds a TokenFactor and updates all dependencies of the old load to reference the new load instead.

Bug found during internal testing.

Differential Revision: https://reviews.llvm.org/D25039

llvm-svn: 283070
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/avx-vbroadcast.ll