This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Validate the SEW and LMUL operands to __builtin_rvv_vsetvli(max)
ClosedPublic

Authored by craig.topper on May 7 2021, 11:34 AM.

Details

Summary

These are required to be constants, this patch makes sure they
are in the accepted range of values.

These are usually created by wrappers in the riscv_vector.h header
which should always be correct. This patch protects against a user
using the builtin directly.

Diff Detail

Event Timeline

craig.topper created this revision.May 7 2021, 11:34 AM
craig.topper requested review of this revision.May 7 2021, 11:34 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 7 2021, 11:34 AM
Herald added a subscriber: MaskRay. · View Herald Transcript
khchen accepted this revision.May 9 2021, 6:53 PM

Good catch, LGTM!

This revision is now accepted and ready to land.May 9 2021, 6:53 PM