Quick compiler - run-test bug fixes

Miscellaneous bug fixes, largely dealing with making llvm happy
with consistent types.  This CL causes the quick compiler to
additionally pass run-tests 004, 036, 044, 64, 068, 072, 074, 085.
Still failing: 042, 053, 075.

Change-Id: Ic3c9aa981e641ac68179d42d03b4c9b84cac9b85
diff --git a/src/compiler/codegen/MethodBitcode.cc b/src/compiler/codegen/MethodBitcode.cc
index 89c11c6..3eb6a89 100644
--- a/src/compiler/codegen/MethodBitcode.cc
+++ b/src/compiler/codegen/MethodBitcode.cc
@@ -2344,6 +2344,8 @@
   // TODO: handle fused CMP_LONG/IF_xxZ case
   if (llvm::ConstantInt* src2 = llvm::dyn_cast<llvm::ConstantInt>(rhs)) {
     opRegImm(cUnit, kOpCmp, rlSrc1.lowReg, src2->getSExtValue());
+  } else if (llvm::dyn_cast<llvm::ConstantPointerNull>(rhs) != NULL) {
+    opRegImm(cUnit, kOpCmp, rlSrc1.lowReg, 0);
   } else {
     RegLocation rlSrc2 = getLoc(cUnit, rhs);
     rlSrc2 = loadValue(cUnit, rlSrc2, kCoreReg);