[PATCH] D81475: GlobalISel: Support lowering vector->vector G_BITCAST

Dominik Montada via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 15 05:24:31 PDT 2020


gargaroff added inline comments.


================
Comment at: llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp:2214
+      for (Register &SrcReg : SrcRegs)
+        SrcReg = MIRBuilder.buildBitcast(DstCastTy, SrcReg).getReg(0);
+    } else
----------------
arsenm wrote:
> gargaroff wrote:
> > Remove unnecessary assignment to `SrcReg`
> This assignment is quite necessary to change the types remerged below
I don't see where this is used though? You are reassigning the loop variable `SrcReg` and down below you use `SrcRegs`, not `SrcReg`. Sorry if I'm just blind here and am missing something obvious :)


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

https://reviews.llvm.org/D81475





More information about the llvm-commits mailing list