diff options
author | Craig Topper <craig.topper@intel.com> | 2019-06-06 05:41:27 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@intel.com> | 2019-06-06 05:41:27 +0000 |
commit | 9226ba6b376ea2a221e97c2f674841a496869f4d (patch) | |
tree | 4dbad74ee134cbc4f7fc9e18a54f86f44ae2e833 /llvm/lib | |
parent | cf44372137f245b9ce940e12bbaedfe2c23a3bc4 (diff) | |
download | bcm5719-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.cpp | 3 |
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(), |