summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
diff options
context:
space:
mode:
authorPhilip Reames <listmail@philipreames.com>2019-04-22 19:30:01 +0000
committerPhilip Reames <listmail@philipreames.com>2019-04-22 19:30:01 +0000
commitd8d9b7b20e7b8d7a79a069ddb78e3d9ea48b1a45 (patch)
tree3567fc357056729d7c35baf62edd7e0586b41fb1 /llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
parent5828421c7cd984da5a08759c1d3e2ebf02ac0c5c (diff)
downloadbcm5719-llvm-d8d9b7b20e7b8d7a79a069ddb78e3d9ea48b1a45.tar.gz
bcm5719-llvm-d8d9b7b20e7b8d7a79a069ddb78e3d9ea48b1a45.zip
[InstSimplify] Move masked.gather w/no active lanes handling to InstSimplify from InstCombine
In the process, use the existing masked.load combine which is slightly stronger, and handles a mix of zero and undef elements in the mask. llvm-svn: 358913
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
index 5ae56215944..6f8328405e6 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
@@ -1220,11 +1220,6 @@ Instruction *InstCombiner::simplifyMaskedStore(IntrinsicInst &II) {
// * Vector splat address w/known mask -> scalar load
// * Vector incrementing address -> vector masked load
static Instruction *simplifyMaskedGather(IntrinsicInst &II, InstCombiner &IC) {
- // If the mask is all zeros, return the "passthru" argument of the gather.
- auto *ConstMask = dyn_cast<Constant>(II.getArgOperand(2));
- if (ConstMask && ConstMask->isNullValue())
- return IC.replaceInstUsesWith(II, II.getArgOperand(3));
-
return nullptr;
}
OpenPOWER on IntegriCloud