summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/2008-01-08-SchedulerCrash.ll
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2011-09-01 00:54:31 +0000
committerAndrew Trick <atrick@apple.com>2011-09-01 00:54:31 +0000
commit340d78f4e7b95c235d0ecf315b755bebefd0a168 (patch)
treea0ff341ce5176af908e04964c54395010f291a87 /test/CodeGen/X86/2008-01-08-SchedulerCrash.ll
parent35726bfcaa852fcbcbda03613b7f9a59763003bc (diff)
downloadllvm-340d78f4e7b95c235d0ecf315b755bebefd0a168.tar.gz
llvm-340d78f4e7b95c235d0ecf315b755bebefd0a168.tar.bz2
llvm-340d78f4e7b95c235d0ecf315b755bebefd0a168.tar.xz
PreRA scheduler should avoid cloning compares.
Added canClobberReachingPhysRegUse() to handle a particular pattern in which a two-address instruction could be forced to interfere with EFLAGS, causing a compare to be unnecessarilly cloned. Fixes rdar://problem/5875261 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138924 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/2008-01-08-SchedulerCrash.ll')
-rw-r--r--test/CodeGen/X86/2008-01-08-SchedulerCrash.ll10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/CodeGen/X86/2008-01-08-SchedulerCrash.ll b/test/CodeGen/X86/2008-01-08-SchedulerCrash.ll
index b040095195..cd2952afdb 100644
--- a/test/CodeGen/X86/2008-01-08-SchedulerCrash.ll
+++ b/test/CodeGen/X86/2008-01-08-SchedulerCrash.ll
@@ -1,4 +1,12 @@
-; RUN: llc < %s -march=x86 | not grep pushf
+; RUN: llc < %s -march=x86 | FileCheck %s
+;
+; Test scheduling a multi-use compare. We should neither spill flags
+; nor clone the compare.
+; CHECK: cmp
+; CHECK-NOT: pushf
+; CHECK: cmov
+; CHECK-NOT: cmp
+; CHECK: cmov
%struct.indexentry = type { i32, i8*, i8*, i8*, i8*, i8* }