[llvm] 4536ad4 - [RISCV] Fix clang-tidy warning about else after return. NFC

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 17 05:26:16 PDT 2024


Author: Luke Lau
Date: 2024-04-17T20:26:02+08:00
New Revision: 4536ad47579d8d61f372ab85128bcfaed58a1256

URL: https://github.com/llvm/llvm-project/commit/4536ad47579d8d61f372ab85128bcfaed58a1256
DIFF: https://github.com/llvm/llvm-project/commit/4536ad47579d8d61f372ab85128bcfaed58a1256.diff

LOG: [RISCV] Fix clang-tidy warning about else after return. NFC

Added: 
    

Modified: 
    llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp b/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
index 6e45f0c703ceb8..aab91adbb64be4 100644
--- a/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
+++ b/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
@@ -1551,7 +1551,9 @@ void RISCVInsertVSETVLI::doLocalPostpass(MachineBasicBlock &MBB) {
         ToDelete.push_back(&MI);
         // Leave NextMI unchanged
         continue;
-      } else if (canMutatePriorConfig(MI, *NextMI, Used, *MRI)) {
+      }
+
+      if (canMutatePriorConfig(MI, *NextMI, Used, *MRI)) {
         if (!isVLPreservingConfig(*NextMI)) {
           MI.getOperand(0).setReg(NextMI->getOperand(0).getReg());
           MI.getOperand(0).setIsDead(false);


        


More information about the llvm-commits mailing list