This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Add a fatal error if ISD::VSCALE is used with Zvl32b.
ClosedPublic

Authored by craig.topper on Jan 31 2022, 12:09 AM.

Details

Summary

We convert VLEN to vscale by dividing by RVVBitsPerBlock which is
currently 64. This is only correct if VLEN is evenly divisible by

  1. With only Zvl32b we can't assume that.

This patch adds a fatal_error to prevent generating code that may
be broken.

We probably need to look at how we size stack frame objects too.

Diff Detail

Event Timeline

craig.topper created this revision.Jan 31 2022, 12:09 AM
craig.topper requested review of this revision.Jan 31 2022, 12:09 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 31 2022, 12:09 AM
frasercrmck accepted this revision.Jan 31 2022, 8:48 AM

LGTM, though this issue is really in any scalable-vector code with Zvl32b, so we're still letting a lot slip through the cracks, aren't we?

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