[PATCH] D32487: [X86] Relocate code of replacement of subtarget unsupported masked memory intrinsics to run also on -O0 option

Ayman Musa via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 27 00:08:13 PDT 2017


aymanmus added inline comments.


================
Comment at: lib/CodeGen/TargetPassConfig.cpp:494
+  // that stores/loads element one-by-one if the appropriate mask bit is set.
+  addPass(createScalarizeMaskedMemIntrinPass());
 }
----------------
zvi wrote:
> Do we want this pass added for all targets unconditionally?
Yes, all targets (except for X86) define these intrinsics as illegal by inheriting the target hooks isLegalMasked{Load/Store/Gather/Scatter} (From TargetTransformInfo) which are set to return false by default.

The pass' transformations are completely controlled by target hooks so it's safe to run it on all targets (it's even a functional demand).


https://reviews.llvm.org/D32487





More information about the llvm-commits mailing list