[arm fast-isel] Appease the machine verifier by using the proper register
authorChad Rosier <mcrosier@apple.com>
Tue, 27 Nov 2012 22:12:11 +0000 (22:12 +0000)
committerChad Rosier <mcrosier@apple.com>
Tue, 27 Nov 2012 22:12:11 +0000 (22:12 +0000)
classes.
rdar://12719844

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

lib/Target/ARM/ARMFastISel.cpp

index 96e2ce9f38d114823f9b270fba41f2b860db2cef..e972a93687cb927e17445e80e821d37d9e46ee9d 100644 (file)
@@ -2595,10 +2595,12 @@ unsigned ARMFastISel::ARMEmitIntExt(EVT SrcVT, unsigned SrcReg, EVT DestVT,
     break;
   case MVT::i8:
     if (!Subtarget->hasV6Ops()) return 0;
-    if (isZExt)
+    if (isZExt) {
       Opc = isThumb2 ? ARM::t2UXTB : ARM::UXTB;
-    else
+    } else {
       Opc = isThumb2 ? ARM::t2SXTB : ARM::SXTB;
+      RC = isThumb2 ? &ARM::rGPRRegClass : &ARM::GPRnopcRegClass;
+    }
     break;
   case MVT::i1:
     if (isZExt) {