From e9313fa33ae501182666101380282228fb3f4acc Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Thu, 3 Jun 2021 17:31:54 -0700 Subject: [PATCH] [RISCV] Simplify some code in RISCVInsertVSETVLI by calling an existing function that does the same thing. NFCI --- llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp b/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp index e1c7cb3..4812416 100644 --- a/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp +++ b/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp @@ -177,17 +177,7 @@ public: return true; } - // VTypes must match. - if (!hasSameVTYPE(Other)) - return false; - - if (hasAVLImm() != Other.hasAVLImm()) - return false; - - if (hasAVLImm()) - return getAVLImm() == Other.getAVLImm(); - - return getAVLReg() == Other.getAVLReg(); + return hasSameVTYPE(Other) && hasSameAVL(Other); } bool operator==(const VSETVLIInfo &Other) const { -- 2.7.4