[RISCV] Simplify some code in RISCVInsertVSETVLI by calling an existing function...
authorCraig Topper <craig.topper@sifive.com>
Fri, 4 Jun 2021 00:31:54 +0000 (17:31 -0700)
committerCraig Topper <craig.topper@sifive.com>
Fri, 4 Jun 2021 00:31:54 +0000 (17:31 -0700)
llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp

index e1c7cb3..4812416 100644 (file)
@@ -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 {