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
2555

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

2572

Unnecessary braces

2583

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
2555

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

2572

This covers multiple lines

2583

Also covers multiple lines

llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp