PR400 phase 1 implementation feedback.
[oota-llvm.git] / include / llvm / Instructions.h
index 61d0efafe5f49f245a053d437dfb68865af9dbb2..236a1fdcced8cc6bc5a508afcfddc9929b9ff77d 100644 (file)
@@ -255,8 +255,7 @@ public:
   /// getAlignment - Return the alignment of the access that is being performed
   ///
   unsigned getAlignment() const {
-    signed Log2AlignVal = ((SubclassData>>1)-1);
-    return ((Log2AlignVal < 0) ? 0 : 1<<Log2AlignVal);
+    return (1 << (SubclassData>>1)) >> 1;
   }
   
   void setAlignment(unsigned Align);
@@ -331,8 +330,7 @@ public:
   /// getAlignment - Return the alignment of the access that is being performed
   ///
   unsigned getAlignment() const {
-    signed Log2AlignVal = ((SubclassData>>1)-1);
-    return ((Log2AlignVal < 0) ? 0 : 1<<Log2AlignVal);
+    return (1 << (SubclassData>>1)) >> 1;
   }
   
   void setAlignment(unsigned Align);