[PATCH] D16828: [x86] convert masked store of one element to scalar store

Andrea Di Biagio via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 3 09:12:15 PST 2016

andreadb added a subscriber: andreadb.
andreadb added a comment.

In http://reviews.llvm.org/D16828#343021, @RKSimon wrote:

> Some minor comments. I wonder if this could be moved to DAGCombiner - possibly with a test for scalar store legality and  TLI.isExtractVectorElementCheap()?

I know that on AVX, VMASKMOV does not imply the non-temporal hint. However, what about targets that implement masked stores as non-temporal stores of selected bytes? For those targets, not preserving the non-temporal hint when converting the mask store into a scalar store would affect the hardware write combining logic.
That said, my knowledge is only limited to x86, so I cannot say that those targets exist.. What I am trying to say is that we probably have to be careful if we decide to move this transformation into the DAGCombiner as different targets may expand those nodes in a slightly different way (not sure if this makes sense..).
Basically, I recommend leaving it for now as a target specific combine (just my opinion).


More information about the llvm-commits mailing list