diff options
author | Christopher Lamb <christopher.lamb@gmail.com> | 2007-04-22 22:22:02 +0000 |
---|---|---|
committer | Christopher Lamb <christopher.lamb@gmail.com> | 2007-04-22 22:22:02 +0000 |
commit | f9206e267d162b195c0ad4d5b1c5c2b43795c194 (patch) | |
tree | 9e5e72178aa5c3b5721c675b50b7aa572beb90cc /llvm/lib/Bytecode/Reader/Reader.cpp | |
parent | af9a8a51a82bf52e37d52c76b585a4984f24d74b (diff) | |
download | bcm5719-llvm-f9206e267d162b195c0ad4d5b1c5c2b43795c194.tar.gz bcm5719-llvm-f9206e267d162b195c0ad4d5b1c5c2b43795c194.zip |
PR400 phase 1 implementation feedback.
llvm-svn: 36354
Diffstat (limited to 'llvm/lib/Bytecode/Reader/Reader.cpp')
-rw-r--r-- | llvm/lib/Bytecode/Reader/Reader.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Bytecode/Reader/Reader.cpp b/llvm/lib/Bytecode/Reader/Reader.cpp index 7ac784ecc7c..98ed57ea6f4 100644 --- a/llvm/lib/Bytecode/Reader/Reader.cpp +++ b/llvm/lib/Bytecode/Reader/Reader.cpp @@ -834,9 +834,8 @@ void BytecodeReader::ParseInstruction(SmallVector<unsigned, 8> &Oprnds, 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: @@ -850,10 +849,9 @@ void BytecodeReader::ParseInstruction(SmallVector<unsigned, 8> &Oprnds, 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: { |