[llvm-commits] CVS: llvm/lib/Bytecode/Reader/Reader.cpp
Reid Spencer
reid at x10sys.com
Sat Apr 21 11:37:03 PDT 2007
Changes in directory llvm/lib/Bytecode/Reader:
Reader.cpp updated: 1.249 -> 1.250
---
Log message:
Revert Christopher Lamb's load/store alignment changes.
---
Diffs of the changes: (+3 -21)
Reader.cpp | 24 +++---------------------
1 files changed, 3 insertions(+), 21 deletions(-)
Index: llvm/lib/Bytecode/Reader/Reader.cpp
diff -u llvm/lib/Bytecode/Reader/Reader.cpp:1.249 llvm/lib/Bytecode/Reader/Reader.cpp:1.250
--- llvm/lib/Bytecode/Reader/Reader.cpp:1.249 Sat Apr 21 03:16:25 2007
+++ llvm/lib/Bytecode/Reader/Reader.cpp Sat Apr 21 13:36:27 2007
@@ -831,31 +831,13 @@
&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!");
More information about the llvm-commits
mailing list