[llvm] 64e9a3f - [RISCV] Use isVLPreservingConfig in isConvertibleToVMV_V_V. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Fri May 30 23:00:20 PDT 2025
Author: Craig Topper
Date: 2025-05-30T22:59:22-07:00
New Revision: 64e9a3f8f0201e9fc1a7e0124bd91436c0506e70
URL: https://github.com/llvm/llvm-project/commit/64e9a3f8f0201e9fc1a7e0124bd91436c0506e70
DIFF: https://github.com/llvm/llvm-project/commit/64e9a3f8f0201e9fc1a7e0124bd91436c0506e70.diff
LOG: [RISCV] Use isVLPreservingConfig in isConvertibleToVMV_V_V. NFC
Added:
Modified:
llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfo.cpp b/llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
index 09a464324b967..9dc434b2c9197 100644
--- a/llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
+++ b/llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
@@ -293,11 +293,7 @@ static bool isConvertibleToVMV_V_V(const RISCVSubtarget &STI,
}
// Only permit `vsetvli x0, x0, vtype` between COPY and the source
// define instruction.
- if (MBBI->getOperand(0).getReg() != RISCV::X0)
- return false;
- if (MBBI->getOperand(1).isImm())
- return false;
- if (MBBI->getOperand(1).getReg() != RISCV::X0)
+ if (!RISCVInstrInfo::isVLPreservingConfig(*MBBI))
return false;
continue;
}
More information about the llvm-commits
mailing list