Add an assert to check for empty flags for MachineMemOperand.
authorDan Gohman <gohman@apple.com>
Wed, 16 Jul 2008 15:56:42 +0000 (15:56 +0000)
committerDan Gohman <gohman@apple.com>
Wed, 16 Jul 2008 15:56:42 +0000 (15:56 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53680 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/MachineInstr.cpp

index 36212ba4d068f794673051876228dba22edc98e7..595a9149b38ce29ef4cc48b83ae2ddb9dc5db1b9 100644 (file)
@@ -246,6 +246,7 @@ MachineMemOperand::MachineMemOperand(const Value *v, unsigned int f,
   : 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((isLoad() || isStore()) && "Not a load/store!");
 }
 
 //===----------------------------------------------------------------------===//