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

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 27 07:48:22 PDT 2023


dmgreen added a comment.

If I'm reading the test correctly, then SDAG version is returning (as bytes) `0,0,0,0,1,0,0,0`. i.e the v2i16 is promoted to a v2i32. The GlobalISel version is returning `0,0,1,0,0,0,0,0`, as the v2i16 is widened to a v4i16.

I don't think we can have a difference in the calling convention between the two, it would mean they are ABI incompatible. Either they both need to change to widen (which looks like a lot of work, including an ABI break for SDAG), or the GISel code need return values in the same way as SDAG does.



================
Comment at: llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp:3230
     if (DstSize > 32) {
       Register ExtSrc = MRI.createVirtualRegister(&AArch64::GPR64allRegClass);
       BuildMI(MBB, I, I.getDebugLoc(), TII.get(AArch64::SUBREG_TO_REG))
----------------
I don't think this will handle vector extends correctly.


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

https://reviews.llvm.org/D153394



More information about the llvm-commits mailing list