Add CMP32mr and friends to the load-unfolding table. Among
authorDan Gohman <gohman@apple.com>
Tue, 25 Mar 2008 16:53:19 +0000 (16:53 +0000)
committerDan Gohman <gohman@apple.com>
Tue, 25 Mar 2008 16:53:19 +0000 (16:53 +0000)
other things, this allows the scheduler to unfold a load operand
in the 2008-01-08-SchedulerCrash.ll testcase, so it now successfully
clones the comparison to avoid a pushf+popf.

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

lib/Target/X86/X86InstrInfo.cpp
test/CodeGen/X86/2008-01-08-SchedulerCrash.ll

index dc267942e1841b08950ce781cf0a8bc316de9160..64cb358459787ffa87b06437fc7208d6068a11c8 100644 (file)
@@ -222,11 +222,15 @@ X86InstrInfo::X86InstrInfo(X86TargetMachine &tm)
     { X86::CALL64r,     X86::CALL64m, 1 },
     { X86::CMP16ri,     X86::CMP16mi, 1 },
     { X86::CMP16ri8,    X86::CMP16mi8, 1 },
+    { X86::CMP16rr,     X86::CMP16mr, 1 },
     { X86::CMP32ri,     X86::CMP32mi, 1 },
     { X86::CMP32ri8,    X86::CMP32mi8, 1 },
+    { X86::CMP32rr,     X86::CMP32mr, 1 },
     { X86::CMP64ri32,   X86::CMP64mi32, 1 },
     { X86::CMP64ri8,    X86::CMP64mi8, 1 },
+    { X86::CMP64rr,     X86::CMP64mr, 1 },
     { X86::CMP8ri,      X86::CMP8mi, 1 },
+    { X86::CMP8rr,      X86::CMP8mr, 1 },
     { X86::DIV16r,      X86::DIV16m, 1 },
     { X86::DIV32r,      X86::DIV32m, 1 },
     { X86::DIV64r,      X86::DIV64m, 1 },
index f31a38e28b35e2a29e2dd8953978e943e4683fb4..8a1520c1fe4134c0d7b1ca54fae8071ca8541d03 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: llvm-as < %s | llc -march=x86
+; RUN: llvm-as < %s | llc -march=x86 | not grep pushf
 
        %struct.indexentry = type { i32, i8*, i8*, i8*, i8*, i8* }