diff options
| author | Philip Reames <listmail@philipreames.com> | 2019-04-22 19:30:01 +0000 |
|---|---|---|
| committer | Philip Reames <listmail@philipreames.com> | 2019-04-22 19:30:01 +0000 |
| commit | d8d9b7b20e7b8d7a79a069ddb78e3d9ea48b1a45 (patch) | |
| tree | 3567fc357056729d7c35baf62edd7e0586b41fb1 /llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp | |
| parent | 5828421c7cd984da5a08759c1d3e2ebf02ac0c5c (diff) | |
| download | bcm5719-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.cpp | 5 |
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; } |

