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/Analysis/InstructionSimplify.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/Analysis/InstructionSimplify.cpp')
-rw-r--r-- | llvm/lib/Analysis/InstructionSimplify.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/InstructionSimplify.cpp b/llvm/lib/Analysis/InstructionSimplify.cpp index c1ae23c6727..f41256b8bb2 100644 --- a/llvm/lib/Analysis/InstructionSimplify.cpp +++ b/llvm/lib/Analysis/InstructionSimplify.cpp @@ -4876,7 +4876,8 @@ static Value *simplifyIntrinsic(Function *F, IterTy ArgBegin, IterTy ArgEnd, // Handle intrinsics with 3 or more arguments. switch (IID) { - case Intrinsic::masked_load: { + case Intrinsic::masked_load: + case Intrinsic::masked_gather: { Value *MaskArg = ArgBegin[2]; Value *PassthruArg = ArgBegin[3]; // If the mask is all zeros or undef, the "passthru" argument is the result. |