This is an archive of the discontinued LLVM Phabricator instance.

[CodeGenPrepare] Avoid a scalable-vector crash in ctlz/cttz
ClosedPublic

Authored by frasercrmck on Oct 20 2021, 8:03 AM.

Details

Summary

This patch fixes a crash when despeculating ctlz/cttz intrinsics with
scalable-vector types. It is not safe to speculatively get the size of
the vector type in bits in case the vector type is not a fixed-length type. As
it happens this isn't required as vector types are skipped anyway.

Diff Detail