]> granicus.if.org Git - llvm/commit
[X86] Relocate code of replacement of subtarget unsupported masked memory intrinsics...
authorAyman Musa <ayman.musa@intel.com>
Mon, 15 May 2017 11:30:54 +0000 (11:30 +0000)
committerAyman Musa <ayman.musa@intel.com>
Mon, 15 May 2017 11:30:54 +0000 (11:30 +0000)
commiteadb58fda7ced8c034bb995de9a5eb22d5adcfd1
treea4012c30fcd394958aa296b3165c4e78724f2e3f
parenta7e79eeb4155386a9eab1ab452c95e372269feef
[X86] Relocate code of replacement of subtarget unsupported masked memory intrinsics to run also on -O0 option.

Currently, when masked load, store, gather or scatter intrinsics are used, we check in CodeGenPrepare pass if the subtarget support these intrinsics, if not we replace them with scalar code - this is a functional transformation not an optimization (not optional).

CodeGenPrepare pass does not run when the optimization level is set to CodeGenOpt::None (-O0).

Functional transformation should run with all optimization levels, so here I created a new pass which runs on all optimization levels and does no more than this transformation.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303050 91177308-0d34-0410-b5e6-96231b3b80d8
13 files changed:
include/llvm/CodeGen/Passes.h
include/llvm/InitializePasses.h
include/llvm/LinkAllPasses.h
lib/CodeGen/CMakeLists.txt
lib/CodeGen/CodeGen.cpp
lib/CodeGen/CodeGenPrepare.cpp
lib/CodeGen/ScalarizeMaskedMemIntrin.cpp [new file with mode: 0644]
lib/CodeGen/TargetPassConfig.cpp
test/CodeGen/X86/O0-pipeline.ll
test/CodeGen/X86/masked_gather_scatter.ll
test/CodeGen/X86/replace_unsupported_masked_mem_intrin.ll [new file with mode: 0644]
tools/llc/llc.cpp
tools/opt/opt.cpp