[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPC32ISelLowering.cpp

Nate Begeman natebegeman at mac.com
Mon Aug 22 22:42:48 PDT 2005



Changes in directory llvm/lib/Target/PowerPC:

PPC32ISelLowering.cpp updated: 1.4 -> 1.5
---
Log message:

Add an option to make SetCC illegal as a beta option


---
Diffs of the changes:  (+10 -0)

 PPC32ISelLowering.cpp |   10 ++++++++++
 1 files changed, 10 insertions(+)


Index: llvm/lib/Target/PowerPC/PPC32ISelLowering.cpp
diff -u llvm/lib/Target/PowerPC/PPC32ISelLowering.cpp:1.4 llvm/lib/Target/PowerPC/PPC32ISelLowering.cpp:1.5
--- llvm/lib/Target/PowerPC/PPC32ISelLowering.cpp:1.4	Tue Aug 16 19:40:22 2005
+++ llvm/lib/Target/PowerPC/PPC32ISelLowering.cpp	Tue Aug 23 00:42:36 2005
@@ -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 @@
   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); //






More information about the llvm-commits mailing list