mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
Add hidden option -x86-fold-and-in-test to test the effect the test / and folding change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47351 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5a97097e56
commit
e9c608d6cc
@ -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 @@ using namespace llvm;
|
||||
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
|
||||
|
@ -248,7 +248,7 @@ def extloadi32i16 : PatFrag<(ops node:$ptr), (i32 (extloadi16 node:$ptr))>;
|
||||
|
||||
// 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();
|
||||
}]>;
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
Loading…
Reference in New Issue
Block a user