This is an archive of the discontinued LLVM Phabricator instance.

[IRBuilder] Use canonical i64 type for insertelement index used by vector splats.
ClosedPublic

Authored by paulwalker-arm on Jan 4 2023, 6:30 AM.

Details

Summary

Instcombine prefers this canonical form (see getPreferredVectorIndex),
as does IRBuilder when passing the index as an integer so we may as
well use the prefered form from creation.

NOTE: All test changes are mechanical with nothing else expected beyond a change of index type from i32 to i64.

Diff Detail

Event Timeline

paulwalker-arm created this revision.Jan 4 2023, 6:30 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 4 2023, 6:30 AM
paulwalker-arm requested review of this revision.Jan 4 2023, 6:30 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJan 4 2023, 6:30 AM

Update MLIR test.

Herald added a reviewer: ftynse. · View Herald Transcript
Herald added a reviewer: dcaballe. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript

Update poly tests.

david-arm accepted this revision.Jan 5 2023, 8:44 AM

LGTM! The change seems sensible to me, although perhaps worth waiting a day or two in case anyone else has objections? I noticed that we still create inserts using 32-bit indices in a few other places such as the SLPVectorizer, but I imagine these can be tidied up over time if necessary.

This revision is now accepted and ready to land.Jan 5 2023, 8:44 AM
This revision was landed with ongoing or failed builds.Jan 11 2023, 6:10 AM
This revision was automatically updated to reflect the committed changes.