[llvm-commits] CVS: llvm/lib/Bytecode/Reader/Reader.cpp

Christopher Lamb christopher.lamb at gmail.com
Sun Apr 22 15:22:25 PDT 2007



Changes in directory llvm/lib/Bytecode/Reader:

Reader.cpp updated: 1.252 -> 1.253
---
Log message:

PR400: http://llvm.org/PR400  phase 1 implementation feedback.


---
Diffs of the changes:  (+2 -4)

 Reader.cpp |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)


Index: llvm/lib/Bytecode/Reader/Reader.cpp
diff -u llvm/lib/Bytecode/Reader/Reader.cpp:1.252 llvm/lib/Bytecode/Reader/Reader.cpp:1.253
--- llvm/lib/Bytecode/Reader/Reader.cpp:1.252	Sun Apr 22 14:24:39 2007
+++ llvm/lib/Bytecode/Reader/Reader.cpp	Sun Apr 22 17:22:02 2007
@@ -834,9 +834,8 @@
     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 @@
 
         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: {






More information about the llvm-commits mailing list