mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-09 11:25:55 +00:00
Allow x86 compare to be commutable by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42761 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -22,15 +22,8 @@
|
|||||||
#include "llvm/CodeGen/LiveVariables.h"
|
#include "llvm/CodeGen/LiveVariables.h"
|
||||||
#include "llvm/CodeGen/SSARegMap.h"
|
#include "llvm/CodeGen/SSARegMap.h"
|
||||||
#include "llvm/Target/TargetOptions.h"
|
#include "llvm/Target/TargetOptions.h"
|
||||||
#include "llvm/Support/CommandLine.h"
|
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
namespace {
|
|
||||||
cl::opt<bool>
|
|
||||||
EnableCommuteCMove("enable-x86-commute-cmove",
|
|
||||||
cl::desc("Commute conditional moves by inverting conditions"));
|
|
||||||
}
|
|
||||||
|
|
||||||
X86InstrInfo::X86InstrInfo(X86TargetMachine &tm)
|
X86InstrInfo::X86InstrInfo(X86TargetMachine &tm)
|
||||||
: TargetInstrInfo(X86Insts, array_lengthof(X86Insts)),
|
: TargetInstrInfo(X86Insts, array_lengthof(X86Insts)),
|
||||||
TM(tm), RI(tm, *this) {
|
TM(tm), RI(tm, *this) {
|
||||||
@@ -442,8 +435,6 @@ MachineInstr *X86InstrInfo::commuteInstruction(MachineInstr *MI) const {
|
|||||||
case X86::CMOVNP16rr:
|
case X86::CMOVNP16rr:
|
||||||
case X86::CMOVNP32rr:
|
case X86::CMOVNP32rr:
|
||||||
case X86::CMOVNP64rr: {
|
case X86::CMOVNP64rr: {
|
||||||
if (!EnableCommuteCMove)
|
|
||||||
return 0;
|
|
||||||
unsigned Opc = 0;
|
unsigned Opc = 0;
|
||||||
switch (MI->getOpcode()) {
|
switch (MI->getOpcode()) {
|
||||||
default: break;
|
default: break;
|
||||||
|
Reference in New Issue
Block a user