This is an archive of the discontinued LLVM Phabricator instance.

LoopIdiom: avoid patterned memset if constant is not relocatable.
ClosedPublic

Authored by t.p.northover on Jan 11 2023, 5:55 AM.

Details

Reviewers
davide
nikic
fhahn
Summary

The pattern we're using for the memset_pattern* call gets put into a static global variable initialized, which means it has to be representable with relocations on the target. Most ConstantExpr instances do not satisfy this constraint, so avoid all of them for now.

Diff Detail

Event Timeline

t.p.northover created this revision.Jan 11 2023, 5:55 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 11 2023, 5:55 AM
t.p.northover requested review of this revision.Jan 11 2023, 5:55 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 11 2023, 5:55 AM
davide accepted this revision.Jan 11 2023, 12:07 PM
davide added a subscriber: davide.

LGTM

This revision is now accepted and ready to land.Jan 11 2023, 12:07 PM

Thanks. Committed as 150595ab4be3.