[EarlyCSE] Handle masked loads and stores
authorKrzysztof Parzyszek <kparzysz@quicinc.com>
Tue, 1 Sep 2020 22:31:12 +0000 (17:31 -0500)
committerKrzysztof Parzyszek <kparzysz@quicinc.com>
Mon, 21 Sep 2020 23:47:10 +0000 (18:47 -0500)
commitae3f54c1e909743a89d48a8a05e18d2c8fd652ba
treeda6dc6dc7234b4fb2662664746f0a0cb0711f491
parent44b1643d17753fb2f35ef1d42420a4578bb8d55d
[EarlyCSE] Handle masked loads and stores

Extend the handling of memory intrinsics to also include non-
target-specific intrinsics, in particular masked loads and stores.

Invent "isHandledNonTargetIntrinsic" to distinguish between intrin-
sics that should be handled natively from intrinsics that can be
passed to TTI.

Add code that handles masked loads and stores and update the
testcase to reflect the results.

Differential Revision: https://reviews.llvm.org/D87340
llvm/lib/Transforms/Scalar/EarlyCSE.cpp
llvm/test/Transforms/EarlyCSE/masked-intrinsics-unequal-masks.ll
llvm/test/Transforms/EarlyCSE/masked-intrinsics.ll