This is an archive of the discontinued LLVM Phabricator instance.

[CodeGen] Improve code generation for clamping of constant indices with scalable vectors
ClosedPublic

Authored by david-arm on Apr 16 2021, 4:02 AM.

Details

Summary

When trying to clamp a constant index into a scalable vector we can
test if the index is less than the minimum number of elements in the
vector. If so, we can simply return the index because we know it is
guaranteed to fit inside the vector.

Diff Detail