summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2019-06-06 05:41:27 +0000
committerCraig Topper <craig.topper@intel.com>2019-06-06 05:41:27 +0000
commit9226ba6b376ea2a221e97c2f674841a496869f4d (patch)
tree4dbad74ee134cbc4f7fc9e18a54f86f44ae2e833 /llvm/lib
parentcf44372137f245b9ce940e12bbaedfe2c23a3bc4 (diff)
downloadbcm5719-llvm-9226ba6b376ea2a221e97c2f674841a496869f4d.tar.gz
bcm5719-llvm-9226ba6b376ea2a221e97c2f674841a496869f4d.zip
[X86] Don't turn avx masked.load with constant mask into masked.load+vselect when passthru value is all zeroes.
This is intended to enable the use of an immediate blend or more optimal instruction. But if the passthru is zero we don't need any additional instructions. llvm-svn: 362675
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/X86/X86ISelLowering.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index c7f5ebfb98f..250af7ab8bc 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -39120,6 +39120,9 @@ combineMaskedLoadConstantMask(MaskedLoadSDNode *ML, SelectionDAG &DAG,
if (ML->getPassThru().isUndef())
return SDValue();
+ if (ISD::isBuildVectorAllZeros(ML->getPassThru().getNode()))
+ return SDValue();
+
// The new masked load has an undef pass-through operand. The select uses the
// original pass-through operand.
SDValue NewML = DAG.getMaskedLoad(VT, DL, ML->getChain(), ML->getBasePtr(),
OpenPOWER on IntegriCloud