This is an archive of the discontinued LLVM Phabricator instance.

[DAGCombiner][RISCV] Don't use vector types in DAGCombiner::tryStoreMergeOfLoads if we need a rotate.
ClosedPublic

Authored by craig.topper on Aug 27 2021, 1:22 PM.

Details

Summary

The check for whether a rotate is possible occurs before the
memory legality checks for the integer type. So it's possible we
decide we can use a rotate, but then fail the legality checks. If
that happens we should not fall back to a vector type. This triggers
an assertion in the rotate handling when it finds a vector type
instead of an integer type.

In theory we could use a shufflevector in place of the rotate, but
right now I'd just like to fix the crash.

Diff Detail

Event Timeline

craig.topper created this revision.Aug 27 2021, 1:22 PM
craig.topper requested review of this revision.Aug 27 2021, 1:22 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 27 2021, 1:22 PM
Herald added a subscriber: MaskRay. · View Herald Transcript
RKSimon accepted this revision.Aug 30 2021, 2:49 AM

LGTM

This revision is now accepted and ready to land.Aug 30 2021, 2:49 AM