This is an archive of the discontinued LLVM Phabricator instance.

[Thumb2] Upgrade intrinsic upgrading code
ClosedPublic

Authored by barannikov88 on Jan 30 2023, 8:09 AM.

Details

Summary

Enabling opaque pointers has changed the mangled names of these two ARM
intrinsics:

arm.mve.vldr.gather.offset.predicated.v2i64.p0i64.v2i64.v4i1
arm.mve.vstr.scatter.offset.predicated.p0i64.v2i64.v2i64.v4i1

They are now spelled as:

arm.mve.vldr.gather.offset.predicated.v2i64.p0.v2i64.v4i1
arm.mve.vstr.scatter.offset.predicated.p0.v2i64.v2i64.v4i1

Upgrade intrinsic upgrading code to account for the change in names.

Diff Detail

Event Timeline

barannikov88 created this revision.Jan 30 2023, 8:09 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 30 2023, 8:09 AM
barannikov88 requested review of this revision.Jan 30 2023, 8:09 AM
Herald added a project: Restricted Project. · View Herald Transcript

Thanks for this.

Do you know what happens with old IR and bitcode from a previous release? Will it see the old @llvm.mve.vldr.gather.offset.predicated.v2i64.p0i64.v2i64.v4i1 names when auto-upgrading? Or will that have been converted to @llvm.arm.mve.vstr.scatter.offset.predicated.p0.v2i64.v2i64.v4i1 by an earlier stage?

nikic added a comment.Jan 30 2023, 9:07 AM

Thanks for this.

Do you know what happens with old IR and bitcode from a previous release? Will it see the old @llvm.mve.vldr.gather.offset.predicated.v2i64.p0i64.v2i64.v4i1 names when auto-upgrading? Or will that have been converted to @llvm.arm.mve.vstr.scatter.offset.predicated.p0.v2i64.v2i64.v4i1 by an earlier stage?

I think it will see the old p0i64 name. That will get remangle-upgraded to the p0 name, but after that the custom auto-upgrade won't be rerun.

So I think the right thing to do here would be to either just add both variants to the list, or modify the test to keep p0i64 in the original input. (I'd personally favor the former, as that should work no matter how the upgrade process works.)

That sounds good to me. Thanks for the input.

Keep both spellings

dmgreen accepted this revision.Jan 31 2023, 12:11 AM

Thanks. LGTM

This revision is now accepted and ready to land.Jan 31 2023, 12:11 AM
This revision was automatically updated to reflect the committed changes.