aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/PowerPC/PPCISelLowering.cpp
diff options
context:
space:
mode:
authorNate Begeman <natebegeman@mac.com>2005-08-23 05:42:36 +0000
committerNate Begeman <natebegeman@mac.com>2005-08-23 05:42:36 +0000
commita50d53e5ef9f2ef9866937511075f873e31d7c1d (patch)
tree80a832880debb9e541ecb50abf8ff21a1c83b21b /lib/Target/PowerPC/PPCISelLowering.cpp
parent7042f15bded917ba68e5e66be873ad4d06f9ca2d (diff)
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
Diffstat (limited to 'lib/Target/PowerPC/PPCISelLowering.cpp')
-rw-r--r--lib/Target/PowerPC/PPCISelLowering.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Target/PowerPC/PPCISelLowering.cpp b/lib/Target/PowerPC/PPCISelLowering.cpp
index 8271bca3d7..11445a82dd 100644
--- a/lib/Target/PowerPC/PPCISelLowering.cpp
+++ b/lib/Target/PowerPC/PPCISelLowering.cpp
@@ -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); //