mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-02 16:36:40 +00:00
Factor the assert for indexed loads/stores out of LoadSDNode
and StoreSDNode into LSBaseSDNode. llvm-svn: 47570
This commit is contained in:
parent
2585bc7c46
commit
4089604796
@ -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; }
|
||||
|
Loading…
Reference in New Issue
Block a user