From 484cab7a2f04d80d2ae68e461b90afa80a43c576 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Fri, 5 Oct 2007 22:31:10 +0000 Subject: [PATCH] Enable convertToThreeAddress for X86 by default. llvm-svn: 42655 --- llvm/lib/Target/X86/X86InstrInfo.cpp | 9 --------- llvm/test/CodeGen/X86/2006-05-02-InstrSched2.ll | 2 +- llvm/test/CodeGen/X86/2006-05-11-InstrSched.ll | 2 +- llvm/test/CodeGen/X86/loop-strength-reduce2.ll | 2 +- 4 files changed, 3 insertions(+), 12 deletions(-) diff --git a/llvm/lib/Target/X86/X86InstrInfo.cpp b/llvm/lib/Target/X86/X86InstrInfo.cpp index 8836c9e9cc41..235feba9c893 100644 --- a/llvm/lib/Target/X86/X86InstrInfo.cpp +++ b/llvm/lib/Target/X86/X86InstrInfo.cpp @@ -22,15 +22,8 @@ #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 - 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() && diff --git a/llvm/test/CodeGen/X86/2006-05-02-InstrSched2.ll b/llvm/test/CodeGen/X86/2006-05-02-InstrSched2.ll index ac37fb110fac..e8bcb6973f38 100644 --- a/llvm/test/CodeGen/X86/2006-05-02-InstrSched2.ll +++ b/llvm/test/CodeGen/X86/2006-05-02-InstrSched2.ll @@ -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: diff --git a/llvm/test/CodeGen/X86/2006-05-11-InstrSched.ll b/llvm/test/CodeGen/X86/2006-05-11-InstrSched.ll index b0bde7df1d70..786eed7cbb2f 100644 --- a/llvm/test/CodeGen/X86/2006-05-11-InstrSched.ll +++ b/llvm/test/CodeGen/X86/2006-05-11-InstrSched.ll @@ -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) { diff --git a/llvm/test/CodeGen/X86/loop-strength-reduce2.ll b/llvm/test/CodeGen/X86/loop-strength-reduce2.ll index 7ed394427eae..8706b7a07462 100644 --- a/llvm/test/CodeGen/X86/loop-strength-reduce2.ll +++ b/llvm/test/CodeGen/X86/loop-strength-reduce2.ll @@ -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.