[PATCH] D83390: [GlobalISel][InlineAsm] Extend input operands when register class size does not match type

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 8 13:09:27 PDT 2020


arsenm added inline comments.


================
Comment at: llvm/lib/CodeGen/GlobalISel/InlineAsmLowering.cpp:537-539
+        Register ScratchReg =
+            MRI->createGenericVirtualRegister(LLT::scalar(TargetSize));
+        InputReg = MIRBuilder.buildAnyExt(ScratchReg, InputReg).getReg(0);
----------------
Scratch reg and InputReg are the same thing. You can just use the type as the DstOp to buildAnyExt.

This may also be a problem for non-scalar sources. What if you have <2 x i4>?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D83390





More information about the llvm-commits mailing list