[LegalizeDAG] Move legalization of scatter and masked store from LegalizeVectorOps...
authorCraig Topper <craig.topper@intel.com>
Mon, 8 Oct 2018 00:04:55 +0000 (00:04 +0000)
committerCraig Topper <craig.topper@intel.com>
Mon, 8 Oct 2018 00:04:55 +0000 (00:04 +0000)
commitcd38de8b15ffc50454f010cbcae3e508eccf2633
treec6eb990d84220db0fd713d672331e700fc7cd694
parent8380c9e918c2b1be0840fe67bb394419ec41ea83
[LegalizeDAG] Move legalization of scatter and masked store from LegalizeVectorOps to LegalizeDAG.

This is where we legalize gather and masked load so this is consistent.

Since these ops are always on vectors I've chosen to go with LegalizeDAG since that's what we do for other vector only ops like BUILD_VECTOR, VECTOR_SHUFFLE, etc. The ScalarizeMaskedMemIntrinsic pass should take care of scalarizing these before SelectionDAG so hopefully we don't need to worry about illegally typed scalar ops being emitted in the legalizing. If we did we would need to do this in LegalizeVectorOps so we could get the second type legalization that runs between LegalizeVectorOps and LegalizeDAG.

llvm-svn: 343947
llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp