llvm.org GIT mirror llvm / 437d452
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 Dan Gohman 12 years ago
1 changed file(s) with 4 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
16311631 Ops[i] = Operands[i];
16321632 InitOperands(Ops, NumOperands);
16331633 assert(Align != 0 && "Loads and stores should have non-zero aligment");
1634 assert((getOffset().getOpcode() == ISD::UNDEF || isIndexed()) &&
1635 "Only indexed loads and stores have a non-undef offset operand");
16341636 }
16351637
16361638 const SDOperand &getChain() const { return getOperand(0); }
16811683 const Value *SV, int O=0, unsigned Align=0, bool Vol=false)
16821684 : LSBaseSDNode(ISD::LOAD, ChainPtrOff, 3,
16831685 VTs, AM, LVT, SV, O, Align, Vol),
1684 ExtType(ETy) {
1685 assert((getOffset().getOpcode() == ISD::UNDEF || isIndexed()) &&
1686 "Only indexed loads and stores have a non-undef offset operand");
1687 }
1686 ExtType(ETy) {}
16881687 public:
16891688
16901689 ISD::LoadExtType getExtensionType() const { return ExtType; }
17111710 const Value *SV, int O=0, unsigned Align=0, bool Vol=false)
17121711 : LSBaseSDNode(ISD::STORE, ChainValuePtrOff, 4,
17131712 VTs, AM, SVT, SV, O, Align, Vol),
1714 IsTruncStore(isTrunc) {
1715 assert((getOffset().getOpcode() == ISD::UNDEF || isIndexed()) &&
1716 "Only indexed loads and stores have a non-undef offset operand");
1717 }
1713 IsTruncStore(isTrunc) {}
17181714 public:
17191715
17201716 bool isTruncatingStore() const { return IsTruncStore; }