This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][GlobalISel] Fix the LegalityPredicate for lowerIf for G_LOAD/G_STORE
ClosedPublic

Authored by volkan on Oct 24 2018, 3:41 PM.

Details

Summary

Currently, Legalizer is trying to lower G_LOAD with a vector type
that has more than two elements due to the incorrect LegalityPredicate.

This patch fixes the issue by removing the multiplication by 8
as MemDesc.Size already contains the size in bits.

Diff Detail

Event Timeline

volkan created this revision.Oct 24 2018, 3:41 PM
dsanders accepted this revision.Oct 24 2018, 6:44 PM

LGTM with the test nit

Would you be willing to rename that Size member to SizeInBits to make the value clearer?

test/CodeGen/AArch64/GlobalISel/legalize-load-v4s32.mir
6

Could you include the full instruction (with operands and types) in this check?

This revision is now accepted and ready to land.Oct 24 2018, 6:44 PM
volkan updated this revision to Diff 171132.Oct 25 2018, 10:19 AM

Updated the test to include the full instruction.

volkan marked an inline comment as done.Oct 25 2018, 10:19 AM

LGTM with the test nit

Would you be willing to rename that Size member to SizeInBits to make the value clearer?

Sure, I'll do that.

This revision was automatically updated to reflect the committed changes.