<div dir="ltr">Hello Jonas,<br><br>This commit broke at least two of our builders:<br><br><a href="http://lab.llvm.org:8011/builders/clang-with-thin-lto-ubuntu/builds/9219">http://lab.llvm.org:8011/builders/clang-with-thin-lto-ubuntu/builds/9219</a><br><a href="http://lab.llvm.org:8011/builders/clang-with-lto-ubuntu">http://lab.llvm.org:8011/builders/clang-with-lto-ubuntu</a><br><br>. . . <br>Failing Tests (1):<br>    LLVM :: CodeGen/SystemZ/memcmp-02.ll<br><br>Please have a look?<br><br>It is not good idea to keep the bot red for too long. This hides new problem which later hard to track down.<br><br>Thanks<br><br>Galina<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 19, 2018 at 6:05 AM, Jonas Paulsson via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: jonpa<br>
Date: Mon Mar 19 06:05:22 2018<br>
New Revision: 327834<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=327834&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project?rev=327834&view=rev</a><br>
Log:<br>
[SystemZ]  Bugfix of CC liveness in emitMemMemWrapper (CLC).<br>
<br>
If DoneMBB becomes empty it must have CC added to its live-in list, since it<br>
will fall-through into EndMBB. This happens when the CLC loop does the<br>
complete range.<br>
<br>
Review: Ulrich Weigand<br>
<br>
Added:<br>
    llvm/trunk/test/CodeGen/<wbr>SystemZ/memcmp-02.ll<br>
Modified:<br>
    llvm/trunk/lib/Target/SystemZ/<wbr>SystemZISelLowering.cpp<br>
<br>
Modified: llvm/trunk/lib/Target/SystemZ/<wbr>SystemZISelLowering.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.cpp?rev=327834&r1=327833&r2=327834&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/llvm/trunk/lib/Target/<wbr>SystemZ/SystemZISelLowering.<wbr>cpp?rev=327834&r1=327833&r2=<wbr>327834&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/lib/Target/SystemZ/<wbr>SystemZISelLowering.cpp (original)<br>
+++ llvm/trunk/lib/Target/SystemZ/<wbr>SystemZISelLowering.cpp Mon Mar 19 06:05:22 2018<br>
@@ -6626,6 +6626,10 @@ MachineBasicBlock *SystemZTargetLowering<br>
     DestBase = MachineOperand::CreateReg(<wbr>NextDestReg, false);<br>
     SrcBase = MachineOperand::CreateReg(<wbr>NextSrcReg, false);<br>
     Length &= 255;<br>
+    if (EndMBB && !Length)<br>
+      // If the loop handled the whole CLC range, DoneMBB will be empty with<br>
+      // CC live-through into EndMBB, so add it as live-in.<br>
+      DoneMBB->addLiveIn(SystemZ::<wbr>CC);<br>
     MBB = DoneMBB;<br>
   }<br>
   // Handle any remaining bytes with straight-line code.<br>
<br>
Added: llvm/trunk/test/CodeGen/<wbr>SystemZ/memcmp-02.ll<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/SystemZ/memcmp-02.ll?rev=327834&view=auto" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/llvm/trunk/test/<wbr>CodeGen/SystemZ/memcmp-02.ll?<wbr>rev=327834&view=auto</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/test/CodeGen/<wbr>SystemZ/memcmp-02.ll (added)<br>
+++ llvm/trunk/test/CodeGen/<wbr>SystemZ/memcmp-02.ll Mon Mar 19 06:05:22 2018<br>
@@ -0,0 +1,20 @@<br>
+; Test memcmp using CLC.  In this test case the CLC loop will do all the work<br>
+; and the DoneMBB becomes empty. It will not pass the mischeduling verifiers<br>
+; if DoneMBB does not have CC in its live-in list.<br>
+<br>
+; RUN: llc < %s -mtriple=s390x-linux-gnu -misched=shuffle | FileCheck %s<br>
+<br>
+declare i32 @memcmp(i8* nocapture, i8* nocapture, i64)<br>
+<br>
+define i32 @fun() {<br>
+; CHECK-LABEL: fun<br>
+  %call = call signext i32 @memcmp(i8* nonnull undef, i8* nonnull undef, i64 2048)<br>
+  %cmp = icmp eq i32 %call, 0<br>
+  br i1 %cmp, label %labT, label %labF<br>
+<br>
+labT:<br>
+  ret i32 0<br>
+<br>
+labF:<br>
+  ret i32 1<br>
+}<br>
<br>
<br>
______________________________<wbr>_________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>