From 340d78f4e7b95c235d0ecf315b755bebefd0a168 Mon Sep 17 00:00:00 2001 From: Andrew Trick Date: Thu, 1 Sep 2011 00:54:31 +0000 Subject: 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 --- test/CodeGen/X86/2008-01-08-SchedulerCrash.ll | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'test/CodeGen/X86/2008-01-08-SchedulerCrash.ll') 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* } -- cgit v1.2.3