aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/RISCV/RISCVSelectionDAGInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/RISCV/RISCVSelectionDAGInfo.cpp')
-rw-r--r--llvm/lib/Target/RISCV/RISCVSelectionDAGInfo.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/llvm/lib/Target/RISCV/RISCVSelectionDAGInfo.cpp b/llvm/lib/Target/RISCV/RISCVSelectionDAGInfo.cpp
new file mode 100644
index 000000000000..ab1ade89a76d
--- /dev/null
+++ b/llvm/lib/Target/RISCV/RISCVSelectionDAGInfo.cpp
@@ -0,0 +1,24 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "RISCVSelectionDAGInfo.h"
+#include "RISCVISelLowering.h"
+
+using namespace llvm;
+
+RISCVSelectionDAGInfo::~RISCVSelectionDAGInfo() = default;
+
+bool RISCVSelectionDAGInfo::isTargetMemoryOpcode(unsigned Opcode) const {
+ return Opcode >= RISCVISD::FIRST_MEMORY_OPCODE &&
+ Opcode <= RISCVISD::LAST_MEMORY_OPCODE;
+}
+
+bool RISCVSelectionDAGInfo::isTargetStrictFPOpcode(unsigned Opcode) const {
+ return Opcode >= RISCVISD::FIRST_STRICTFP_OPCODE &&
+ Opcode <= RISCVISD::LAST_STRICTFP_OPCODE;
+}