[llvm] [RISCV][GISEL] Add support for lowerFormalArguments that contain scalable vector types (PR #70882)
Michael Maitland via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 3 08:50:09 PDT 2023
================
@@ -1956,10 +1957,21 @@ void MachineVerifier::visitMachineInstrBefore(const MachineInstr *MI) {
DstSize = TRI->getRegSizeInBits(*DstRC);
}
- if (DstSize == 0)
+ if (DstSize.isZero())
DstSize = TRI->getRegSizeInBits(DstReg, *MRI);
- if (SrcSize != 0 && DstSize != 0 && SrcSize != DstSize) {
+ // If the Dst is scalable and the Src is fixed, then the Dst can only hold
+ // the Src if the minimum size Dst can hold is at least as big as Src.
+ if (DstSize.isScalable() && !SrcSize.isScalable() &&
+ DstSize.getKnownMinValue() <= SrcSize.getFixedValue())
+ break;
+ // If the Src is scalable and the Dst is fixed, then Dest can only hold
----------------
michaelmaitland wrote:
This case is removed in https://github.com/llvm/llvm-project/pull/70881 (this PR is stacked on that one). I would greatly appreciate your input on the conversation going on that PR, because I'm not quite sure that we've got the correct approach.
https://github.com/llvm/llvm-project/pull/70882
More information about the llvm-commits
mailing list