[PATCH] D153394: [AArch64][GlobalISel] Selection support for v2s16 G_ANYEXT

Amara Emerson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 19 16:52:26 PDT 2023


aemerson added a comment.

So I had a look at this particular test case, and from what I can tell there's nothing we're doing wrong in the IRTranslator. `lowerReturn()` is correctly widening the `<2 x i16>` return type to `<2 x i32>`. This leaves the following MIR:

  body:             |
    bb.1 (%ir-block.0):
      %1:_(s16) = G_CONSTANT i16 0
      %2:_(s16) = G_CONSTANT i16 1
      %0:_(<2 x s16>) = G_BUILD_VECTOR %1(s16), %2(s16)
      %3:_(<2 x s32>) = G_ANYEXT %0(<2 x s16>)
      $d0 = COPY %3(<2 x s32>)
      RET_ReallyLR implicit $d0

I think the problem is that G_BUILD_VECTOR of `<2 x i16>` needs to be widened to a supported type. Since this was a trivial change, I went ahead and did it in ccffc2705054 <https://reviews.llvm.org/rGccffc2705054c24a5768b59fbb96c3044ff1a8d4>

Thanks anyway for taking a look at it!


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

https://reviews.llvm.org/D153394



More information about the llvm-commits mailing list