Enable convertToThreeAddress for X86 by default.
authorEvan Cheng <evan.cheng@apple.com>
Fri, 5 Oct 2007 22:31:10 +0000 (22:31 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Fri, 5 Oct 2007 22:31:10 +0000 (22:31 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42655 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86InstrInfo.cpp
test/CodeGen/X86/2006-05-02-InstrSched2.ll
test/CodeGen/X86/2006-05-11-InstrSched.ll
test/CodeGen/X86/loop-strength-reduce2.ll

index 8836c9e9cc410bcdfcb9eba6610a134d71af82e5..235feba9c893123a0c32009541c5ceb5aa8ed9bc 100644 (file)
 #include "llvm/CodeGen/LiveVariables.h"
 #include "llvm/CodeGen/SSARegMap.h"
 #include "llvm/Target/TargetOptions.h"
-#include "llvm/Support/CommandLine.h"
 using namespace llvm;
 
-namespace {
-  cl::opt<bool>
-  EnableConvert3Addr("enable-x86-conv-3-addr",
-           cl::desc("Enable convertToThreeAddress for X86"));
-}
-
 X86InstrInfo::X86InstrInfo(X86TargetMachine &tm)
   : TargetInstrInfo(X86Insts, array_lengthof(X86Insts)),
     TM(tm), RI(tm, *this) {
@@ -154,8 +147,6 @@ bool X86InstrInfo::isReallyTriviallyReMaterializable(MachineInstr *MI) const {
 /// hasLiveCondCodeDef - True if MI has a condition code def, e.g. EFLAGS, that
 /// is not marked dead.
 static bool hasLiveCondCodeDef(MachineInstr *MI) {
-  if (!EnableConvert3Addr)
-    return true;
   for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) {
     MachineOperand &MO = MI->getOperand(i);
     if (MO.isRegister() && MO.isDef() &&
index ac37fb110facab342c52a6e3255953ce09ddcae9..e8bcb6973f38b157786af56c25850b23ac1fce0d 100644 (file)
@@ -1,5 +1,5 @@
 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -stats |& \
-; RUN:   grep asm-printer | grep 16
+; RUN:   grep asm-printer | grep 15
 
 void %_ZN9__gnu_cxx9hashtableISt4pairIKPKciES3_NS_4hashIS3_EESt10_Select1stIS5_E5eqstrSaIiEE14find_or_insertERKS5__cond_true456.i(sbyte* %tmp435.i, uint* %tmp449.i.out) {
 newFuncRoot:
index b0bde7df1d70736463607a91af7beb90cf6496fa..786eed7cbb2f7c8496378525cab39d167583dcb4 100644 (file)
@@ -1,5 +1,5 @@
 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -stats |&\
-; RUN:     grep {asm-printer} | grep 33
+; RUN:     grep {asm-printer} | grep 32
 
 target datalayout = "e-p:32:32"
 define void @foo(i32* %mc, i32* %bp, i32* %ms, i32* %xmb, i32* %mpp, i32* %tpmm, i32* %ip, i32* %tpim, i32* %dpp, i32* %tpdm, i32* %bpi, i32 %M) {
index 7ed394427eae9a9b7a637a648c860deb58e17a6d..8706b7a074620a2aa59f2292ab532c95fc79dc80 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: llvm-upgrade < %s | llvm-as | llc -mtriple=i686-apple-darwin -relocation-model=pic | not grep lea
+; RUN: llvm-upgrade < %s | llvm-as | llc -mtriple=i686-apple-darwin -relocation-model=pic | grep '\$pb' | grep mov
 ;
 ; Make sure the PIC label flags2-"L1$pb" is not moved up to the preheader.