[llvm] 8b57704 - [RISCV][VLOPT] Add vmv.x.s and vfmv.f.s to isVectorOpUsedAsScalarOp (#121588)

via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 5 08:19:48 PST 2025


Author: Michael Maitland
Date: 2025-01-05T11:19:45-05:00
New Revision: 8b577043b1f770d72e59738382ac32d212497a6d

URL: https://github.com/llvm/llvm-project/commit/8b577043b1f770d72e59738382ac32d212497a6d
DIFF: https://github.com/llvm/llvm-project/commit/8b577043b1f770d72e59738382ac32d212497a6d.diff

LOG: [RISCV][VLOPT] Add vmv.x.s and vfmv.f.s to isVectorOpUsedAsScalarOp (#121588)

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp b/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
index 0ddfcd86203369..32d552625a8e8b 100644
--- a/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
+++ b/llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp
@@ -935,6 +935,9 @@ static bool isVectorOpUsedAsScalarOp(MachineOperand &MO) {
   case RISCV::VFWREDOSUM_VS:
   case RISCV::VFWREDUSUM_VS:
     return MO.getOperandNo() == 3;
+  case RISCV::VMV_X_S:
+  case RISCV::VFMV_F_S:
+    return MO.getOperandNo() == 1;
   default:
     return false;
   }


        


More information about the llvm-commits mailing list