[llvm] [RISCV][GISel] Support select vx, vf form rvv intrinsics (PR #157398)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 12 03:17:36 PDT 2025
================
@@ -500,6 +500,34 @@ RISCVRegisterBankInfo::getInstrMapping(const MachineInstr &MI) const {
OpdsMapping[1] = GPRValueMapping;
break;
}
+ case TargetOpcode::G_INTRINSIC: {
+ Intrinsic::ID IntrinsicID = cast<GIntrinsic>(MI).getIntrinsicID();
+
+ if (auto *II = RISCVVIntrinsicsTable::getRISCVVIntrinsicInfo(IntrinsicID)) {
+ unsigned ScalarIdx = -1;
+ if (II->hasScalarOperand()) {
+ ScalarIdx = II->ScalarOperand + 2;
+ }
+ for (unsigned Idx = 0; Idx < NumOperands; ++Idx) {
+ auto &MO = MI.getOperand(Idx);
+ if (!MO.isReg() || !MO.getReg())
+ continue;
----------------
arsenm wrote:
These also probably should not be possible
https://github.com/llvm/llvm-project/pull/157398
More information about the llvm-commits
mailing list