On vector instruction, if the operand is a vector, it should be from vector register groups.
Signed-off-by: tangxingxin <tangxingxin1008@gmail.com>
Differential D91668
[RISCV]Add register constraint on riscv vector instruction tangxingxin1008 on Nov 17 2020, 4:48 PM. Authored by
Details
On vector instruction, if the operand is a vector, it should be from vector register groups. Signed-off-by: tangxingxin <tangxingxin1008@gmail.com>
Diff Detail
Unit Tests Event TimelineComment Actions I'm confused why VRegAsmOperand even needs to exist; why can it not just use a register class like everything else and get this automatically? We only have AtomicMemOpOperand in order to parse both (reg) and 0(reg), but that's irrelevant for vectors. Comment Actions I am a beginner, only submit this patch for solved the problem of vector operand, but don't think so far. I'm sorry that I can't answer this question. Could the designer @HsiangKai help me to answer this question? Comment Actions Initially, I model LMUL information into the instruction definitions. I created different operand classes for different LMUL register classes. After discussing with @rogfer01, we agreed to model the LMUL information into pseudo instructions. We will use the pseudo instructions to do code generation for RVV. There is no need to keep the operand class anymore. I will create a patch to refine it. Thanks. |