This is an archive of the discontinued LLVM Phabricator instance.

GlobalISel: Support lowering vector->vector G_BITCAST
ClosedPublic

Authored by arsenm on Jun 9 2020, 8:54 AM.

Details

Summary

Extract subvectors and cast to the result element type before
remerging.

Diff Detail

Event Timeline

arsenm created this revision.Jun 9 2020, 8:54 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 9 2020, 8:54 AM
arsenm updated this revision to Diff 269641.Jun 9 2020, 1:05 PM

Rebase tests

arsenm updated this revision to Diff 269652.Jun 9 2020, 1:30 PM

Remove now redundant check in remainder of function

gargaroff accepted this revision.Jun 15 2020, 12:10 AM

LGTM with a nit

llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
2214

Remove unnecessary assignment to SrcReg

This revision is now accepted and ready to land.Jun 15 2020, 12:10 AM
arsenm marked an inline comment as done.Jun 15 2020, 4:19 AM
arsenm added inline comments.
llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
2214

This assignment is quite necessary to change the types remerged below

gargaroff added inline comments.Jun 15 2020, 5:00 AM
llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
2214

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 :)

arsenm marked an inline comment as done.Jun 15 2020, 5:25 AM
arsenm added inline comments.
llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
2214

This is rewriting the elements of SrcRegs

gargaroff marked an inline comment as done.Jun 15 2020, 6:19 AM
gargaroff added inline comments.
llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
2214

D'oh, of course. That makes a lot of sense. Thank you!