[PATCH] D65472: GlobalISel: Fix widenScalar for G_MERGE_VALUES to pointer

Daniel Sanders via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 31 10:47:01 PDT 2019


dsanders accepted this revision.
dsanders added a comment.
This revision is now accepted and ready to land.

LGTM with a nit



================
Comment at: lib/CodeGen/GlobalISel/LegalizerHelper.cpp:995
       MIRBuilder.buildTrunc(DstReg, ResultReg);
+    else if (WideTy != DstTy)
+      MIRBuilder.buildIntToPtr(DstReg, ResultReg);
----------------
I'd prefer it if this checked DstTy.isPointer() or at least asserted it. It's not very obvious that WideTy != DstTy => pointer


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

https://reviews.llvm.org/D65472





More information about the llvm-commits mailing list