This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Handle non-recursive muls of strides in gather/scatter lowering
ClosedPublic

Authored by luke on Mar 27 2023, 9:17 AM.

Details

Summary

The gather scatter lowering pass can fold multiplies of a step vector
into the stride for the recursive case, so this extends it for the
non-recursive case.
The logic can probably be shared between the two at some point to extend
it to shls and ors.

Diff Detail

Event Timeline

luke created this revision.Mar 27 2023, 9:17 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 27 2023, 9:17 AM
luke requested review of this revision.Mar 27 2023, 9:17 AM
craig.topper retitled this revision from [RISCV] Handle non-recursive muls of strides in gather/scater lowering to [RISCV] Handle non-recursive muls of strides in gather/scatter lowering.Mar 27 2023, 9:28 AM
craig.topper added inline comments.
llvm/lib/Target/RISCV/RISCVGatherScatterLowering.cpp
177

Add curly braces for consistency with the Mul case.

luke updated this revision to Diff 508713.Mar 27 2023, 9:52 AM

Address comments

reames accepted this revision.Mar 27 2023, 9:54 AM

LGTM once Craig's style comment addressed.

This revision is now accepted and ready to land.Mar 27 2023, 9:54 AM