Use the source-order scheduler instead of the "fast" scheduler at -O0,
authorDan Gohman <gohman@apple.com>
Fri, 16 Jul 2010 02:01:19 +0000 (02:01 +0000)
committerDan Gohman <gohman@apple.com>
Fri, 16 Jul 2010 02:01:19 +0000 (02:01 +0000)
because it's more likely to keep debug line information in its original
order.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108496 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
test/CodeGen/X86/fast-isel-gep.ll
test/CodeGen/X86/fast-isel-shift-imm.ll

index 08ba5482f7d22132aa964e31c7adbe4b297c8ae1..65261341764f8c0a26c9ee6f7b0d02272d84940a 100644 (file)
@@ -132,7 +132,7 @@ namespace llvm {
     const TargetLowering &TLI = IS->getTargetLowering();
 
     if (OptLevel == CodeGenOpt::None)
-      return createFastDAGScheduler(IS, OptLevel);
+      return createSourceListDAGScheduler(IS, OptLevel);
     if (TLI.getSchedulingPreference() == Sched::Latency)
       return createTDListDAGScheduler(IS, OptLevel);
     if (TLI.getSchedulingPreference() == Sched::RegPressure)
index 1270ab78ab5f748b2456eb7bf023cf884b991658..577dd7223a4d7a9464f805c5d44d337bb2b6e5ad 100644 (file)
@@ -9,7 +9,7 @@ define i32 @test1(i32 %t3, i32* %t1) nounwind {
        %t15 = load i32* %t9            ; <i32> [#uses=1]
        ret i32 %t15
 ; X32: test1:
-; X32:         movl    (%ecx,%eax,4), %eax
+; X32:         movl    (%eax,%ecx,4), %eax
 ; X32:         ret
 
 ; X64: test1:
@@ -23,7 +23,7 @@ define i32 @test2(i64 %t3, i32* %t1) nounwind {
        %t15 = load i32* %t9            ; <i32> [#uses=1]
        ret i32 %t15
 ; X32: test2:
-; X32:         movl    (%eax,%ecx,4), %eax
+; X32:         movl    (%edx,%ecx,4), %eax
 ; X32:         ret
 
 ; X64: test2:
index 7759bb056892e353d2ec66f05507ff690167ee19..5c62c1880516e58cf4225729be8a690569fa4001 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: llc < %s -march=x86 -O0 | grep {sarl    \$80, %eax}
+; RUN: llc < %s -march=x86 -O0 | grep {sarl    \$80, %e}
 ; PR3242
 
 define void @foo(i32 %x, i32* %p) nounwind {