[llvm] 7504e9a - [RISCV][NFC] Refine the patch of D141061

Kito Cheng via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 5 08:49:32 PST 2023


Author: Kito Cheng
Date: 2023-01-06T00:48:24+08:00
New Revision: 7504e9a19346b33fd2e0fcdcbd43ecee3d676b86

URL: https://github.com/llvm/llvm-project/commit/7504e9a19346b33fd2e0fcdcbd43ecee3d676b86
DIFF: https://github.com/llvm/llvm-project/commit/7504e9a19346b33fd2e0fcdcbd43ecee3d676b86.diff

LOG: [RISCV][NFC] Refine the patch of D141061

Just saw Craig's comment after I commit, he has suggest a good NFC
for that change.

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 bc6af29ee1de..115c9622219f 100644
--- a/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
+++ b/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
@@ -1316,8 +1316,7 @@ void RISCVInsertVSETVLI::doLocalPostpass(MachineBasicBlock &MBB) {
             MI.getOperand(1).ChangeToImmediate(NextMI->getOperand(1).getImm());
           else
             MI.getOperand(1).ChangeToRegister(NextMI->getOperand(1).getReg(), false);
-          if (MI.getOpcode() != NextMI->getOpcode())
-            MI.setDesc(TII->get(NextMI->getOpcode()));
+          MI.setDesc(NextMI->getDesc());
         }
         MI.getOperand(2).setImm(NextMI->getOperand(2).getImm());
         ToDelete.push_back(NextMI);


        


More information about the llvm-commits mailing list