From 7504e9a19346b33fd2e0fcdcbd43ecee3d676b86 Mon Sep 17 00:00:00 2001 From: Kito Cheng Date: Fri, 6 Jan 2023 00:48:22 +0800 Subject: [PATCH] [RISCV][NFC] Refine the patch of D141061 Just saw Craig's comment after I commit, he has suggest a good NFC for that change. --- llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp b/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp index bc6af29..115c962 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); -- 2.7.4