[PATCH] D42067: [SelectionDAG] Teach computeKnownBits about ATOMIC_CMP_SWAP_WITH_SUCCESS boolean return value
Ulrich Weigand via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 15 05:20:11 PST 2018
uweigand created this revision.
uweigand added reviewers: RKSimon, craig.topper.
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.
(I don't have a stand-alone test case for this, but this patch is required to make a test case pass that I'll be adding with a follow-on SystemZ back-end patch.)
Repository:
rL LLVM
https://reviews.llvm.org/D42067
Files:
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Index: lib/CodeGen/SelectionDAG/SelectionDAG.cpp
===================================================================
--- lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -2442,6 +2442,7 @@
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42067.129843.patch
Type: text/x-patch
Size: 428 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180115/b2db8f38/attachment.bin>
More information about the llvm-commits
mailing list