[PATCH] D139656: [RISCV] Build single element vector for start of reduction change

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 8 14:35:18 PST 2022


reames added a comment.

Talked to Craig because I hadn't followed his last comment.

The issue that we have is that vmv.x.s is modeled badly.  We model it as if it had an LMUL8 variant, but if you read the actual instruction manual you'll see that it ignores register groups and only writes to a single register.  This isn't a correctness concern, but it does mean that this patch over constrains the register allocator (by using a lmul8 reg class), which could result in poor codegen.  This is only an issue for this call site as the previous callsite (earlier change in stack), already had this issue and was likely going to write to the full LMUL8 register group in the following instruction anyways.  The reduction instruction also only writes to a single vector register.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139656/new/

https://reviews.llvm.org/D139656



More information about the llvm-commits mailing list