[llvm] r327834 - [SystemZ] Bugfix of CC liveness in emitMemMemWrapper (CLC).
Jonas Paulsson via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 20 01:33:33 PDT 2018
Sorry, I think a '; REQUIRES: asserts' was missing. /Jonas
On 2018-03-19 21:46, Galina Kistanova wrote:
> Hello Jonas,
>
> This commit broke at least two of our builders:
>
> http://lab.llvm.org:8011/builders/clang-with-thin-lto-ubuntu/builds/9219
> http://lab.llvm.org:8011/builders/clang-with-lto-ubuntu
>
> . . .
> Failing Tests (1):
> LLVM :: CodeGen/SystemZ/memcmp-02.ll
>
> Please have a look?
>
> It is not good idea to keep the bot red for too long. This hides new
> problem which later hard to track down.
>
> Thanks
>
> Galina
>
> On Mon, Mar 19, 2018 at 6:05 AM, Jonas Paulsson via llvm-commits
> <llvm-commits at lists.llvm.org <mailto:llvm-commits at lists.llvm.org>> wrote:
>
> Author: jonpa
> Date: Mon Mar 19 06:05:22 2018
> New Revision: 327834
>
> URL: http://llvm.org/viewvc/llvm-project?rev=327834&view=rev
> <http://llvm.org/viewvc/llvm-project?rev=327834&view=rev>
> Log:
> [SystemZ] Bugfix of CC liveness in emitMemMemWrapper (CLC).
>
> If DoneMBB becomes empty it must have CC added to its live-in
> list, since it
> will fall-through into EndMBB. This happens when the CLC loop does the
> complete range.
>
> Review: Ulrich Weigand
>
> Added:
> llvm/trunk/test/CodeGen/SystemZ/memcmp-02.ll
> Modified:
> llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.cpp
>
> Modified: llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.cpp?rev=327834&r1=327833&r2=327834&view=diff
> <http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.cpp?rev=327834&r1=327833&r2=327834&view=diff>
> ==============================================================================
> --- llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.cpp (original)
> +++ llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.cpp Mon Mar
> 19 06:05:22 2018
> @@ -6626,6 +6626,10 @@ MachineBasicBlock *SystemZTargetLowering
> DestBase = MachineOperand::CreateReg(NextDestReg, false);
> SrcBase = MachineOperand::CreateReg(NextSrcReg, false);
> Length &= 255;
> + if (EndMBB && !Length)
> + // If the loop handled the whole CLC range, DoneMBB will be
> empty with
> + // CC live-through into EndMBB, so add it as live-in.
> + DoneMBB->addLiveIn(SystemZ::CC);
> MBB = DoneMBB;
> }
> // Handle any remaining bytes with straight-line code.
>
> Added: llvm/trunk/test/CodeGen/SystemZ/memcmp-02.ll
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/SystemZ/memcmp-02.ll?rev=327834&view=auto
> <http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/SystemZ/memcmp-02.ll?rev=327834&view=auto>
> ==============================================================================
> --- llvm/trunk/test/CodeGen/SystemZ/memcmp-02.ll (added)
> +++ llvm/trunk/test/CodeGen/SystemZ/memcmp-02.ll Mon Mar 19
> 06:05:22 2018
> @@ -0,0 +1,20 @@
> +; Test memcmp using CLC. In this test case the CLC loop will do
> all the work
> +; and the DoneMBB becomes empty. It will not pass the
> mischeduling verifiers
> +; if DoneMBB does not have CC in its live-in list.
> +
> +; RUN: llc < %s -mtriple=s390x-linux-gnu -misched=shuffle |
> FileCheck %s
> +
> +declare i32 @memcmp(i8* nocapture, i8* nocapture, i64)
> +
> +define i32 @fun() {
> +; CHECK-LABEL: fun
> + %call = call signext i32 @memcmp(i8* nonnull undef, i8* nonnull
> undef, i64 2048)
> + %cmp = icmp eq i32 %call, 0
> + br i1 %cmp, label %labT, label %labF
> +
> +labT:
> + ret i32 0
> +
> +labF:
> + ret i32 1
> +}
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org <mailto:llvm-commits at lists.llvm.org>
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
> <http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180320/e072e22e/attachment.html>
More information about the llvm-commits
mailing list