From: Craig Topper Date: Fri, 4 Jun 2021 00:31:54 +0000 (-0700) Subject: [RISCV] Simplify some code in RISCVInsertVSETVLI by calling an existing function... X-Git-Tag: llvmorg-14-init~4898 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e9313fa33ae501182666101380282228fb3f4acc;p=platform%2Fupstream%2Fllvm.git [RISCV] Simplify some code in RISCVInsertVSETVLI by calling an existing function that does the same thing. NFCI --- 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 {