diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-04-21 18:36:27 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-04-21 18:36:27 +0000 |
commit | c67bdc288aac130d88630f7fa95ceca6bcf95077 (patch) | |
tree | 3fae3a889e0520a5670196b40f6a2f9eb5b1adfb /lib/Bytecode/Reader/Reader.cpp | |
parent | b3b0727032e58c8b8f3017c2b3f560616c6905af (diff) |
Revert Christopher Lamb's load/store alignment changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36309 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bytecode/Reader/Reader.cpp')
-rw-r--r-- | lib/Bytecode/Reader/Reader.cpp | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/lib/Bytecode/Reader/Reader.cpp b/lib/Bytecode/Reader/Reader.cpp index 59c69d7c49..49792693dc 100644 --- a/lib/Bytecode/Reader/Reader.cpp +++ b/lib/Bytecode/Reader/Reader.cpp @@ -831,31 +831,13 @@ void BytecodeReader::ParseInstruction(SmallVector<unsigned, 8> &Oprnds, &Idx[0], Idx.size()); break; } - 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)); - break; - } + case 62: // volatile load case Instruction::Load: if (Oprnds.size() != 1 || !isa<PointerType>(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<PointerType>(InstTy) || Oprnds.size() != 3) - error("Invalid store instruction!"); - - 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)); - break; - } + case 63: // volatile store case Instruction::Store: { if (!isa<PointerType>(InstTy) || Oprnds.size() != 2) error("Invalid store instruction!"); |