From a2ea8a1eca54f9f98b86765b73b051e56e71340c Mon Sep 17 00:00:00 2001 From: Jessica Paquette Date: Tue, 27 Aug 2019 17:47:06 +0000 Subject: Recommit "[GlobalISel] Import patterns containing INSERT_SUBREG" I thought `llvm::sort` was stable for some reason but it's not. Use `llvm::stable_sort` in `CodeGenTarget::getSuperRegForSubReg`. Original patch: https://reviews.llvm.org/D66498 llvm-svn: 370084 --- llvm/utils/TableGen/CodeGenTarget.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'llvm/utils/TableGen/CodeGenTarget.h') diff --git a/llvm/utils/TableGen/CodeGenTarget.h b/llvm/utils/TableGen/CodeGenTarget.h index 1ab2de269c7..d52ffac4ce6 100644 --- a/llvm/utils/TableGen/CodeGenTarget.h +++ b/llvm/utils/TableGen/CodeGenTarget.h @@ -103,6 +103,12 @@ public: /// getRegBank - Return the register bank description. CodeGenRegBank &getRegBank() const; + /// Return the largest register class on \p RegBank which supports \p Ty and + /// covers \p SubIdx if it exists. + Optional + getSuperRegForSubReg(const ValueTypeByHwMode &Ty, CodeGenRegBank &RegBank, + const CodeGenSubRegIndex *SubIdx) const; + /// getRegisterByName - If there is a register with the specific AsmName, /// return it. const CodeGenRegister *getRegisterByName(StringRef Name) const; -- cgit v1.2.3