Implement ISD::TRAP support on PPC
[oota-llvm.git] / lib / Target / PowerPC / PPCISelLowering.cpp
index fcf235ccd11c205b8cd388187c462bb7b9efaf47..2dec8d61b5bf9834caf6f4568e47e92d731481cc 100644 (file)
@@ -183,9 +183,12 @@ PPCTargetLowering::PPCTargetLowering(PPCTargetMachine &TM)
   setOperationAction(ISD::ConstantPool,  MVT::i64, Custom);
   setOperationAction(ISD::JumpTable,     MVT::i64, Custom);
   
-  // RET must be custom lowered, to meet ABI requirements
+  // RET must be custom lowered, to meet ABI requirements.
   setOperationAction(ISD::RET               , MVT::Other, Custom);
 
+  // TRAP is legal.
+  setOperationAction(ISD::TRAP, MVT::Other, Legal);
+    
   // VASTART needs to be custom lowered to use the VarArgsFrameIndex
   setOperationAction(ISD::VASTART           , MVT::Other, Custom);