This is an archive of the discontinued LLVM Phabricator instance.

[RISCV]Add register constraint on riscv vector instruction
AbandonedPublic

Authored by tangxingxin1008 on Nov 17 2020, 4:48 PM.

Details

Reviewers
HsiangKai
Summary
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

Event Timeline

tangxingxin1008 requested review of this revision.Nov 17 2020, 4:48 PM

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.

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.

I was wondering the same thing.

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.

I was wondering the same thing.

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?

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.

I was wondering the same thing.

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?

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.