<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Apr 24, 2013, at 11:04 AM, Hal Finkel <<a href="mailto:hfinkel@anl.gov">hfinkel@anl.gov</a>> wrote:</div><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><blockquote type="cite"><br>Added: llvm/trunk/test/CodeGen/ARM/misched-copy-arm.ll<br>URL:<br><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/misched-copy-arm.ll?rev=180193&view=auto">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/misched-copy-arm.ll?rev=180193&view=auto</a><br>==============================================================================<br>--- llvm/trunk/test/CodeGen/ARM/misched-copy-arm.ll (added)<br>+++ llvm/trunk/test/CodeGen/ARM/misched-copy-arm.ll Wed Apr 24<br>10:54:43 2013<br>@@ -0,0 +1,30 @@<br>+; REQUIRES: asserts<br>+; RUN: llc < %s -march=thumb -mcpu=swift -pre-RA-sched=source<br>-enable-misched -verify-misched -debug-only=misched -o - 2>&1 ><br>/dev/null | FileCheck %s<br>+;<br>+; Loop counter copies should be eliminated.<br>+; There is also a MUL here, but we don't care where it is scheduled.<br>+; CHECK: postinc<br>+; CHECK: *** Final schedule for BB#2 ***<br>+; CHECK: t2LDRs<br>+; CHECK: t2ADDrr<br>+; CHECK: t2CMPrr<br>+; CHECK: COPY<br></blockquote><br>Why can't you disable post-ra scheduling and check the actual output assembly?<br><br>-Hal<br></div></blockquote></div><br><div>That would be preferable if the test were just as strong. I actually added a flag to suppress copy rewriting for this purpose, but it wasn't sufficient for other test cases where I want to know exactly where the scheduler placed the copy even if it is removed later. There are too many places where we rewrite copies.</div><div><br></div><div>In this particular test, it's not so bad. I could just check for the nonexistence of mov instructions. However, I also want to test that the output of the coalescer has the copy, otherwise it's a useless test.</div><div><br></div><div>I know it's kind of offensive to check stderr, but it seems like the only strong way to unit test certain behavior. I don't have a strong feeling about how scheduler tests should be written, so I'm open to feedback.</div><div><br></div><div>-Andy</div></body></html>