From 0c1349e6bc1a50018cddd8c447846701964c07c9 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Sat, 21 Apr 2007 18:36:27 +0000 Subject: Revert Christopher Lamb's load/store alignment changes. llvm-svn: 36309 --- llvm/lib/Bytecode/Reader/Reader.cpp | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) (limited to 'llvm/lib/Bytecode/Reader') diff --git a/llvm/lib/Bytecode/Reader/Reader.cpp b/llvm/lib/Bytecode/Reader/Reader.cpp index 59c69d7c496..49792693dcc 100644 --- a/llvm/lib/Bytecode/Reader/Reader.cpp +++ b/llvm/lib/Bytecode/Reader/Reader.cpp @@ -831,31 +831,13 @@ void BytecodeReader::ParseInstruction(SmallVector &Oprnds, &Idx[0], Idx.size()); break; } - case 62: { // attributed load - if (Oprnds.size() != 2 || !isa(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<(InstTy)) error("Invalid load instruction!"); - Result = new LoadInst(getValue(iType, Oprnds[0]), ""); + Result = new LoadInst(getValue(iType, Oprnds[0]), "", Opcode == 62); break; - case 63: { // attributed store - if (!isa(InstTy) || Oprnds.size() != 3) - error("Invalid store instruction!"); - - Value *Ptr = getValue(iType, Oprnds[1]); - const Type *ValTy = cast(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<(InstTy) || Oprnds.size() != 2) error("Invalid store instruction!"); -- cgit v1.2.3