[PATCH] D139757: [RISCV] Use reduction result type for EXTRACT_VECTOR_ELT in lowerReductionSeq.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 12 09:22:22 PST 2022


craig.topper added a comment.

In D139757#3988937 <https://reviews.llvm.org/D139757#3988937>, @reames wrote:

> LGTM, but with a question to make sure of my understanding.
>
> Are you sure that the interpretation of a reduction with a wider type is as a sext?  It needs to be to match the code you're removing, but it could in principle be a zext or aext.  Can you point to something in the code to demonstrate it must be sext?  Or alternatively, explain why aext is okay?

If the result type is wider than the element type, the semantics of the reduction node we're lowering is aext. Same with EXTRACT_VECTOR_ELT. I don't think we were obligated to use a sext here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D139757



More information about the llvm-commits mailing list