This is an archive of the discontinued LLVM Phabricator instance.

[InstSimplify] Refactor invariant.group load folding
ClosedPublic

Authored by nikic on Oct 24 2021, 9:52 AM.

Details

Summary

Currently strip.invariant/launder.invariant are handled by constructing constant expressions with the intrinsics skipped. This takes an alternative approach of accumulating the offset using stripAndAccumulateConstantOffsets(), with a flag to look through invariant.group intrinsics.

Diff Detail

Event Timeline

nikic created this revision.Oct 24 2021, 9:52 AM
nikic requested review of this revision.Oct 24 2021, 9:52 AM
Herald added a reviewer: sstefan1. · View Herald Transcript
Herald added a reviewer: baziotis. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
aeubanks accepted this revision.Oct 24 2021, 4:40 PM
aeubanks added inline comments.
llvm/include/llvm/IR/Value.h
697

nit: strip.invariant.group and launder.invariant.group

714

AllowInvariantGroup

This revision is now accepted and ready to land.Oct 24 2021, 4:40 PM
This revision was automatically updated to reflect the committed changes.
nikic marked 2 inline comments as done.