[ScalarizeMaskedMemIntrin] Add support for scalarizing expandload and compressstore...
authorCraig Topper <craig.topper@intel.com>
Thu, 21 Mar 2019 17:38:52 +0000 (17:38 +0000)
committerCraig Topper <craig.topper@intel.com>
Thu, 21 Mar 2019 17:38:52 +0000 (17:38 +0000)
commit9f0b17a248c536b430c200e86f6017abf0e67ed3
tree2e629e18b04d166c6998c993c6986ae0edb4b527
parentf2f139e9efe592626521805213eba5565629c1b3
[ScalarizeMaskedMemIntrin] Add support for scalarizing expandload and compressstore intrinsics.

This adds support for scalarizing these intrinsics as well the X86TargetTransformInfo support to avoid scalarizing them in the cases X86 can handle.

I've omitted handling special cases for constant masks for this first pass. Though CodeGenPrepare can constant fold the branch conditions and remove some of the control flow anyway.

Fixes PR40994 and is covers most of PR3666. Might want to implement constant masks to close that.

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

llvm-svn: 356687
llvm/include/llvm/Analysis/TargetTransformInfo.h
llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
llvm/lib/Analysis/TargetTransformInfo.cpp
llvm/lib/CodeGen/ScalarizeMaskedMemIntrin.cpp
llvm/lib/Target/X86/X86TargetTransformInfo.cpp
llvm/lib/Target/X86/X86TargetTransformInfo.h
llvm/test/CodeGen/X86/pr39666.ll [new file with mode: 0644]
llvm/test/CodeGen/X86/pr40994.ll [new file with mode: 0644]
llvm/test/Transforms/ScalarizeMaskedMemIntrin/X86/expand-masked-compressstore.ll [new file with mode: 0644]
llvm/test/Transforms/ScalarizeMaskedMemIntrin/X86/expand-masked-expandload.ll [new file with mode: 0644]