[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 06:28:55 PDT 2020
gargaroff marked an inline comment as done.
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:
> > 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 :)
> This is rewriting the elements of SrcRegs
D'oh, of course. That makes a lot of sense. Thank you!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81475/new/
https://reviews.llvm.org/D81475
More information about the llvm-commits
mailing list