[RISCV] Minor reorganization of VSETVLIInfo::operator== for readability [NFC]
authorPhilip Reames <preames@rivosinc.com>
Tue, 17 May 2022 19:05:11 +0000 (12:05 -0700)
committerPhilip Reames <preames@rivosinc.com>
Tue, 17 May 2022 19:05:17 +0000 (12:05 -0700)
llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp

index 4062859..fb3220e 100644 (file)
@@ -317,16 +317,16 @@ public:
     if (!hasSameAVL(Other))
       return false;
 
+    // If the SEWLMULRatioOnly bits are different, then they aren't equal.
+    if (SEWLMULRatioOnly != Other.SEWLMULRatioOnly)
+      return false;
+
     // If only the VLMAX is valid, check that it is the same.
-    if (SEWLMULRatioOnly && Other.SEWLMULRatioOnly)
+    if (SEWLMULRatioOnly)
       return hasSameVLMAX(Other);
 
     // If the full VTYPE is valid, check that it is the same.
-    if (!SEWLMULRatioOnly && !Other.SEWLMULRatioOnly)
-      return hasSameVTYPE(Other);
-
-    // If the SEWLMULRatioOnly bits are different, then they aren't equal.
-    return false;
+    return hasSameVTYPE(Other);
   }
 
   bool operator!=(const VSETVLIInfo &Other) const {