This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Fold extract of ARM_BUILD_VECTOR
ClosedPublic

Authored by dmgreen on Jun 24 2021, 7:38 AM.

Details

Summary

For some reason, the ARM backend thinks it needs it's own BUILDVECTOR. This adds a small fold for extract (ARM_BUILD_VECTOR) to fold to the original node. This can help simplify the resulting codegen in some cases.

Diff Detail

Event Timeline

dmgreen created this revision.Jun 24 2021, 7:38 AM
dmgreen requested review of this revision.Jun 24 2021, 7:38 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 24 2021, 7:38 AM

For some reason, the ARM backend thinks it needs it's own BUILDVECTOR

I think the issue here is that ISD::BUILD_VECTOR has funny interactions with legalization, so you can't just mark it "Legal". So we transform to ARMISD::BUILD_VECTOR to indicate "yes, this is actually a legal operation".

llvm/lib/Target/ARM/ARMISelLowering.cpp
14575

Missing check that the constant is in range.

dmgreen updated this revision to Diff 354581.Jun 25 2021, 12:37 PM

Added a bound check, and update a couple of other tests.

This revision is now accepted and ready to land.Jun 25 2021, 2:14 PM
This revision was landed with ongoing or failed builds.Jun 29 2021, 3:03 AM
This revision was automatically updated to reflect the committed changes.