1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00

* Remove dead variable

* Shift amount is always guaranteed to be 8 bits

llvm-svn: 4491
This commit is contained in:
Chris Lattner 2002-11-02 00:44:25 +00:00
parent 702ac95902
commit b3e08ace0c

View File

@ -153,14 +153,16 @@ ISel::visitShiftInst (ShiftInst & I)
{
unsigned Op0r = getReg (I.getOperand (0));
unsigned DestReg = getReg (I);
unsigned operandSize = I.getOperand (0)->getType ()->getPrimitiveSize ();
unsigned operandSize = I.getType ()->getPrimitiveSize ();
bool isRightShift = (I.getOpcode () == Instruction::Shr);
bool isOperandUnsigned = I.getType ()->isUnsigned ();
bool isConstantShiftAmount = (isa <ConstantUInt> (I.getOperand (1)));
if (ConstantUInt *CUI = dyn_cast <ConstantUInt> (I.getOperand (1)))
{
// The shift amount is constant. Get its value.
uint64_t shAmt = CUI->getValue ();
// The shift amount is constant, guaranteed to be a ubyte. Get its value.
assert(CUI->getType() == Type::UByteTy && "Shift amount not a ubyte?");
unsigned char shAmt = CUI->getValue();
// Emit: <insn> reg, shamt (shift-by-immediate opcode "ir" form.)
if (isRightShift)
{