mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-01 01:14:12 +00:00
Add an option to make SetCC illegal as a beta option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22979 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7042f15bde
commit
a50d53e5ef
@ -17,9 +17,15 @@
|
||||
#include "llvm/CodeGen/MachineFunction.h"
|
||||
#include "llvm/CodeGen/SelectionDAG.h"
|
||||
#include "llvm/Function.h"
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
|
||||
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)
|
||||
: TargetLowering(TM) {
|
||||
|
||||
@ -78,6 +84,10 @@ PPC32TargetLowering::PPC32TargetLowering(TargetMachine &TM)
|
||||
setOperationAction(ISD::SINT_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);
|
||||
addLegalFPImmediate(+0.0); // Necessary for FSEL
|
||||
addLegalFPImmediate(-0.0); //
|
||||
|
Loading…
Reference in New Issue
Block a user