summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2019-08-17 22:46:15 +0000
committerCraig Topper <craig.topper@intel.com>2019-08-17 22:46:15 +0000
commit31f829f0cd4dbc00066ff0c5929f07a46e204102 (patch)
treea07e4f4a153ba98107ee68b4be3ae97e73f542fc /llvm/lib
parenta8dad5c79b64523e4c39d2ee32739f8894d40129 (diff)
downloadbcm5719-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.cpp2
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());
OpenPOWER on IntegriCloud