This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][GlobalISel] Fix bug in fewVectorElts action while legalizing oversize G_FPTRUNC vectors
ClosedPublic

Authored by aemerson on Sep 16 2020, 11:29 PM.

Details

Summary

For <8 x s32> = fptrunc <8 x s64> the fewerElementsVector action tries to break down the source vector into the final source vectors of <2 x s64> using unmerge. This fixes a crash due to using the wrong number of elements for the breakdown type.

Also add some legalizer tests for explicitly G_FPTRUNC which we didn't have.

Diff Detail

Unit TestsFailed

Event Timeline

aemerson created this revision.Sep 16 2020, 11:29 PM
aemerson requested review of this revision.Sep 16 2020, 11:29 PM
arsenm added inline comments.Sep 17 2020, 7:23 AM
llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
3280

I've been meaning to delete this function since it should now be redundant

3289

Just .getElementType

aemerson updated this revision to Diff 292527.Sep 17 2020, 8:53 AM
arsenm accepted this revision.Sep 17 2020, 8:54 AM
This revision is now accepted and ready to land.Sep 17 2020, 8:54 AM
This revision was landed with ongoing or failed builds.Sep 17 2020, 8:56 AM
This revision was automatically updated to reflect the committed changes.