This is an archive of the discontinued LLVM Phabricator instance.

[InstCombine] Folding `@llvm.ptrmask` with itself
ClosedPublic

Authored by goldstein.w.n on Jun 28 2023, 2:17 PM.

Details

Summary

@llvm.ptrmask is basically just and with a ptr operand. This is
a trivial combine to do with and (many others could also be added).

Diff Detail

Event Timeline

goldstein.w.n created this revision.Jun 28 2023, 2:17 PM
goldstein.w.n requested review of this revision.Jun 28 2023, 2:17 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 28 2023, 2:17 PM
nikic added inline comments.Jun 28 2023, 2:35 PM
llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
1934

Should capture the intrinsic operands via m_Value here.

goldstein.w.n marked an inline comment as done.Jun 28 2023, 4:12 PM

Caputer inner values directly

nikic accepted this revision.Jun 29 2023, 12:11 AM

LGTM

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