This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Preserve VL when truncating i64 gather/scatter indices on RV32.
ClosedPublic

Authored by craig.topper on Jan 27 2022, 1:34 PM.

Details

Summary

We were creating a truncate with the default for the type, but for
VP intrinsics we have a VL that we should use.

Diff Detail

Event Timeline

craig.topper created this revision.Jan 27 2022, 1:34 PM
craig.topper requested review of this revision.Jan 27 2022, 1:34 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 27 2022, 1:34 PM
craig.topper added inline comments.Jan 27 2022, 1:37 PM
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vpgather.ll
966

We still forgot to use the correct VL for the scaling shift. I'll forgive the vsext since we don't have a VP intrinsic yet.

968

Ideally we'd shrink the vsext to i32 before the shift and avoid this vnsrl.

frasercrmck accepted this revision.Jan 28 2022, 3:10 AM

Ah, good spot! LGTM.

This revision is now accepted and ready to land.Jan 28 2022, 3:10 AM
This revision was landed with ongoing or failed builds.Jan 28 2022, 9:25 AM
This revision was automatically updated to reflect the committed changes.