summaryrefslogtreecommitdiffstats
path: root/include/llvm/CodeGen
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-02-25 22:16:29 +0000
committerDan Gohman <gohman@apple.com>2008-02-25 22:16:29 +0000
commit437d452adbc1ec58e73d9fd0dbfe345c69289a23 (patch)
treec84ad974aff89fa0dfe1285a9afc816c0528efad /include/llvm/CodeGen
parentc2d9b5fcdfcfaa40b8d8b85b3ff46ab0dfebd619 (diff)
downloadexternal_llvm-437d452adbc1ec58e73d9fd0dbfe345c69289a23.zip
external_llvm-437d452adbc1ec58e73d9fd0dbfe345c69289a23.tar.gz
external_llvm-437d452adbc1ec58e73d9fd0dbfe345c69289a23.tar.bz2
Factor the assert for indexed loads/stores out of LoadSDNode
and StoreSDNode into LSBaseSDNode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47570 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen')
-rw-r--r--include/llvm/CodeGen/SelectionDAGNodes.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h
index 64c9fe3..56645f7 100644
--- a/include/llvm/CodeGen/SelectionDAGNodes.h
+++ b/include/llvm/CodeGen/SelectionDAGNodes.h
@@ -1632,6 +1632,8 @@ public:
Ops[i] = Operands[i];
InitOperands(Ops, NumOperands);
assert(Align != 0 && "Loads and stores should have non-zero aligment");
+ assert((getOffset().getOpcode() == ISD::UNDEF || isIndexed()) &&
+ "Only indexed loads and stores have a non-undef offset operand");
}
const SDOperand &getChain() const { return getOperand(0); }
@@ -1682,10 +1684,7 @@ protected:
const Value *SV, int O=0, unsigned Align=0, bool Vol=false)
: LSBaseSDNode(ISD::LOAD, ChainPtrOff, 3,
VTs, AM, LVT, SV, O, Align, Vol),
- ExtType(ETy) {
- assert((getOffset().getOpcode() == ISD::UNDEF || isIndexed()) &&
- "Only indexed loads and stores have a non-undef offset operand");
- }
+ ExtType(ETy) {}
public:
ISD::LoadExtType getExtensionType() const { return ExtType; }
@@ -1712,10 +1711,7 @@ protected:
const Value *SV, int O=0, unsigned Align=0, bool Vol=false)
: LSBaseSDNode(ISD::STORE, ChainValuePtrOff, 4,
VTs, AM, SVT, SV, O, Align, Vol),
- IsTruncStore(isTrunc) {
- assert((getOffset().getOpcode() == ISD::UNDEF || isIndexed()) &&
- "Only indexed loads and stores have a non-undef offset operand");
- }
+ IsTruncStore(isTrunc) {}
public:
bool isTruncatingStore() const { return IsTruncStore; }