case 62: { // attributed load
if (Oprnds.size() != 2 || !isa<PointerType>(InstTy))
error("Invalid attributed load instruction!");
- signed Log2AlignVal = ((Oprnds[1]>>1)-1);
Result = new LoadInst(getValue(iType, Oprnds[0]), "", (Oprnds[1] & 1),
- ((Log2AlignVal < 0) ? 0 : 1<<Log2AlignVal));
+ (1 << (Oprnds[1]>>1)) >> 1);
break;
}
case Instruction::Load:
Value *Ptr = getValue(iType, Oprnds[1]);
const Type *ValTy = cast<PointerType>(Ptr->getType())->getElementType();
- signed Log2AlignVal = ((Oprnds[2]>>1)-1);
Result = new StoreInst(getValue(getTypeSlot(ValTy), Oprnds[0]), Ptr,
(Oprnds[2] & 1),
- ((Log2AlignVal < 0) ? 0 : 1<<Log2AlignVal));
+ (1 << (Oprnds[2]>>1)) >> 1);
break;
}
case Instruction::Store: {