[PATCH] D68309: GlobalISel: Implement widenScalar for G_INSERT_VECTOR_ELT

Nicolai Hähnle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 8 05:46:49 PDT 2019


nhaehnle added a comment.

For the vector itself and the inserted element, shouldn't this be using G_ANYEXT instead? Looking at the corresponding test, the G_SHL/G_ASHR on $vgpr0 should be unnecessary based on the original code.

For the element index, shouldn't this be using G_ZEXT or G_ANYEXT? I don't recall whether `insertelement` is supposed to interpret this argument as a signed or unsigned integer, and couldn't quickly find a reference to it. Not that it usually matters, but I find G_SEXT here surprising as well.


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

https://reviews.llvm.org/D68309





More information about the llvm-commits mailing list