[PATCH] D55814: GlobalISel: Support narrowing zextload/sextload

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 18 21:45:55 PST 2019


arsenm marked an inline comment as done.
arsenm added inline comments.


================
Comment at: lib/CodeGen/GlobalISel/LegalizerHelper.cpp:540
+    else
+      MIRBuilder.buildSExt(DstReg, TmpReg);
+
----------------
dsanders wrote:
> However, this should be invalid for the same reason, 's32 = G_SEXT s32' doesn't make sense. It would be better for the case where it lowers to G_LOAD to just replace the opcode in place. If we have observers plumbed into the legalizer yet we should also call the changingInstr()+changedInstr() events.
I don't see why this would actually happen? I suppose that depends on what the constraints are for the specified legalize actions. I don't think you should be allow to specify narrow on a type to the same type. Assuming narrowing a load to the same type isn't allowed, this shouldn't be an issue.


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

https://reviews.llvm.org/D55814





More information about the llvm-commits mailing list