This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Add isel patterns to select slli+shXadd.uw.
ClosedPublic

Authored by craig.topper on Nov 12 2022, 12:17 AM.

Details

Summary

This matches what we get for something like.
%0 = shl i32 %x, C
%1 = zext i32 %0 to i64
%2 = getelementptr i32, ptr %y, %1

The shift before the zext and the shift implied by the GEP get
combined with an AND after them. We need to split it back into
2 shifts so we can fold one into shXadd.uw.

Diff Detail

Event Timeline

craig.topper created this revision.Nov 12 2022, 12:17 AM
craig.topper requested review of this revision.Nov 12 2022, 12:17 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 12 2022, 12:17 AM
reames accepted this revision.Nov 21 2022, 8:33 AM

LGTM

This revision is now accepted and ready to land.Nov 21 2022, 8:33 AM
This revision was landed with ongoing or failed builds.Nov 21 2022, 9:33 AM
This revision was automatically updated to reflect the committed changes.