[PATCH] D141061: [RISCV][InsertVSETVLI] Using rigth instruction during mutate AVL of vsetvli
    Craig Topper via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Jan  5 08:01:28 PST 2023
    
    
  
craig.topper added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp:1319
             MI.getOperand(1).ChangeToRegister(NextMI->getOperand(1).getReg(), false);
+          if (MI.getOpcode() != NextMI->getOpcode())
+            MI.setDesc(TII->get(NextMI->getOpcode()));
----------------
I think you can drop this `if`. `setDesc` is cheap.
================
Comment at: llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp:1320
+          if (MI.getOpcode() != NextMI->getOpcode())
+            MI.setDesc(TII->get(NextMI->getOpcode()));
         }
----------------
`MI.setDesc(NextMI->getDesc())`?
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141061/new/
https://reviews.llvm.org/D141061
    
    
More information about the llvm-commits
mailing list