This is an archive of the discontinued LLVM Phabricator instance.

GlobalISel: Implement bitcast action for G_INSERT_VECTOR_ELT
ClosedPublic

Authored by arsenm on Jul 25 2020, 6:39 AM.

Details

Summary

This mirrors the support for the equivalent extracts. This also
creates a huge mess that would be greatly improved if we had any bit
operation combines.

Diff Detail

Event Timeline

arsenm created this revision.Jul 25 2020, 6:39 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 25 2020, 6:39 AM
arsenm updated this revision to Diff 283766.Aug 6 2020, 4:42 PM

Rebase and add MIR sample

aemerson accepted this revision.Aug 10 2020, 10:44 PM

Thanks for the helpful comments. LGTM with a few nits.

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

Early exit if NewNumElts >= OldNumElts to save on indent?

2519

Unnecessary braces

2530

same

This revision is now accepted and ready to land.Aug 10 2020, 10:44 PM
arsenm closed this revision.Aug 11 2020, 7:39 AM
llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
2502

I considered this, but this function is only half implemented. The >= case should also be here. I think early exit would make sense for the shorter case, but I'm not sure which one that would be without implementing it

2519

This covers multiple lines

2530

Also covers multiple lines

llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.i16.ll