[llvm-commits] [llvm] r53262 - /llvm/trunk/lib/CodeGen/MachineInstr.cpp
Dan Gohman
gohman at apple.com
Tue Jul 8 16:47:04 PDT 2008
Author: djg
Date: Tue Jul 8 18:47:04 2008
New Revision: 53262
URL: http://llvm.org/viewvc/llvm-project?rev=53262&view=rev
Log:
Verify that MachineMemOperand alignment is a non-zero power of 2.
Modified:
llvm/trunk/lib/CodeGen/MachineInstr.cpp
Modified: llvm/trunk/lib/CodeGen/MachineInstr.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineInstr.cpp?rev=53262&r1=53261&r2=53262&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineInstr.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineInstr.cpp Tue Jul 8 18:47:04 2008
@@ -246,6 +246,7 @@
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!");
}
//===----------------------------------------------------------------------===//
More information about the llvm-commits
mailing list