<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Tue, Feb 7, 2017 at 1:09 AM Daniel Jasper via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: djasper<br class="gmail_msg">
Date: Tue Feb 7 02:57:50 2017<br class="gmail_msg">
New Revision: 294288<br class="gmail_msg">
<br class="gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=294288&view=rev" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project?rev=294288&view=rev</a><br class="gmail_msg">
Log:<br class="gmail_msg">
Revert "[DAGCombiner] (add X, (adde Y, 0, Carry)) -> (adde X, Y, Carry)"<br class="gmail_msg">
<br class="gmail_msg">
This reverts commit r294186.<br class="gmail_msg">
<br class="gmail_msg">
On an internal test, this triggers an out-of-memory error on PPC,<br class="gmail_msg">
presumably because there is another dagcombine that does the exact<br class="gmail_msg">
opposite triggering and endless loop consuming more and more memory.<br class="gmail_msg">
<br class="gmail_msg">
Chandler has started at creating a reduced test case and we'll attach it<br class="gmail_msg">
as soon as possible.<br class="gmail_msg"></blockquote><div><br></div><div>Filed <a href="http://llvm.org/PR31890">http://llvm.org/PR31890</a> with an attached test case. It isn't tiny (4k lines of textual IR) but it is small enough to easily work with and still reproduces nicely.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br class="gmail_msg">
Modified:<br class="gmail_msg">
llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp<br class="gmail_msg">
llvm/trunk/test/CodeGen/X86/adde-carry.ll<br class="gmail_msg">
<br class="gmail_msg">
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp<br class="gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=294288&r1=294287&r2=294288&view=diff" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=294288&r1=294287&r2=294288&view=diff</a><br class="gmail_msg">
==============================================================================<br class="gmail_msg">
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)<br class="gmail_msg">
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Tue Feb 7 02:57:50 2017<br class="gmail_msg">
@@ -1834,12 +1834,6 @@ SDValue DAGCombiner::visitADDLike(SDValu<br class="gmail_msg">
}<br class="gmail_msg">
}<br class="gmail_msg">
<br class="gmail_msg">
- // (add X, (adde Y, 0, Carry)) -> (adde X, Y, Carry)<br class="gmail_msg">
- if (N1.getOpcode() == ISD::ADDE && N1->hasOneUse() &&<br class="gmail_msg">
- isNullConstant(N1.getOperand(1)))<br class="gmail_msg">
- return DAG.getNode(ISD::ADDE, DL, DAG.getVTList(VT, MVT::Glue),<br class="gmail_msg">
- N0, N1->getOperand(0), N1->getOperand(2));<br class="gmail_msg">
-<br class="gmail_msg">
return SDValue();<br class="gmail_msg">
}<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
Modified: llvm/trunk/test/CodeGen/X86/adde-carry.ll<br class="gmail_msg">
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/adde-carry.ll?rev=294288&r1=294287&r2=294288&view=diff" rel="noreferrer" class="gmail_msg" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/adde-carry.ll?rev=294288&r1=294287&r2=294288&view=diff</a><br class="gmail_msg">
==============================================================================<br class="gmail_msg">
--- llvm/trunk/test/CodeGen/X86/adde-carry.ll (original)<br class="gmail_msg">
+++ llvm/trunk/test/CodeGen/X86/adde-carry.ll Tue Feb 7 02:57:50 2017<br class="gmail_msg">
@@ -93,16 +93,17 @@ define %scalar @pr31719(%scalar* nocaptu<br class="gmail_msg">
; CHECK-NEXT: sbbq %r10, %r10<br class="gmail_msg">
; CHECK-NEXT: andl $1, %r10d<br class="gmail_msg">
; CHECK-NEXT: addq 8(%rsi), %rcx<br class="gmail_msg">
+; CHECK-NEXT: sbbq %r11, %r11<br class="gmail_msg">
+; CHECK-NEXT: andl $1, %r11d<br class="gmail_msg">
+; CHECK-NEXT: addq %r10, %rcx<br class="gmail_msg">
+; CHECK-NEXT: adcq $0, %r11<br class="gmail_msg">
+; CHECK-NEXT: addq 16(%rsi), %r8<br class="gmail_msg">
; CHECK-NEXT: sbbq %rax, %rax<br class="gmail_msg">
; CHECK-NEXT: andl $1, %eax<br class="gmail_msg">
-; CHECK-NEXT: addq %r10, %rcx<br class="gmail_msg">
+; CHECK-NEXT: addq %r11, %r8<br class="gmail_msg">
; CHECK-NEXT: adcq $0, %rax<br class="gmail_msg">
-; CHECK-NEXT: addq 16(%rsi), %r8<br class="gmail_msg">
-; CHECK-NEXT: sbbq %r10, %r10<br class="gmail_msg">
-; CHECK-NEXT: andl $1, %r10d<br class="gmail_msg">
; CHECK-NEXT: addq 24(%rsi), %r9<br class="gmail_msg">
-; CHECK-NEXT: addq %rax, %r8<br class="gmail_msg">
-; CHECK-NEXT: adcq %r10, %r9<br class="gmail_msg">
+; CHECK-NEXT: addq %rax, %r9<br class="gmail_msg">
; CHECK-NEXT: movq %rdx, (%rdi)<br class="gmail_msg">
; CHECK-NEXT: movq %rcx, 8(%rdi)<br class="gmail_msg">
; CHECK-NEXT: movq %r8, 16(%rdi)<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
_______________________________________________<br class="gmail_msg">
llvm-commits mailing list<br class="gmail_msg">
<a href="mailto:llvm-commits@lists.llvm.org" class="gmail_msg" target="_blank">llvm-commits@lists.llvm.org</a><br class="gmail_msg">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br class="gmail_msg">
</blockquote></div></div>