summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorUlrich Weigand <ulrich.weigand@de.ibm.com>2018-01-19 20:47:14 +0000
committerUlrich Weigand <ulrich.weigand@de.ibm.com>2018-01-19 20:47:14 +0000
commit5605be9e50c58c64aa2aaabf074032f7ac45a462 (patch)
tree4922a20d51f0f0ab2df7b0939c4dc48612c627d5 /llvm/lib/CodeGen
parent758d7a5a336d315f9006fc4a18a2721bde8fc670 (diff)
downloadbcm5719-llvm-5605be9e50c58c64aa2aaabf074032f7ac45a462.tar.gz
bcm5719-llvm-5605be9e50c58c64aa2aaabf074032f7ac45a462.zip
[SelectionDAG] Teach computeKnownBits about ATOMIC_CMP_SWAP_WITH_SUCCESS boolean return value
The second return value of ATOMIC_CMP_SWAP_WITH_SUCCESS is known to be a boolean, and should therefore be treated by computeKnownBits just like the second return values of SMULO / UMULO. Differential Revision: https://reviews.llvm.org/D42067 llvm-svn: 322985
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 837173eca3b..045d0ffc1f3 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -2442,6 +2442,7 @@ void SelectionDAG::computeKnownBits(SDValue Op, KnownBits &Known,
break;
case ISD::SMULO:
case ISD::UMULO:
+ case ISD::ATOMIC_CMP_SWAP_WITH_SUCCESS:
if (Op.getResNo() != 1)
break;
// The boolean result conforms to getBooleanContents.
OpenPOWER on IntegriCloud