- bool CombineToIndexedLoadStore(SDNode *N) {
+ /// CombineToPreIndexedLoadStore - Try turning a load / store into a
+ /// pre-indexed load store when the base pointer is a add or subtract
+ /// and it has other uses besides the load / store. When the
+ /// transformation is done, the new indexed load / store effectively
+ /// folded the add / subtract in and all of its other uses are redirected
+ /// to the new load / store.
+ bool CombineToPreIndexedLoadStore(SDNode *N) {
bool isLoad = true;
SDOperand Ptr;
if (LoadSDNode *LD = dyn_cast<LoadSDNode>(N)) {
bool isLoad = true;
SDOperand Ptr;
if (LoadSDNode *LD = dyn_cast<LoadSDNode>(N)) {
return DAG.getNode(ISD::OR, VT, N0, N1);
}
}
return DAG.getNode(ISD::OR, VT, N0, N1);
}
}
}
// Try transforming N to an indexed load.
}
// Try transforming N to an indexed load.
- if (CombineToIndexedLoadStore(N))
+ if (CombineToPreIndexedLoadStore(N))
return SDOperand(N, 0);
return SDOperand();
return SDOperand(N, 0);
return SDOperand();
}
// Try transforming N to an indexed store.
}
// Try transforming N to an indexed store.
- if (CombineToIndexedLoadStore(N))
+ if (CombineToPreIndexedLoadStore(N))
return SDOperand(N, 0);
return SDOperand();
return SDOperand(N, 0);
return SDOperand();