This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Only combine (or (GREVI x, shamt), x) -> GORCI if shamt is a power of 2.
ClosedPublic

Authored by craig.topper on Nov 29 2020, 2:40 PM.

Details

Summary

GORCI performs an OR between each stage. So we need to ensure only
one stage is active before doing this combine.

Initial attempts at finding a test case for this failed due to
the order things get combined. It's most likely that we'll form
one stage of GREVI then combine to GORCI before the two stages of
GREVI are able to be formed and combined with each other to form
a multi stage GREVI.

Diff Detail

Event Timeline

craig.topper created this revision.Nov 29 2020, 2:40 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 29 2020, 2:40 PM
craig.topper requested review of this revision.Nov 29 2020, 2:40 PM
frasercrmck accepted this revision.Nov 30 2020, 2:08 AM

Good catch, thanks. LGTM.

This revision is now accepted and ready to land.Nov 30 2020, 2:08 AM