Index: ARMISelLowering.cpp
===================================================================
--- ARMISelLowering.cpp	(revision 90240)
+++ ARMISelLowering.cpp	(working copy)
@@ -349,8 +349,10 @@
     setOperationAction(ISD::BSWAP, MVT::i32, Expand);
 
   // These are expanded into libcalls.
-  setOperationAction(ISD::SDIV,  MVT::i32, Expand);
-  setOperationAction(ISD::UDIV,  MVT::i32, Expand);
+  if (!Subtarget->isThumb2()) {
+    setOperationAction(ISD::SDIV,  MVT::i32, Expand);
+    setOperationAction(ISD::UDIV,  MVT::i32, Expand);
+  }
   setOperationAction(ISD::SREM,  MVT::i32, Expand);
   setOperationAction(ISD::UREM,  MVT::i32, Expand);
   setOperationAction(ISD::SDIVREM, MVT::i32, Expand);
Index: ARMInstrThumb2.td
===================================================================
--- ARMInstrThumb2.td	(revision 90240)
+++ ARMInstrThumb2.td	(working copy)
@@ -954,7 +954,14 @@
 // TODO: Halfword multiple accumulate long: SMLAL<x><y>
 // TODO: Dual halfword multiple: SMUAD, SMUSD, SMLAD, SMLSD, SMLALD, SMLSLD
 
+def t2UDIV : T2I<(outs GPR:$dst), (ins GPR:$a, GPR:$b), IIC_iALUi,
+                 "udiv", "\t$dst, $a, $b",
+                 [(set GPR:$dst, (udiv GPR:$a, GPR:$b))]>;
 
+def t2SDIV : T2I<(outs GPR:$dst), (ins GPR:$a, GPR:$b), IIC_iALUi,
+                 "sdiv", "\t$dst, $a, $b",
+                 [(set GPR:$dst, (sdiv GPR:$a, GPR:$b))]>;
+
 //===----------------------------------------------------------------------===//
 //  Misc. Arithmetic Instructions.
 //

