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 | 032507d989163a89311847535a7e7c5d9a67229f (patch) | |
tree | 91e25b2500ae66b0bbd84d53a2a005712f8a4ac5 /include/llvm/Instructions.h | |
parent | dc4cb35105b00dcde3ee7c7ce0128a13da0cc927 (diff) | |
download | external_llvm-032507d989163a89311847535a7e7c5d9a67229f.zip external_llvm-032507d989163a89311847535a7e7c5d9a67229f.tar.gz external_llvm-032507d989163a89311847535a7e7c5d9a67229f.tar.bz2 |
PR400 phase 1 implementation feedback.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36354 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Instructions.h')
-rw-r--r-- | include/llvm/Instructions.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h index 61d0efa..236a1fd 100644 --- a/include/llvm/Instructions.h +++ b/include/llvm/Instructions.h @@ -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); |