summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen
diff options
context:
space:
mode:
authorJonas Paulsson <paulsson@linux.vnet.ibm.com>2018-03-19 13:05:22 +0000
committerJonas Paulsson <paulsson@linux.vnet.ibm.com>2018-03-19 13:05:22 +0000
commita6216ec4ccb393138d75bd3b12e64e4f91f4a150 (patch)
tree321d65ff99a706644621f91c63193c29f416d496 /llvm/test/CodeGen
parentfcefdb877cf98bf453891bfa8359b98d49e4b055 (diff)
downloadbcm5719-llvm-a6216ec4ccb393138d75bd3b12e64e4f91f4a150.tar.gz
bcm5719-llvm-a6216ec4ccb393138d75bd3b12e64e4f91f4a150.zip
[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 llvm-svn: 327834
Diffstat (limited to 'llvm/test/CodeGen')
-rw-r--r--llvm/test/CodeGen/SystemZ/memcmp-02.ll20
1 files changed, 20 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/SystemZ/memcmp-02.ll b/llvm/test/CodeGen/SystemZ/memcmp-02.ll
new file mode 100644
index 00000000000..303e015ec99
--- /dev/null
+++ b/llvm/test/CodeGen/SystemZ/memcmp-02.ll
@@ -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
+}
OpenPOWER on IntegriCloud