[llvm-commits] [llvm] r47351 - in /llvm/trunk/lib/Target/X86: X86ISelDAGToDAG.cpp X86InstrInfo.td
Evan Cheng
evan.cheng at apple.com
Tue Feb 19 15:36:51 PST 2008
Author: evancheng
Date: Tue Feb 19 17:36:51 2008
New Revision: 47351
URL: http://llvm.org/viewvc/llvm-project?rev=47351&view=rev
Log:
Add hidden option -x86-fold-and-in-test to test the effect the test / and folding change.
Modified:
llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp
llvm/trunk/lib/Target/X86/X86InstrInfo.td
Modified: llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp?rev=47351&r1=47350&r2=47351&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelDAGToDAG.cpp Tue Feb 19 17:36:51 2008
@@ -32,6 +32,7 @@
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/SelectionDAGISel.h"
#include "llvm/Target/TargetMachine.h"
+#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/MathExtras.h"
@@ -43,6 +44,11 @@
STATISTIC(NumFPKill , "Number of FP_REG_KILL instructions added");
STATISTIC(NumLoadMoved, "Number of loads moved below TokenFactor");
+namespace {
+ static cl::opt<bool>
+ FoldAndInTest("x86-fold-and-in-test", cl::desc("Fold and operation in test"),
+ cl::init(true), cl::Hidden);
+}
//===----------------------------------------------------------------------===//
// Pattern Matcher Implementation
Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.td?rev=47351&r1=47350&r2=47351&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrInfo.td (original)
+++ llvm/trunk/lib/Target/X86/X86InstrInfo.td Tue Feb 19 17:36:51 2008
@@ -248,7 +248,7 @@
// An 'and' node with a single use.
def and_su : PatFrag<(ops node:$lhs, node:$rhs), (and node:$lhs, node:$rhs), [{
- return N->hasOneUse();
+ return !FoldAndInTest || N->hasOneUse();
}]>;
//===----------------------------------------------------------------------===//
More information about the llvm-commits
mailing list