diff options
author | Craig Topper <craig.topper@intel.com> | 2019-08-17 22:46:15 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@intel.com> | 2019-08-17 22:46:15 +0000 |
commit | 31f829f0cd4dbc00066ff0c5929f07a46e204102 (patch) | |
tree | a07e4f4a153ba98107ee68b4be3ae97e73f542fc /llvm/lib | |
parent | a8dad5c79b64523e4c39d2ee32739f8894d40129 (diff) | |
download | bcm5719-llvm-31f829f0cd4dbc00066ff0c5929f07a46e204102.tar.gz bcm5719-llvm-31f829f0cd4dbc00066ff0c5929f07a46e204102.zip |
[X86] Add a one use check to the combineStore code that handles v16i16->v16i8 truncate+store by extending to v16i32 and then emitting a v16i32->v16i8 truncstore.
This prevent us from emitting a separate truncate and a truncating
store instruction.
llvm-svn: 369200
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/X86/X86ISelLowering.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index 207782bc80b..37d84892791 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -39581,7 +39581,7 @@ static SDValue combineStore(SDNode *N, SelectionDAG &DAG, St->getValue().getOpcode() == ISD::TRUNCATE && St->getValue().getOperand(0).getValueType() == MVT::v16i16 && TLI.isTruncStoreLegal(MVT::v16i32, MVT::v16i8) && - !DCI.isBeforeLegalizeOps()) { + St->getValue().hasOneUse() && !DCI.isBeforeLegalizeOps()) { SDValue Ext = DAG.getNode(ISD::ANY_EXTEND, dl, MVT::v16i32, St->getValue()); return DAG.getTruncStore(St->getChain(), dl, Ext, St->getBasePtr(), MVT::v16i8, St->getMemOperand()); |