This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] Change altivec indexed load/store builtins argument type
ClosedPublic

Authored by qiucf on Jul 22 2021, 2:07 AM.

Details

Summary

This patch changes the index argument of lvxl?/lve[bhw]x/stvxl?/stve[bhw]x builtins from int to long. Because on 64-bit subtargets, an extra extsw will always been generated, which is incorrect.

Diff Detail

Event Timeline

qiucf created this revision.Jul 22 2021, 2:07 AM
qiucf requested review of this revision.Jul 22 2021, 2:07 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 22 2021, 2:07 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
nemanjai accepted this revision.Jul 26 2021, 4:29 AM

LGTM. Thanks for fixing this.
I am just curious, was this revealed from a real world test that used an offset that is so large that it doesn't fit into 32 bits?

This revision is now accepted and ready to land.Jul 26 2021, 4:29 AM
This revision was landed with ongoing or failed builds.Jul 26 2021, 9:27 AM
This revision was automatically updated to reflect the committed changes.
qiucf added a comment.Jul 26 2021, 9:27 AM

LGTM. Thanks for fixing this.
I am just curious, was this revealed from a real world test that used an offset that is so large that it doesn't fit into 32 bits?

No :-) It's found in backend codegen (an unnecessary extsw).