aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-07-08 23:47:04 +0000
committerDan Gohman <gohman@apple.com>2008-07-08 23:47:04 +0000
commitf1bf29e648a25a440d3dcf5a445b30c4129c9bca (patch)
treefe5bfa5023d989ab6dccc7abddb8dbe441004158 /lib/CodeGen/MachineInstr.cpp
parent9c6e70eca9a49c146b26621cbcbb9464ceeac024 (diff)
Verify that MachineMemOperand alignment is a non-zero power of 2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53262 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineInstr.cpp')
-rw-r--r--lib/CodeGen/MachineInstr.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp
index da8101f6a0..38176b0c13 100644
--- a/lib/CodeGen/MachineInstr.cpp
+++ b/lib/CodeGen/MachineInstr.cpp
@@ -246,6 +246,7 @@ MachineMemOperand::MachineMemOperand(const Value *v, unsigned int f,
int64_t o, uint64_t s, unsigned int a)
: Offset(o), Size(s), V(v),
Flags((f & 7) | ((Log2_32(a) + 1) << 3)) {
+ assert(isPowerOf2_32(a) && "Alignment is not a power of 2!");
}
//===----------------------------------------------------------------------===//