Change MachineMemOperand's alignment value to be the alignment of

the base pointer, without the offset. This matches MemSDNode's
new alignment behavior, and holds more interesting information.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82473 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman
2009-09-21 19:47:04 +00:00
parent 78a130a31c
commit 28f02fdd76
5 changed files with 17 additions and 9 deletions

View File

@ -284,7 +284,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!");
assert(getBaseAlignment() == a && "Alignment is not a power of 2!");
assert((isLoad() || isStore()) && "Not a load/store!");
}