Allow 64 bit integer values in gpu registers if arch and abi are 64 bit.
authorEric Christopher <echristo@apple.com>
Mon, 7 May 2012 03:13:22 +0000 (03:13 +0000)
committerEric Christopher <echristo@apple.com>
Mon, 7 May 2012 03:13:22 +0000 (03:13 +0000)
Patch by Jack Carter.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156278 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/Mips/MipsISelLowering.cpp

index bb36d76ab753d6f462dbe10a9da404142582e8d6..be22fed2f45a76becc7f064c61eae23e16dc545b 100644 (file)
@@ -3056,8 +3056,10 @@ getRegForInlineAsmConstraint(const std::string &Constraint, EVT VT) const
     case 'r':
       if (VT == MVT::i32 || VT == MVT::i16 || VT == MVT::i8)
         return std::make_pair(0U, &Mips::CPURegsRegClass);
-      assert(VT == MVT::i64 && "Unexpected type.");
-      return std::make_pair(0U, &Mips::CPU64RegsRegClass);
+      if (VT == MVT::i64 && HasMips64)
+        return std::make_pair(0U, &Mips::CPU64RegsRegClass);
+      // This will generate an error message
+      return std::make_pair(0u, static_cast<const TargetRegisterClass*>(0));
     case 'f':
       if (VT == MVT::f32)
         return std::make_pair(0U, &Mips::FGR32RegClass);