[PATCH] D83384: [GlobalISel][InlineAsm] Fix buildCopy for inputs

Petar Avramovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 9 01:24:27 PDT 2020


Petar.Avramovic marked an inline comment as done.
Petar.Avramovic added inline comments.


================
Comment at: llvm/lib/CodeGen/GlobalISel/InlineAsmLowering.cpp:240
 
+static bool buildAnyextOrCopy(Register Dst, Register Src,
+                              MachineIRBuilder &MIRBuilder) {
----------------
paquette wrote:
> Would `MachineIRBuilder::buildExtOrTrunc` work here?
> 
> If not, maybe it would make sense to move this to `MachineIRBuilder` for the sake of consistency?
The destination is vreg with reg class and source is generic vreg with LLT, it would not work for anyext since it requires both source and dest to be generic virtual registers. Here we anyext to new generic vreg with same size as Dst and then copy to Dst.
MachineIRBuilder specializes for generic vregs so should it be something like: "buildExtOrTruncToVRegWithRegClass" ? Should I also cover vectors? I don't know if there is a way to know LLT of vector type that would fit into reg class.



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

https://reviews.llvm.org/D83384





More information about the llvm-commits mailing list