diff options
author | Craig Topper <craig.topper@intel.com> | 2018-08-17 17:57:25 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@intel.com> | 2018-08-17 17:57:25 +0000 |
commit | 730890dbdb34fbe74f27696729907d210ffc7716 (patch) | |
tree | 8a7d30673da786715eb206bc1690793a2b141593 | |
parent | 2b93dfe0adeb83c7c025b0d6ac7b44156fa90088 (diff) | |
download | bcm5719-llvm-730890dbdb34fbe74f27696729907d210ffc7716.tar.gz bcm5719-llvm-730890dbdb34fbe74f27696729907d210ffc7716.zip |
[X86] Use hasOneUse instead of isOnlyUserOf. NFCI
isOnlyUserOf is a little heavier because it allows the node to be used multiple times by the other node. In this case we are looking at a truncate which only has one operand so we know it can only use it once. Thus hasOneUse is better.
llvm-svn: 340059
-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 287f59cc790..cfb019e62b0 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -36780,7 +36780,7 @@ static SDValue combineTruncatedArithmetic(SDNode *N, SelectionDAG &DAG, }; // Don't combine if the operation has other uses. - if (!N->isOnlyUserOf(Src.getNode())) + if (!Src.hasOneUse()) return SDValue(); // Only support vector truncation for now. |