diff options
author | Andrew Trick <atrick@apple.com> | 2011-09-01 00:54:31 +0000 |
---|---|---|
committer | Andrew Trick <atrick@apple.com> | 2011-09-01 00:54:31 +0000 |
commit | 340d78f4e7b95c235d0ecf315b755bebefd0a168 (patch) | |
tree | a0ff341ce5176af908e04964c54395010f291a87 /test | |
parent | 35726bfcaa852fcbcbda03613b7f9a59763003bc (diff) | |
download | external_llvm-340d78f4e7b95c235d0ecf315b755bebefd0a168.zip external_llvm-340d78f4e7b95c235d0ecf315b755bebefd0a168.tar.gz external_llvm-340d78f4e7b95c235d0ecf315b755bebefd0a168.tar.bz2 |
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')
-rw-r--r-- | test/CodeGen/X86/2008-01-08-SchedulerCrash.ll | 10 |
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 b040095..cd2952a 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* } |