Page MenuHomePhabricator

[InstSimplify] Clarify use of FixedVectorType in SimplifySelectInst

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



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.

Diff Detail

Event Timeline

c-rhodes created this revision.Nov 24 2020, 10:32 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 24 2020, 10:32 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
c-rhodes requested review of this revision.Nov 24 2020, 10:32 AM
sdesmalen accepted this revision.Nov 25 2020, 3:35 AM

Seems like a good change to me, thanks!

This revision is now accepted and ready to land.Nov 25 2020, 3:35 AM