Add an option to make SetCC illegal as a beta option

llvm-svn: 22979
This commit is contained in:
Nate Begeman 2005-08-23 05:42:36 +00:00
parent bf8c3939d7
commit 7216ad415b
1 changed files with 10 additions and 0 deletions

View File

@ -17,9 +17,15 @@
#include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/SelectionDAG.h" #include "llvm/CodeGen/SelectionDAG.h"
#include "llvm/Function.h" #include "llvm/Function.h"
#include "llvm/Support/CommandLine.h"
using namespace llvm; using namespace llvm;
namespace llvm {
cl::opt<bool> SetCCIllegal("-ppc-setcc-is-illegal", cl::Hidden,
cl::desc("Make ISD::SETCC illegal on PowerPC"));
}
PPC32TargetLowering::PPC32TargetLowering(TargetMachine &TM) PPC32TargetLowering::PPC32TargetLowering(TargetMachine &TM)
: TargetLowering(TM) { : TargetLowering(TM) {
@ -78,6 +84,10 @@ PPC32TargetLowering::PPC32TargetLowering(TargetMachine &TM)
setOperationAction(ISD::SINT_TO_FP, MVT::i32, Expand); setOperationAction(ISD::SINT_TO_FP, MVT::i32, Expand);
setOperationAction(ISD::UINT_TO_FP, MVT::i32, Expand); setOperationAction(ISD::UINT_TO_FP, MVT::i32, Expand);
// PowerPC does not have SETCC
if (SetCCIllegal)
setOperationAction(ISD::SETCC, MVT::i32, Expand);
setSetCCResultContents(ZeroOrOneSetCCResult); setSetCCResultContents(ZeroOrOneSetCCResult);
addLegalFPImmediate(+0.0); // Necessary for FSEL addLegalFPImmediate(+0.0); // Necessary for FSEL
addLegalFPImmediate(-0.0); // addLegalFPImmediate(-0.0); //