IntegerRegSize is always 8 for sparc
authorChris Lattner <sabre@nondot.org>
Sat, 26 Apr 2003 19:44:35 +0000 (19:44 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 26 Apr 2003 19:44:35 +0000 (19:44 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5961 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/SparcV9/SparcV9InstrInfo.cpp
lib/Target/SparcV9/SparcV9InstrSelection.cpp

index 8bdb0f296692b69ca7f193c44c41b0db294d0504..331fd4608dc587c9df53fcb77d267cffb02eb71b 100644 (file)
@@ -441,9 +441,7 @@ UltraSparcInstrInfo::CreateCodeToLoadConst(const TargetMachine& target,
           uint64_t C = GetConstantValueAsUnsignedInt(val, isValidConstant);
           assert(isValidConstant && "Unrecognized constant");
 
-          if (opSize > destSize ||
-              (val->getType()->isSigned()
-               && destSize < target.getTargetData().getIntegerRegSize()))
+          if (opSize > destSize || (val->getType()->isSigned() && destSize < 8))
             { // operand is larger than dest,
               //    OR both are equal but smaller than the full register size
               //       AND operand is signed, so it may have extra sign bits:
index 50e2fe23d4dab302d7db6599f8fee320388e758a..78fb2f20d982b67e971c03dd6f26368f01878dc0 100644 (file)
@@ -758,8 +758,7 @@ CreateShiftInstructions(const TargetMachine& target,
   // 
   Value* shiftDest = destVal;
   unsigned opSize = target.getTargetData().getTypeSize(argVal1->getType());
-  if ((shiftOpCode == SLL || shiftOpCode == SLLX)
-      && opSize < target.getTargetData().getIntegerRegSize())
+  if ((shiftOpCode == SLL || shiftOpCode == SLLX) && opSize < 8)
     { // put SLL result into a temporary
       shiftDest = new TmpInstruction(argVal1, optArgVal2, "sllTmp");
       mcfi.addTemp(shiftDest);
@@ -2305,7 +2304,7 @@ GetInstructionsByRule(InstructionNode* subtreeRoot,
                                  .addReg(dest, MOTy::Def);
               mvec.push_back(M);
             }
-          else if (destSize < target.getTargetData().getIntegerRegSize())
+          else if (destSize < 8)
             assert(0 && "Unsupported type size: 32 < size < 64 bits");
         }
     }