Page MenuHomePhabricator

[X86] Exclude invalid element types for bitcast/broadcast folding.

Authored by fhahn on Jun 23 2021, 9:52 AM.



It looks like the fold introduced in 63f3383ece25efa can cause crashes
if the type of the bitcasted value is not a valid vector element type,
like x86_mmx.

To resolve the crash, reject invalid vector element types. The way it is
done in the patch is a bit clunky. Perhaps there's a better way to

Diff Detail

Event Timeline

fhahn created this revision.Jun 23 2021, 9:52 AM
fhahn requested review of this revision.Jun 23 2021, 9:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 23 2021, 9:52 AM
RKSimon accepted this revision.Jun 24 2021, 1:49 AM

LGTM - with one minor - cheers!



This revision is now accepted and ready to land.Jun 24 2021, 1:49 AM
This revision was landed with ongoing or failed builds.Jun 24 2021, 4:41 AM
This revision was automatically updated to reflect the committed changes.
fhahn added inline comments.Jun 24 2021, 4:41 AM

Thanks! I added unwind and I also added the same test to avx2-vbroadcast.ll