HomePhabricator

[InstSimplify] Clarify use of FixedVectorType in SimplifySelectInst

Authored by c-rhodes on Nov 24 2020, 10:07 AM.

Description

[InstSimplify] Clarify use of FixedVectorType in SimplifySelectInst

Folding a select of vector constants that include undef elements only
applies to fixed vectors, but there's no earlier check the type is not
scalable so it crashes for scalable vectors. This adds a check so this
optimization is only attempted for fixed vectors.

Reviewed By: sdesmalen

Differential Revision: https://reviews.llvm.org/D92046