aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/CodeGen/SelectionDAGNodes.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h
index e153ee927a..fe4891f159 100644
--- a/include/llvm/CodeGen/SelectionDAGNodes.h
+++ b/include/llvm/CodeGen/SelectionDAGNodes.h
@@ -1651,6 +1651,16 @@ struct ilist_traits<SDNode> {
};
namespace ISD {
+ /// isNormalLoad - Returns true if the specified node is a non-extending
+ /// and unindexed load.
+ inline bool isNormalLoad(const SDNode *N) {
+ if (N->getOpcode() != ISD::LOAD)
+ return false;
+ const LoadSDNode *Ld = cast<LoadSDNode>(N);
+ return Ld->getExtensionType() == ISD::NON_EXTLOAD &&
+ Ld->getAddressingMode() == ISD::UNINDEXED;
+ }
+
/// isNON_EXTLoad - Returns true if the specified node is a non-extending
/// load.
inline bool isNON_EXTLoad(const SDNode *N) {